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

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: nits Created 4 years, 6 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 121a539e8b5ecfe89f42c7c966efc92d8a911dcf..8f22360dea8d35708c9ff27ffa3397bc45c148fd 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() != BoxPackStart)
|| (!style()->isLeftToRightDirection() && style()->boxPack() != BoxPackEnd))) {
// 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() != BoxPackStart && remainingSpace > 0) {
// Children must be repositioned.
LayoutUnit offset;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698