Index: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
index 60e26e7f06221dc65c16a6a16a84f84d02d69581..269315c8c8c2b9484cf5b7e4a151c033feff5db1 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp |
@@ -459,7 +459,7 @@ void PaintLayerScrollableArea::updateScrollOffset(const ScrollOffset& newOffset, |
// Clear the scroll anchor, unless it is the reason for this scroll. |
if (RuntimeEnabledFeatures::scrollAnchoringEnabled() && |
- scrollType != AnchoringScroll) |
+ scrollType != AnchoringScroll && scrollType != ClampingScroll) |
scrollAnchor()->clear(); |
} |
@@ -786,14 +786,10 @@ void PaintLayerScrollableArea::clampScrollOffsetsAfterLayout() { |
return; |
} |
- // Restore before clamping because clamping clears the scroll anchor. |
- if (shouldPerformScrollAnchoring()) |
- m_scrollAnchor.restore(); |
- |
if (scrollOriginChanged()) |
setScrollOffsetUnconditionally(clampScrollOffset(scrollOffset())); |
else |
- ScrollableArea::setScrollOffset(scrollOffset(), ProgrammaticScroll); |
+ ScrollableArea::setScrollOffset(scrollOffset(), ClampingScroll); |
setNeedsScrollOffsetClamp(false); |
resetScrollOriginChanged(); |