Bug 1356705 - Update range when an async smooth scroll is interrupted with a new scroll. r?kip
MozReview-Commit-ID: 3iU6oJz8O6O
--- 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;