Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp

Issue 1930183002: Refactor scroll updates during flexbox layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@rtl-scroll-origin
Patch Set: rebase + nits Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
index a525e0c9622fd8574d38b8b00395e7570efaaddf..e3552d8e1353d11578e8c4792711426bae9572d6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
@@ -423,7 +423,7 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
bool haveFlex = false, flexingChildren = false;
gatherFlexChildrenInfo(iterator, relayoutChildren, highestFlexGroup, lowestFlexGroup, haveFlex);
- LayoutBlock::startDelayUpdateScrollInfo();
+ PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope;
// We do 2 passes. The first pass is simply to lay everyone out at
// their preferred widths. The second pass handles flexing the children.
@@ -646,8 +646,6 @@ void LayoutDeprecatedFlexibleBox::layoutHorizontalBox(bool relayoutChildren)
}
} while (haveFlex);
- LayoutBlock::finishDelayUpdateScrollInfo(nullptr, nullptr);
-
if (remainingSpace > 0 && ((style()->isLeftToRightDirection() && style()->boxPack() != Start)
|| (!style()->isLeftToRightDirection() && style()->boxPack() != End))) {
// Children must be repositioned.
@@ -723,7 +721,7 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
if (haveLineClamp)
applyLineClamp(iterator, relayoutChildren);
- LayoutBlock::startDelayUpdateScrollInfo();
+ PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope;
// We do 2 passes. The first pass is simply to lay everyone out at
// their preferred widths. The second pass handles flexing the children.
@@ -897,8 +895,6 @@ void LayoutDeprecatedFlexibleBox::layoutVerticalBox(bool relayoutChildren)
}
} while (haveFlex);
- LayoutBlock::finishDelayUpdateScrollInfo(nullptr, nullptr);
-
if (style()->boxPack() != Start && remainingSpace > 0) {
// Children must be repositioned.
LayoutUnit offset;

Powered by Google App Engine
This is Rietveld 408576698