Bug 1447874 - Introduce DOMWindowUtils.flushLayoutWithoutThrottledAnimations. r=birtles,kats

MozReview-Commit-ID: LNNCgl0QSML

--HG--
extra : rebase_source : a1a0f9be7caf701e5842c10b680c3f1a4c030d21
This commit is contained in:
Hiroyuki Ikezoe 2018-04-02 10:35:44 +09:00
parent 6dda0f4a39
commit 4f51035def
2 changed files with 18 additions and 0 deletions

View File

@ -1726,6 +1726,18 @@ nsDOMWindowUtils::NeedsFlush(int32_t aFlushType, bool* aResult)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::FlushLayoutWithoutThrottledAnimations()
{
nsCOMPtr<nsIDocument> doc = GetDocument();
if (doc) {
doc->FlushPendingNotifications(
ChangesToFlush(FlushType::Layout, false /* flush animations */));
}
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::GetRootBounds(nsISupports** aResult)
{

View File

@ -856,6 +856,12 @@ interface nsIDOMWindowUtils : nsISupports {
*/
bool needsFlush(in long aFlushtype);
/**
* Flush pending layout-type notification without flushing throttled
* animations.
*/
void flushLayoutWithoutThrottledAnimations();
/**
* Returns the bounds of the window's currently loaded document. This will
* generally be (0, 0, pageWidth, pageHeight) but in some cases (e.g. RTL