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

Issue 1930183002: Refactor scroll updates during flexbox layout. (Closed)

Created:
4 years, 7 months ago by szager1
Modified:
4 years, 6 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src@rtl-scroll-origin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor scroll updates during flexbox layout. When there are nested flexboxes, the current code does some O(N^2) work to update scrolling information after flexing has finished. This change streamlines the process for performing flex layout and updating scrollbars into three distinct phases, controlled by the highest-level flexbox in the layout tree: 1. Perform flex layout on descendants; any blocks with overflow:auto scrollbars may add/remove scrollbars, but they will not run the normal second-pass layout after changing scrollbars, and they will not clamp their existing scroll positions. 2. If, during the first pass, any descendant added or removed scrollbars, run a second flex layout pass, but don't allow any descendants to add or remove scrollbars. 3. After the second pass, go through and clamp the scroll positions on all scrolling descendants. BUG=593209, 600036 Committed: https://crrev.com/aff9f64394945f24400021fdec18dbd70eee3e14 Cr-Commit-Position: refs/heads/master@{#397888}

Patch Set 1 #

Patch Set 2 : Fix layout invalidation reason #

Total comments: 23

Patch Set 3 : rebase + nits #

Total comments: 5

Patch Set 4 : nit #

Patch Set 5 : rebase #

Patch Set 6 : Don't detach scrollbars that need reconstruction #

Total comments: 6

Patch Set 7 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -168 lines) Patch
A + third_party/WebKit/LayoutTests/css3/flexbox/scrollbars-auto.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/LayoutTests/css3/flexbox/scrollbars-auto-expected.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.h View 1 2 3 4 1 chunk +0 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 2 3 4 3 chunks +2 lines, -56 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp View 1 2 3 4 4 chunks +2 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp View 1 2 3 4 2 chunks +8 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/InlineBox.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h View 1 2 3 4 5 6 7 chunks +69 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp View 1 2 3 4 5 6 16 chunks +162 lines, -65 lines 0 comments Download

Messages

Total messages: 33 (13 generated)
szager1
4 years, 7 months ago (2016-04-28 21:30:34 UTC) #3
leviw_travelin_and_unemployed
https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp (right): https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp#newcode312 third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp:312: PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope; Grumble grumble DeprecatedFlexBox :( We have tests ...
4 years, 7 months ago (2016-04-28 22:50:04 UTC) #4
cbiesinger
https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (left): https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#oldcode637 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:637: cancelProgrammaticScrollAnimation(); BTW, why did you remove this? Just because ...
4 years, 7 months ago (2016-04-29 20:02:50 UTC) #5
szager1
https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp (right): https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp#newcode312 third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp:312: PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope; On 2016/04/28 22:50:04, leviw_travelin_and_unemployed wrote: > Grumble ...
4 years, 7 months ago (2016-05-12 20:44:51 UTC) #7
leviw_travelin_and_unemployed
> https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h#newcode324 > third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h:324: void clampScrollPositionsAfterLayout(); > On 2016/04/28 22:50:04, leviw_travelin_and_unemployed wrote: > > Is ...
4 years, 7 months ago (2016-05-12 21:05:05 UTC) #8
szager1
Thinking about this a bit more, I think the change to LayoutBox::intrinsicScrollbarLogicalWidth should go in ...
4 years, 7 months ago (2016-05-12 22:23:12 UTC) #9
cbiesinger
Thanks for making the changes. See below. https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp File third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp (right): https://codereview.chromium.org/1930183002/diff/20001/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp#newcode312 third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp:312: PaintLayerScrollableArea::DelayScrollPositionClampScope delayClampScope; ...
4 years, 7 months ago (2016-05-13 19:52:48 UTC) #10
szager1
https://codereview.chromium.org/1930183002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1930183002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode796 third_party/WebKit/Source/core/layout/LayoutBox.cpp:796: if (isHorizontalWritingMode() && (style()->overflowY() == OverflowScroll || style()->overflowY() == ...
4 years, 7 months ago (2016-05-13 20:52:05 UTC) #11
cbiesinger
https://codereview.chromium.org/1930183002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1930183002/diff/40001/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode796 third_party/WebKit/Source/core/layout/LayoutBox.cpp:796: if (isHorizontalWritingMode() && (style()->overflowY() == OverflowScroll || style()->overflowY() == ...
4 years, 7 months ago (2016-05-13 21:02:13 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1930183002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1930183002/100001
4 years, 6 months ago (2016-06-02 02:40:30 UTC) #14
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 6 months ago (2016-06-02 02:40:32 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1930183002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1930183002/100001
4 years, 6 months ago (2016-06-02 03:14:51 UTC) #18
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started by full ...
4 years, 6 months ago (2016-06-02 03:14:55 UTC) #20
szager1
PTAL The add-scrollbar-width-to-intrinsic-width change landed separately, so now this is just a refactor of flex ...
4 years, 6 months ago (2016-06-02 15:52:55 UTC) #21
szager1
+skobes because scrolling
4 years, 6 months ago (2016-06-02 16:28:00 UTC) #23
eae
LGTM w/nits https://codereview.chromium.org/1930183002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/1930183002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode605 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:605: box().flipForWritingMode(m_overflowRect); It's a bit weird that InlineBox::flipForWritingMode ...
4 years, 6 months ago (2016-06-02 22:57:26 UTC) #25
szager1
https://codereview.chromium.org/1930183002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp File third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp (right): https://codereview.chromium.org/1930183002/diff/100001/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp#newcode605 third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp:605: box().flipForWritingMode(m_overflowRect); On 2016/06/02 22:57:25, eae wrote: > It's a ...
4 years, 6 months ago (2016-06-03 22:33:11 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1930183002/110001
4 years, 6 months ago (2016-06-03 22:34:34 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:110001)
4 years, 6 months ago (2016-06-04 02:05:20 UTC) #31
commit-bot: I haz the power
4 years, 6 months ago (2016-06-04 02:06:30 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/aff9f64394945f24400021fdec18dbd70eee3e14
Cr-Commit-Position: refs/heads/master@{#397888}

Powered by Google App Engine
This is Rietveld 408576698