Bug 1297419 - Ensure that APZ smooth scrolls don't get clobbered by the main thread as a side-effect of reflow. r=tnikkel
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 06 Sep 2016 14:43:41 -0400
changeset 312989 556e6c27c5ca33cd7f21bd7ad1be3c8976da909d
parent 312988 a9e15f6064208d65164c60384d763741dcc708fa
child 312990 d090231db437d7bf918f97f419c0c858882658b3
push id81509
push usercbook@mozilla.com
push dateWed, 07 Sep 2016 15:23:10 +0000
treeherdermozilla-inbound@80dccdd8c94a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1297419
milestone51.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 1297419 - Ensure that APZ smooth scrolls don't get clobbered by the main thread as a side-effect of reflow. r=tnikkel MozReview-Commit-ID: 9124WMy8SmD
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -5232,17 +5232,17 @@ ScrollFrameHelper::ReflowFinished()
 
   nsAutoScriptBlocker scriptBlocker;
   ScrollToRestoredPosition();
 
   // Clamp current scroll position to new bounds. Normally this won't
   // do anything.
   nsPoint currentScrollPos = GetScrollPosition();
   ScrollToImpl(currentScrollPos, nsRect(currentScrollPos, nsSize(0, 0)));
-  if (!mAsyncScroll && !mAsyncSmoothMSDScroll) {
+  if (!mAsyncScroll && !mAsyncSmoothMSDScroll && !mApzSmoothScrollDestination) {
     // We need to have mDestination track the current scroll position,
     // in case it falls outside the new reflow area. mDestination is used
     // by ScrollBy as its starting position.
     mDestination = GetScrollPosition();
   }
 
   if (!mUpdateScrollbarAttributes) {
     return false;