Bug 1334735 - Part 3: Really set mNeedLayoutFlush when skipping suppressed interruptible reflows. r?bz draft
authorCameron McCormack <cam@mcc.id.au>
Tue, 07 Feb 2017 18:19:35 +0800
changeset 479822 a4a0e566d5196c42260ae943ff0cfeb799e53236
parent 479821 5b542ee78cd33e581f5ca61bec0725886d1d0a40
child 544792 891b65966da861aba3f52b4d2cd9f96f4dda9100
push id44370
push userbmo:cam@mcc.id.au
push dateTue, 07 Feb 2017 10:20:07 +0000
reviewersbz
bugs1334735
milestone54.0a1
Bug 1334735 - Part 3: Really set mNeedLayoutFlush when skipping suppressed interruptible reflows. r?bz MozReview-Commit-ID: FUlY7Xqo6gZ
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -4243,23 +4243,21 @@ PresShell::FlushPendingNotifications(moz
 
   if (!didStyleFlush && flushType >= FlushType::Style && !mIsDestroying) {
     SetNeedStyleFlush();
     if (aFlush.mFlushAnimations) {
       SetNeedThrottledAnimationFlush();
     }
   }
 
-  if (!didLayoutFlush && !mIsDestroying &&
-      (flushType >=
-       (mSuppressInterruptibleReflows ? FlushType::Layout
-                                      : FlushType::InterruptibleLayout))) {
-    // We suppressed this flush due to mSuppressInterruptibleReflows or
-    // !isSafeToFlush, but now we think we don't need to flush any more.
-    // Record what's really going on.
+  if (!didLayoutFlush && flushType >= FlushType::InterruptibleLayout &&
+      !mIsDestroying) {
+    // We suppressed this flush either due to it not being safe to flush,
+    // or due to mSuppressInterruptibleReflows.  Either way, the
+    // mNeedLayoutFlush flag needs to be re-set.
     SetNeedLayoutFlush();
   }
 }
 
 void
 PresShell::CharacterDataChanged(nsIDocument *aDocument,
                                 nsIContent*  aContent,
                                 CharacterDataChangeInfo* aInfo)