Bug 1217230 - Set mNeedToRecomputeVisibility true only when style or layout flush. r=seth
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 21 Oct 2015 16:12:00 +0200
changeset 304368 b8ca53e9a3a02d9dcbaf7da16b6f0b3c36671743
parent 304367 8315a152ccb1cb77d57652daf7ce5ab688582ced
child 304369 2353ad287e4dfe7018d54c5e223eee73d59663d0
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth
bugs1217230
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1217230 - Set mNeedToRecomputeVisibility true only when style or layout flush. r=seth
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1566,19 +1566,20 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
           // Inform the FontFaceSet that we ticked, so that it can resolve its
           // ready promise if it needs to (though it might still be waiting on
           // a layout flush).
           nsPresContext* presContext = shell->GetPresContext();
           if (presContext) {
             presContext->NotifyFontFaceSetOnRefresh();
           }
           NS_RELEASE(shell);
+
+          mNeedToRecomputeVisibility = true;
         }
 
-        mNeedToRecomputeVisibility = true;
 
         if (tracingStyleFlush) {
           profiler_tracing("Paint", "Styles", TRACING_INTERVAL_END);
         }
 
         if (!nsLayoutUtils::AreAsyncAnimationsEnabled()) {
           mPresContext->TickLastStyleUpdateForAllAnimations();
         }
@@ -1612,20 +1613,20 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
         shell->FlushPendingNotifications(ChangesToFlush(flushType, false));
         // Inform the FontFaceSet that we ticked, so that it can resolve its
         // ready promise if it needs to.
         nsPresContext* presContext = shell->GetPresContext();
         if (presContext) {
           presContext->NotifyFontFaceSetOnRefresh();
         }
         NS_RELEASE(shell);
+
+        mNeedToRecomputeVisibility = true;
       }
 
-      mNeedToRecomputeVisibility = true;
-
       if (tracingLayoutFlush) {
         profiler_tracing("Paint", "Reflow", TRACING_INTERVAL_END);
       }
     }
 
     // The pres context may be destroyed during we do the flushing.
     if (!mPresContext || !mPresContext->GetPresShell()) {
       StopTimer();