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 f7858bf5709d610c8f1ecbe29471de3b5d911237..4edc22e0c43ca21f8aaf5818daa5a55efc862f27 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) |
@@ -851,6 +848,8 @@ void LayoutFlexibleBox::layoutFlexItems(bool relayoutChildren, SubtreeLayoutScop |
Vector<LayoutUnit, 16> childSizes; |
+ PaintLayerScrollableArea::PreventRelayoutScope preventRelayoutScope(layoutScope); |
+ |
dirtyForLayoutFromPercentageHeightDescendants(layoutScope); |
m_orderIterator.first(); |