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
--- 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;