Index: third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
index 28090ecde820d2355c97689736368741834e006b..e79b796fe2a4a138d7861da286d436b11656da5d 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp |
@@ -336,25 +336,22 @@ void LayoutFlexibleBox::layoutBlock(bool relayoutChildren) |
LayoutUnit previousHeight = logicalHeight(); |
setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight()); |
+ PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope; |
+ |
{ |
TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layoutScope); |
LayoutState state(*this, locationOffset()); |
m_numberOfInFlowChildrenOnFirstLine = -1; |
- LayoutBlock::startDelayUpdateScrollInfo(); |
- |
prepareOrderIteratorAndMargins(); |
layoutFlexItems(relayoutChildren, layoutScope); |
- |
- ScrollPositionMap scrollMap; |
- if (LayoutBlock::finishDelayUpdateScrollInfo(&layoutScope, &scrollMap)) { |
+ if (PaintLayerScrollableArea::PreventRelayoutScope::relayoutNeeded()) { |
+ PaintLayerScrollableArea::FreezeScrollbarsScope freezeScrollbarsScope; |
prepareOrderIteratorAndMargins(); |
- layoutFlexItems(false, layoutScope); |
- for (auto& entry : scrollMap) { |
- entry.key->scrollToPosition(entry.value, ScrollOffsetClamped); |
- } |
+ layoutFlexItems(true, layoutScope); |
+ PaintLayerScrollableArea::PreventRelayoutScope::resetRelayoutNeeded(); |
} |
if (logicalHeight() != previousHeight) |
@@ -849,6 +846,8 @@ void LayoutFlexibleBox::layoutFlexItems(bool relayoutChildren, SubtreeLayoutScop |
Vector<LayoutUnit, 16> childSizes; |
+ PaintLayerScrollableArea::PreventRelayoutScope preventRelayoutScope(layoutScope); |
+ |
dirtyForLayoutFromPercentageHeightDescendants(layoutScope); |
m_orderIterator.first(); |