Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
index a53a7603bd935af6e556c0e1855197b420c4c62f..c3936cbacd784f5846da1c674e8217643aa71230 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
@@ -287,6 +287,8 @@ void LayoutBlockFlow::layoutBlock(bool relayoutChildren) |
LayoutAnalyzer::BlockScope analyzer(*this); |
SubtreeLayoutScope layoutScope(*this); |
+ if (scrollAnchoringEnabled() && hasOverflowClip()) |
+ scrollableArea()->scrollAnchor().save(); |
ojan
2016/02/02 06:51:01
Can you instead do this in LayoutBlock::layout()?
skobes
2016/02/02 22:39:10
I thought about this but was scared off by the com
ojan
2016/02/03 06:17:52
Yes, that way the code will work for flex/grid/etc
|
// Multiple passes might be required for column based layout. |
// The number of passes could be as high as the number of columns. |
@@ -304,6 +306,8 @@ void LayoutBlockFlow::layoutBlock(bool relayoutChildren) |
// Update our scroll information if we're overflow:auto/scroll/hidden now that we know if |
// we overflow or not. |
updateScrollInfoAfterLayout(); |
+ if (scrollAnchoringEnabled() && hasOverflowClip()) |
+ scrollableArea()->scrollAnchor().restore(); |
if (m_paintInvalidationLogicalTop != m_paintInvalidationLogicalBottom) { |
bool hasVisibleContent = style()->visibility() == VISIBLE; |