Backed out changeset fb331e03981a (bug 1271691) for perma failures in scroll-rounding.html
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 27 May 2016 13:33:31 +0200
changeset 340344 920fe2a024f7392fc9801a6d06574c564d6dc844
parent 340343 f706a1e2cfd888b887fb16e681ef32cc4cc34170
child 340345 1fa20da1e3aefc7ac9d8242156467820d57d222f
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1271691
milestone49.0a1
backs outfb331e03981a71eb5fe2b24c52a9fa9832e42b1e
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
Backed out changeset fb331e03981a (bug 1271691) for perma failures in scroll-rounding.html
layout/base/nsIPresShell.h
layout/base/nsPresShell.cpp
layout/base/nsPresShell.h
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -901,21 +901,16 @@ public:
   /**
    * Called to find out if painting is suppressed for this presshell.  If it is suppressd,
    * we don't allow the painting of any layer but the background, and we don't
    * recur into our children.
    */
   bool IsPaintingSuppressed() const { return mPaintingSuppressed; }
 
   /**
-   * Update the painting suppression status and do unsuppress painting if needs.
-   */
-  virtual void CheckIfTimeToUnsuppressPainting() = 0;
-
-  /**
    * Pause painting by freezing the refresh driver of this and all parent
    * presentations. This may not have the desired effect if this pres shell
    * has its own refresh driver.
    */
   virtual void PausePainting() = 0;
 
   /**
    * Resume painting by thawing the refresh driver of this and all parent
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -1764,18 +1764,16 @@ PresShell::Initialize(nscoord aWidth, ns
       // Default to PAINTLOCK_EVENT_DELAY if we can't get the pref value.
       int32_t delay =
         Preferences::GetInt("nglayout.initialpaint.delay",
                             PAINTLOCK_EVENT_DELAY);
 
       mPaintSuppressionTimer->InitWithNamedFuncCallback(
         sPaintSuppressionCallback, this, delay, nsITimer::TYPE_ONE_SHOT,
         "PresShell::sPaintSuppressionCallback");
-
-      mPaintSuppressionExpectTime = TimeStamp::Now() + TimeDuration::FromMilliseconds(delay);
     }
   }
 
   // If we get here and painting is not suppressed, then we can paint anytime
   // and we should fire the before-first-paint notification
   if (!mPaintingSuppressed) {
     ScheduleBeforeFirstPaint();
   }
@@ -6512,18 +6510,16 @@ PresShell::Paint(nsView*        aViewToP
   LayerManager* layerManager =
     aViewToPaint->GetWidget()->GetLayerManager(&isRetainingManager);
   NS_ASSERTION(layerManager, "Must be in paint event");
   bool shouldInvalidate = layerManager->NeedsWidgetInvalidation();
 
   nsAutoNotifyDidPaint notifyDidPaint(this, aFlags);
   AutoUpdateHitRegion updateHitRegion(this, frame);
 
-  CheckIfTimeToUnsuppressPainting();
-
   // Whether or not we should set first paint when painting is
   // suppressed is debatable. For now we'll do it because
   // B2G relies on first paint to configure the viewport and
   // we only want to do that when we have real content to paint.
   // See Bug 798245
   if (mIsFirstPaint && !mPaintingSuppressed) {
     layerManager->SetIsFirstPaint();
     mIsFirstPaint = false;
@@ -11531,20 +11527,8 @@ nsIPresShell::HasRuleProcessorUsedByMult
 
   *aRetVal = false;
   if (nsStyleSet* styleSet = mStyleSet->GetAsGecko()) {
     // ServoStyleSets do not have rule processors.
     *aRetVal = styleSet->HasRuleProcessorUsedByMultipleStyleSets(type);
   }
   return NS_OK;
 }
-
-void
-PresShell::CheckIfTimeToUnsuppressPainting()
-{
-  if (!mPaintingSuppressed) {
-    return;
-  }
-
-  if (TimeStamp::Now() >= mPaintSuppressionExpectTime) {
-    UnsuppressPainting();
-  }
-}
--- a/layout/base/nsPresShell.h
+++ b/layout/base/nsPresShell.h
@@ -417,18 +417,16 @@ public:
                                           const mozilla::WidgetKeyboardEvent& aEvent,
                                           bool aEmbeddedCancelled) override;
 
   virtual bool CanDispatchEvent(
       const mozilla::WidgetGUIEvent* aEvent = nullptr) const override;
 
   void SetNextPaintCompressed() { mNextPaintCompressed = true; }
 
-  virtual void CheckIfTimeToUnsuppressPainting() override;
-
 protected:
   virtual ~PresShell();
 
   void HandlePostedReflowCallbacks(bool aInterruptible);
   void CancelPostedReflowCallbacks();
 
   void ScheduleBeforeFirstPaint();
   void UnsuppressAndInvalidate();
@@ -946,17 +944,16 @@ protected:
   RefPtr<MobileViewportManager> mMobileViewportManager;
 
   RefPtr<mozilla::AccessibleCaretEventHub> mAccessibleCaretEventHub;
 
   // This timer controls painting suppression.  Until it fires
   // or all frames are constructed, we won't paint anything but
   // our <body> background and scrollbars.
   nsCOMPtr<nsITimer>        mPaintSuppressionTimer;
-  mozilla::TimeStamp        mPaintSuppressionExpectTime;
 
   nsCOMPtr<nsITimer>        mDelayedPaintTimer;
 
   // The `performance.now()` value when we last started to process reflows.
   DOMHighResTimeStamp       mLastReflowStart;
 
   mozilla::TimeStamp        mLoadBegin;  // used to time loads
 
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1666,18 +1666,16 @@ nsRefreshDriver::Tick(int64_t aNowEpoch,
     // often depending on what other things are going on and in that
     // situation we don't want to thrash our timer.  So instead we
     // wait until we get a Notify() call when we have no observers
     // before stopping the timer.
     StopTimer();
     return;
   }
 
-  presShell->CheckIfTimeToUnsuppressPainting();
-
   mResizeSuppressed = false;
 
   AutoRestore<bool> restoreInRefresh(mInRefresh);
   mInRefresh = true;
 
   AutoRestore<TimeStamp> restoreTickStart(mTickStart);
   mTickStart = TimeStamp::Now();