| 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 e9b66e54782fc5b0fd8fcaeb40c89dc67d7cc1cc..2e58ffe80a1474b3360d6243e7b8270edd086158 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
|
| @@ -380,7 +380,10 @@ void LayoutBlock::layout()
|
|
|
| invalidateBackgroundObscurationStatus();
|
|
|
| - if (needsScrollAnchoring)
|
| + // 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::DelayScrollPositionClampScope::clampingIsDelayed();
|
| + if (needsScrollAnchoring && !clampingDelayed)
|
| getScrollableArea()->scrollAnchor().restore();
|
|
|
| m_heightAvailableToChildrenChanged = false;
|
|
|