Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
index 957be040ad0b49d213cc5de46cabd659900de7d3..e9597e14d4703f00d72f9b5c446f7785633387cd 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp |
@@ -399,7 +399,7 @@ void LayoutBlock::layout() { |
bool needsScrollAnchoring = |
hasOverflowClip() && getScrollableArea()->shouldPerformScrollAnchoring(); |
if (needsScrollAnchoring) |
- getScrollableArea()->scrollAnchor()->save(); |
+ getScrollableArea()->scrollAnchor()->notifyBeforeLayout(); |
// Table cells call layoutBlock directly, so don't add any logic here. Put |
// code into layoutBlock(). |
@@ -412,16 +412,6 @@ void LayoutBlock::layout() { |
clearLayoutOverflow(); |
invalidateBackgroundObscurationStatus(); |
- |
- // If clamping is delayed, we will restore in |
- // PaintLayerScrollableArea::clampScrollPositionsAfterLayout. |
- // Restoring during the intermediate layout may clamp the scroller to the |
- // wrong bounds. |
- bool clampingDelayed = PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
- clampingIsDelayed(); |
- if (needsScrollAnchoring && !clampingDelayed) |
- getScrollableArea()->scrollAnchor()->restore(); |
- |
m_heightAvailableToChildrenChanged = false; |
} |