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

Issue 1549153002: Fix preferred logical widths of orthogonal writing modes (Closed)

Created:
4 years, 12 months ago by kojii
Modified:
4 years, 10 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix preferred logical widths of orthogonal writing modes To compute preferred logical widths of elements with orthogonal writing modes, this patch keeps track of all orthogonal writing mode roots in documents, and layout them before computing preferred widths. OrthogonalWritingModeRootList keeps a list of orthogonal writing mode roots in FrameView, and layout them in the depth order. Part of LayoutSubtreeRootList was extracted to DepthOrderedLayoutObjectList to share the code. LayoutBox adds or removes themselves to/from the list as needed in insertedIntoTree(), willBeRemovedFromTree(), and styleDidChange(). FrameView::performLayout() layouts them in the deepest-first order before computing preferred widths, so that orthogonal children are !needsLayout() and have logicalHeight() available when preferred logical widths are needed. This patch makes the previous partial fix for shrink-to-fit inline-block[1] unnecessary, so the code and flags added in the patch are removed. [1] https://codereview.chromium.org/1121173002/ BUG=550963, 473429 Committed: https://crrev.com/3d7b19bbee5aac29c8efa9df62f08264c478041b Cr-Commit-Position: refs/heads/master@{#373144}

Patch Set 1 #

Patch Set 2 : Remove invalid ASSERT #

Patch Set 3 : Always call computeLogicalHeight #

Patch Set 4 : Misc cleanup #

Patch Set 5 : Cleanup, fix typo #

Patch Set 6 : TestExpectations #

Total comments: 6

Patch Set 7 : Comments updated and rebase, remove 2 NeedsRebaseline suspecting flaky on the last run #

Patch Set 8 : Fix comment in LayoutState.h #

Patch Set 9 : Rebase (merge conflict resolved) #

Patch Set 10 : Rebase (merge conflict resolved) #

Total comments: 6

Patch Set 11 : esprehn review #

Patch Set 12 : Further cleanup #

Patch Set 13 : Support remove during iteration #

Patch Set 14 : Fix typo #

Patch Set 15 : Prohibit modify while iterating #

Patch Set 16 : Allow call to remove() while iterating as long as it doesn't actually remove #

Total comments: 8

