Bug 1517103 - Keep the refresh driver ticking when there are pending visual viewport events. r=botond
authorJan Henning <jh+bugzilla@buttercookie.de>
Thu, 03 Jan 2019 13:16:20 +0000
changeset 509517 9edf84bb874d3a89654ef96fe0bbf807a081f4fd
parent 509516 ef66631097dd8c2ab03e7f521060fe0f7427c3ed
child 509518 afe5d9b5a7f4f065d04d3bd2dff6962ae8d1b593
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1517103
milestone66.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 1517103 - Keep the refresh driver ticking when there are pending visual viewport events. r=botond Differential Revision: https://phabricator.services.mozilla.com/D15559
layout/base/nsRefreshDriver.cpp
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -1713,17 +1713,19 @@ void nsRefreshDriver::Tick(VsyncId aId, 
     mRootRefresh->RemoveRefreshObserver(this, FlushType::Style);
     mRootRefresh = nullptr;
   }
   mSkippedPaints = false;
   mWarningThreshold = 1;
 
   nsCOMPtr<nsIPresShell> presShell = mPresContext->GetPresShell();
   if (!presShell ||
-      (!HasObservers() && !HasImageRequests() && mScrollEvents.IsEmpty())) {
+      (!HasObservers() && !HasImageRequests() &&
+       mVisualViewportResizeEvents.IsEmpty() && mScrollEvents.IsEmpty() &&
+       mVisualViewportScrollEvents.IsEmpty())) {
     // Things are being destroyed, or we no longer have any observers.
     // We don't want to stop the timer when observers are initially
     // removed, because sometimes observers can be added and removed
     // 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();