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

Issue 1121173002: Fix shrink-to-fit when children's writing-mode is orthogonal (Closed)

Created:
5 years, 7 months ago by kojii
Modified:
5 years, 3 months ago
Reviewers:
cbiesinger, esprehn, eae, ojan
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix shrink-to-fit when children's writing-mode is orthogonal This patch fixes the shrink-to-fit algorithm when descendants of the element have orthogonal writing-mode. Strictly speaking, as the [spec] defines, min-content width of the element must be determined by logicalHeight of children. This would require either "layout during preferred width calculation" or "multiple layout passes." In most cases, however, descendants are not mixed. Since orthogonal descendants need re-layout only when the parent's logicalHeight changes, this patch updates logicalWidth after children are laid out but does not re-layout descendants. Table cells with orthogonal descendants require additional work and the fix is not included in this CL. 001q-001x are tests for table cells. css3/flexbox/flex-flow-margins-auto-size.html that currently expects to fail passes with this patch: http://wkb.ug/70769 [spec]: http://dev.w3.org/csswg/css-writing-modes-3/#orthogonal-flows BUG=410320, 359604 TEST=css3/flexbox/flex-flow-margins-auto-size.html TEST=imported/csswg-test/css-writing-modes-3/orthogonal-parent-shrink-to-fit-001.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201370

Patch Set 1 #

Patch Set 2 : Tests and test results updated #

Total comments: 1

Patch Set 3 : minMaxPreferredLogicalWidth moved to LayoutBlock #

Patch Set 4 : Approach 2 -- no layout() #

Patch Set 5 : Rebase #

Patch Set 6 : Use goto instead of loop to make the diff clearer #

Patch Set 7 : float tests added + cleanup a bit #

Total comments: 2

Patch Set 8 : Change goto to return false, add test cases #

Patch Set 9 : Rebase #

Patch Set 10 : Remove bogus assert of my own #

Patch Set 11 : Rebase #

Patch Set 12 : Fix nested case, add test #

Patch Set 13 : Cleanup, stop using continue, tests moved to imported/csswg-test #

Patch Set 14 : Limit to 2 passes + Rebase #

Patch Set 15 : Rebase #

Patch Set 16 : LayoutBlockFlow no longer require re-layout #

Patch Set 17 : Rebase after merge conflicts #

Patch Set 18 : Remove table cell case #

Patch Set 19 : Resolve merge conflicts #

Patch Set 20 : Rebase and TestExpectations #

Patch Set 21 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -123 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +10 lines, -25 lines 0 comments Download
M LayoutTests/css3/flexbox/flex-flow-margins-auto-size.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/css3/flexbox/flex-flow-margins-auto-size-expected.txt View 1 1 chunk +16 lines, -96 lines 0 comments Download
M Source/core/layout/LayoutBlock.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +5 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (5 generated)
kojii
PTAL!
5 years, 7 months ago (2015-05-03 17:28:48 UTC) #2
eae
https://codereview.chromium.org/1121173002/diff/20001/Source/core/layout/LayoutObject.cpp File Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/1121173002/diff/20001/Source/core/layout/LayoutObject.cpp#newcode803 Source/core/layout/LayoutObject.cpp:803: const_cast<LayoutObject*>(this)->layoutIfNeeded(); I'd rather try to avoid calling layout during ...
5 years, 7 months ago (2015-05-04 00:06:59 UTC) #3
kojii
On 2015/05/04 00:06:59, eae wrote: Hm, right. I suppose you understand this is unusual anyway, ...
5 years, 7 months ago (2015-05-04 06:11:12 UTC) #4
kojii
Not for landing but could you PTAL? I think this patch gives the idea of ...
5 years, 7 months ago (2015-05-04 20:42:25 UTC) #5
kojii
Oh, the diff is too hard to read due to changed indentations. I switched to ...
5 years, 7 months ago (2015-05-04 20:54:26 UTC) #6
kojii
+ojan, esprehn, cbiesinger PS3 layouts children first in LayoutBlock::minMaxPreferredLogicalWidthOfChild (LayoutBlock.cpp). PS7 is another approach; do ...
5 years, 7 months ago (2015-05-13 15:56:10 UTC) #8
esprehn
https://codereview.chromium.org/1121173002/diff/120001/Source/core/layout/LayoutBlockFlow.cpp File Source/core/layout/LayoutBlockFlow.cpp (right): https://codereview.chromium.org/1121173002/diff/120001/Source/core/layout/LayoutBlockFlow.cpp#newcode445 Source/core/layout/LayoutBlockFlow.cpp:445: goto recalcLogicalWidthAfterLayoutChildren; I think you can just return false ...
5 years, 7 months ago (2015-05-21 01:52:54 UTC) #9
kojii
PTAL. Returning false works good for LayoutBlockFlow. For table, I added a loop counter to ...
5 years, 7 months ago (2015-05-23 00:22:47 UTC) #10
ojan
This doesn't work if you have a shrink-wrapped container around your test cases (e.g. make ...
5 years, 7 months ago (2015-05-23 00:56:22 UTC) #11
kojii
On 2015/05/23 00:56:22, ojan wrote: > This doesn't work if you have a shrink-wrapped container ...
5 years, 7 months ago (2015-05-25 03:55:28 UTC) #12
kojii
PTAL. I did: * Cleanup of comments and removed #ifdef for testing. * Made LayoutTable::layout() ...
5 years, 6 months ago (2015-06-03 18:43:53 UTC) #13
ojan
Sorry, I've been trying to make the time to do this review and I really ...
5 years, 6 months ago (2015-06-10 02:56:22 UTC) #14
kojii
On 2015/06/10 at 02:56:22, ojan wrote: > Sorry, I've been trying to make the time ...
5 years, 6 months ago (2015-06-10 18:14:13 UTC) #15
ojan
You hit the nail on the head. My inclination is that vertical flow for non-CJK ...
5 years, 6 months ago (2015-06-10 18:33:32 UTC) #16
kojii
On 2015/06/10 at 18:33:32, ojan wrote: > You hit the nail on the head. My ...
5 years, 6 months ago (2015-06-10 18:46:04 UTC) #17
kojii
ojan@, PTAL. This gets much simpler, no longer require either "layout in preferred width" nor ...
5 years, 5 months ago (2015-07-14 17:43:26 UTC) #18
kojii
eae@, PTAL.
5 years, 4 months ago (2015-08-19 15:10:28 UTC) #19
eae
Much cleaner, thank you for taking all the feedback into consideration and working with Mozilla ...
5 years, 3 months ago (2015-08-27 18:24:46 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1121173002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1121173002/400001
5 years, 3 months ago (2015-08-28 01:06:26 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/96930)
5 years, 3 months ago (2015-08-28 02:11:13 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1121173002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1121173002/400001
5 years, 3 months ago (2015-08-28 03:38:38 UTC) #26
commit-bot: I haz the power
5 years, 3 months ago (2015-08-28 04:53:12 UTC) #27
Message was sent while issue was closed.
Committed patchset #21 (id:400001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201370

Powered by Google App Engine
This is Rietveld 408576698