Patch Set 17 : leviw review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -130 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/css3/flexbox/intrinsic-width-orthogonal-writing-mode.html View 1 chunk +1 line, -7 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +38 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LayoutSubtreeRootList.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -48 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LayoutSubtreeRootList.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -35 lines 0 comments Download
A third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +73 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +54 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +39 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutState.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 37 (9 generated)
kojii
PTAL. The one we discussed in BlinkOn5. Appreciate feedback in advance, there are some code ...
4 years, 11 months ago (2015-12-31 09:25:55 UTC) #6
kojii
Gentle reminder after the vacation.
4 years, 11 months ago (2016-01-08 19:46:21 UTC) #7
cbiesinger
OK, this looks essentially right to me, though I haven't done a detailed review yet. ...
4 years, 11 months ago (2016-01-15 05:31:47 UTC) #8
kojii
Thank you for reviewing this! On 2016/01/15 05:31:47, cbiesinger wrote: > OK, this looks essentially ...
4 years, 11 months ago (2016-01-15 09:09:11 UTC) #9
ojan
Agree that this is essentially right. Christian and/or Levi should probably do the detailed review, ...
4 years, 11 months ago (2016-01-22 02:22:35 UTC) #10
kojii
Thank you Ojan for having a look, replies inline: https://codereview.chromium.org/1549153002/diff/100001/third_party/WebKit/Source/core/frame/FrameView.cpp File third_party/WebKit/Source/core/frame/FrameView.cpp (right): https://codereview.chromium.org/1549153002/diff/100001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode1724 third_party/WebKit/Source/core/frame/FrameView.cpp:1724: ...
4 years, 11 months ago (2016-01-22 02:33:51 UTC) #11
leviw_travelin_and_unemployed
On 2016/01/22 at 02:33:51, kojii wrote: > Thank you Ojan for having a look, replies ...
4 years, 11 months ago (2016-01-22 02:51:34 UTC) #12
kojii
On 2016/01/22 02:51:34, leviw wrote: > > > https://codereview.chromium.org/1549153002/diff/100001/third_party/WebKit/Source/core/frame/FrameView.cpp#newcode1727 > > third_party/WebKit/Source/core/frame/FrameView.cpp:1727: LayoutState > layoutState(*root); ...
4 years, 11 months ago (2016-01-22 06:57:39 UTC) #13
leviw_travelin_and_unemployed
On 2016/01/22 at 06:57:39, kojii wrote: > On 2016/01/22 02:51:34, leviw wrote: > > > ...
4 years, 11 months ago (2016-01-22 07:01:17 UTC) #14
kojii
On 2016/01/22 07:01:17, leviw wrote: > > I was thinking of this: > https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/layout/LayoutState.h&q=layoutstate.h&sq=package:chromium&type=cs&l=71 ahh, ...
4 years, 11 months ago (2016-01-22 07:41:13 UTC) #15
esprehn
The list should not be mutable when iterating, you don't need that complexity. You just ...
4 years, 10 months ago (2016-01-31 00:44:56 UTC) #16
kojii
Thank you for the review. On 2016/01/31 at 00:44:56, esprehn wrote: > The list should ...
4 years, 10 months ago (2016-01-31 01:12:20 UTC) #17
esprehn
I'd suggest having getSorted() which caches the list and returns a reference to a Vector, ...
4 years, 10 months ago (2016-01-31 01:15:21 UTC) #18
kojii
On 2016/01/31 at 01:15:21, esprehn wrote: > I'd suggest having getSorted() which caches the list ...
4 years, 10 months ago (2016-01-31 01:21:35 UTC) #19
esprehn
I guess there's some random cases where the layout tree can be modified during layout, ...
4 years, 10 months ago (2016-01-31 01:25:32 UTC) #20
leviw_travelin_and_unemployed
On 2016/01/31 at 01:21:35, kojii wrote: > On 2016/01/31 at 01:15:21, esprehn wrote: > > ...
4 years, 10 months ago (2016-01-31 01:33:10 UTC) #21
kojii
On 2016/01/31 01:33:10, leviw wrote: > On 2016/01/31 at 01:21:35, kojii wrote: > > On ...
4 years, 10 months ago (2016-01-31 01:35:43 UTC) #22
kojii
PTAL. Two new findings: 1. The distinction of get/take is removed, since LayoutSubtreeRoot always clear ...
4 years, 10 months ago (2016-01-31 23:00:03 UTC) #25
kojii
PTAL. * Removed support for removal-while-iterating. * Debug ASSERT is still there. Release is likely ...
4 years, 10 months ago (2016-02-01 00:57:03 UTC) #26
kojii
Ah, I have to allow calling remove() as long as it doesn't actually remove. Or ...
4 years, 10 months ago (2016-02-01 02:41:47 UTC) #27
leviw_travelin_and_unemployed
On 2016/02/01 at 02:41:47, kojii wrote: > Ah, I have to allow calling remove() as ...
4 years, 10 months ago (2016-02-01 05:41:37 UTC) #28
kojii
On 2016/02/01 at 05:41:37, leviw wrote: > On 2016/02/01 at 02:41:47, kojii wrote: > > ...
4 years, 10 months ago (2016-02-01 05:53:03 UTC) #29
leviw_travelin_and_unemployed
Couple little things. https://codereview.chromium.org/1549153002/diff/320001/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h File third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h (right): https://codereview.chromium.org/1549153002/diff/320001/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h#newcode27 third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h:27: ASSERT(!m_assertOnModify); Instead of needing this bit, ...
4 years, 10 months ago (2016-02-02 05:03:40 UTC) #30
kojii
All done, thank you. PTAL. https://codereview.chromium.org/1549153002/diff/320001/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h File third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h (right): https://codereview.chromium.org/1549153002/diff/320001/third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h#newcode27 third_party/WebKit/Source/core/layout/DepthOrderedLayoutObjectList.h:27: ASSERT(!m_assertOnModify); On 2016/02/02 at ...
4 years, 10 months ago (2016-02-02 23:32:50 UTC) #31
leviw_travelin_and_unemployed
lgtm
4 years, 10 months ago (2016-02-03 00:15:52 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1549153002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1549153002/340001
4 years, 10 months ago (2016-02-03 02:52:42 UTC) #34
commit-bot: I haz the power
Committed patchset #17 (id:340001)
4 years, 10 months ago (2016-02-03 03:00:34 UTC) #35
commit-bot: I haz the power
4 years, 10 months ago (2016-02-03 03:01:30 UTC) #37
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/3d7b19bbee5aac29c8efa9df62f08264c478041b
Cr-Commit-Position: refs/heads/master@{#373144}

Powered by Google App Engine
This is Rietveld 408576698