mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1357583: Add an API to get the restyle generation from the pres context. r=heycam
MozReview-Commit-ID: b7j0CpPimC
This commit is contained in:
parent
d59f61ebff
commit
fa730cc3b0
@ -4033,6 +4033,18 @@ nsDOMWindowUtils::GetElementsRestyled(uint64_t* aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetRestyleGeneration(uint64_t* aResult)
|
||||
{
|
||||
nsPresContext* presContext = GetPresContext();
|
||||
if (!presContext) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
*aResult = presContext->GetRestyleGeneration();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMWindowUtils::GetFramesConstructed(uint64_t* aResult)
|
||||
{
|
||||
|
@ -1886,6 +1886,13 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
*/
|
||||
readonly attribute unsigned long long elementsRestyled;
|
||||
|
||||
/**
|
||||
* Restyle generation for the current document.
|
||||
*
|
||||
* May throw NS_ERROR_NOT_AVAILABLE.
|
||||
*/
|
||||
readonly attribute unsigned long long restyleGeneration;
|
||||
|
||||
/**
|
||||
* Number of frames constructed (excluding breaking) for the curent
|
||||
* document.
|
||||
|
Loading…
Reference in New Issue
Block a user