Bug 1217230 - Set mNeedToRecomputeVisibility true only when style or layout flush. r=seth, a=lizzard
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 21 Oct 2015 16:12:00 +0200
changeset 298295 93cf17a1425d4b2b509a26906f3b035fb29d414d
parent 298294 e9f8165910411bcc9e9c3b2885236fdaf12049ac
child 298296 161dd1563f9fad6b4bed85ac271c4b714a3c889a
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersseth, lizzard
bugs1217230
milestone43.0a2
Bug 1217230 - Set mNeedToRecomputeVisibility true only when style or layout flush. r=seth, a=lizzard
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();