Bug 1104356 - When doing a smooth scroll on a non-APZ'd scrollframe, fall back to the main thread machinery. r?kip
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2147,17 +2147,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()) {
if (mApzSmoothScrollDestination == Some(mDestination) &&
mScrollGeneration == sScrollGenerationCounter) {
// If we already sent APZ a smooth-scroll request to this
// destination with this generation (i.e. it was the last request
// we sent), then don't send another one because it is redundant.
// This is to avoid a scenario where pages do repeated scrollBy
// calls, incrementing the generation counter, and blocking APZ from
// syncing the scroll offset back to the main thread.