Bug 1104356 - When doing a smooth scroll on a non-APZ'd scrollframe, fall back to the main thread machinery. r=kip a=jocheng
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 05 Feb 2016 17:09:30 -0500
changeset 292695 311b64761900
parent 292694 4394647bdf0d
child 292696 fee39861e880
push id331
push userkgupta@mozilla.com
push dateWed, 13 Apr 2016 15:41:28 +0000
reviewerskip, jocheng
bugs1104356
milestone44.0
Bug 1104356 - When doing a smooth scroll on a non-APZ'd scrollframe, fall back to the main thread machinery. r=kip a=jocheng MozReview-Commit-ID: 1wnJdBvcIx8
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2116,17 +2116,17 @@ ScrollFrameHelper::ScrollToWithOrigin(ns
         currentVelocity.height = sv.y;
         if (mAsyncScroll) {
           if (mAsyncScroll->mIsSmoothScroll) {
             currentVelocity = mAsyncScroll->VelocityAt(now);
           }
           mAsyncScroll = nullptr;
         }
 
-        if (nsLayoutUtils::AsyncPanZoomEnabled(mOuter)) {
+        if (nsLayoutUtils::AsyncPanZoomEnabled(mOuter) && WantAsyncScroll()) {
           // The animation will be handled in the compositor, pass the
           // information needed to start the animation and skip the main-thread
           // animation for this scroll.
           mLastSmoothScrollOrigin = aOrigin;
           mScrollGeneration = ++sScrollGenerationCounter;
 
           if (!nsLayoutUtils::GetDisplayPort(mOuter->GetContent())) {
             // If this frame doesn't have a displayport then there won't be an