Bug 1356705 - Update range when an async smooth scroll is interrupted with a new scroll. r?kip draft
authorTimothy Nikkel <tnikkel@gmail.com>
Fri, 28 Apr 2017 01:52:00 -0400
changeset 619930 1fe3f4caf2b5a998874fe295021795a9de5f2bcf
parent 619929 f39457bd981bc292f74741d4ea0431bfe9725bbe
child 619931 6913e1e2937f989c960ad17de1384583d04841c1
push id71871
push usermconley@mozilla.com
push dateWed, 02 Aug 2017 21:18:07 +0000
reviewerskip
bugs1356705
milestone57.0a1
Bug 1356705 - Update range when an async smooth scroll is interrupted with a new scroll. r?kip MozReview-Commit-ID: 3iU6oJz8O6O
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2348,17 +2348,18 @@ ScrollFrameHelper::ScrollToWithOrigin(ns
 
         if (!mAsyncSmoothMSDScroll->SetRefreshObserver(this)) {
           // Observer setup failed. Scroll the normal way.
           CompleteAsyncScroll(range, aOrigin);
           return;
         }
       } else {
         // A previous smooth MSD scroll is still in progress, so we just need to
-        // update its destination.
+        // update its range and destination.
+        mAsyncSmoothMSDScroll->SetRange(GetScrollRangeForClamping());
         mAsyncSmoothMSDScroll->SetDestination(mDestination);
       }
 
       return;
     } else {
       if (mAsyncSmoothMSDScroll) {
         currentVelocity = mAsyncSmoothMSDScroll->GetVelocity();
         mAsyncSmoothMSDScroll = nullptr;