diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h index ccaa4368fb4b..29f7d42b61e2 100644 --- a/layout/base/nsIPresShell.h +++ b/layout/base/nsIPresShell.h @@ -905,11 +905,6 @@ public: */ 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 diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 0e647ec80a72..428761b1e714 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -1769,8 +1769,6 @@ PresShell::Initialize(nscoord aWidth, nscoord aHeight) mPaintSuppressionTimer->InitWithNamedFuncCallback( sPaintSuppressionCallback, this, delay, nsITimer::TYPE_ONE_SHOT, "PresShell::sPaintSuppressionCallback"); - - mPaintSuppressionExpectTime = TimeStamp::Now() + TimeDuration::FromMilliseconds(delay); } } @@ -6517,8 +6515,6 @@ PresShell::Paint(nsView* aViewToPaint, 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 @@ -11536,15 +11532,3 @@ nsIPresShell::HasRuleProcessorUsedByMultipleStyleSets(uint32_t aSheetType, } return NS_OK; } - -void -PresShell::CheckIfTimeToUnsuppressPainting() -{ - if (!mPaintingSuppressed) { - return; - } - - if (TimeStamp::Now() >= mPaintSuppressionExpectTime) { - UnsuppressPainting(); - } -} diff --git a/layout/base/nsPresShell.h b/layout/base/nsPresShell.h index f7ca11ee0748..f1c8a62e397a 100644 --- a/layout/base/nsPresShell.h +++ b/layout/base/nsPresShell.h @@ -422,8 +422,6 @@ public: void SetNextPaintCompressed() { mNextPaintCompressed = true; } - virtual void CheckIfTimeToUnsuppressPainting() override; - protected: virtual ~PresShell(); @@ -951,7 +949,6 @@ protected: // or all frames are constructed, we won't paint anything but // our background and scrollbars. nsCOMPtr mPaintSuppressionTimer; - mozilla::TimeStamp mPaintSuppressionExpectTime; nsCOMPtr mDelayedPaintTimer; diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp index bb42a9fb43fe..a070f4c92f07 100644 --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -1671,8 +1671,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime) return; } - presShell->CheckIfTimeToUnsuppressPainting(); - mResizeSuppressed = false; AutoRestore restoreInRefresh(mInRefresh);