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

Issue 2745973002: [LayoutNG] Implement atomic inlines for LayoutNGInline (Closed)

Created:
3 years, 9 months ago by kojii
Modified:
3 years, 9 months ago
CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, dgrogan+ng_chromium.org, eae+blinkwatch, glebl+reviews_chromium.org, jchaffraix+rendering, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[LayoutNG] Implement atomic inlines for LayoutNGInline This patch implements the initial support for atomic inlines in LayoutNGInline. Atomic inlines are the first type of objects in LayoutNGInline that needs be laid out to compute in-flow inline size. NGLineBuilder now keeps NGLayoutResult for atomic inlines while it builds a line box. Some tests turned from false-passes to real-failures. Because atomic inlines were not rendered before this patch, tests using images and inline-blocks passed by comparing blank result with blank reference. Some work are not included in this patch and will follow, such as: * Keep NGBlockNode for atomic inlines in NGLayoutInlineItem. * Use NGLayoutResult not only for layout but also for fragment generation. * Margin, padding, borders. * BreakToken if we support breaking atomic inlines[1]. * ...and obviously more. [1] https://github.com/w3c/csswg-drafts/issues/1111 BUG=636993 Review-Url: https://codereview.chromium.org/2745973002 Cr-Commit-Position: refs/heads/master@{#457673} Committed: https://chromium.googlesource.com/chromium/src/+/45bfc6a336b60497cb564ebfac61f8858664e86a

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Minor fix #

Patch Set 4 : Rebase #

Patch Set 5 : WIP #

Total comments: 3

Patch Set 6 : Move NGLayoutResult to NGLineBuilder #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 9

Patch Set 10 : ikilpatrick review #

Total comments: 2

Patch Set 11 : Use NGBoxFragment in PlaceAtomicInline #

Total comments: 14

Patch Set 12 : ikilpatrick review #

Total comments: 10

Patch Set 13 : ikilpatrick nits #

Patch Set 14 : Resolved merge conflicts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -42 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +15 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_inline_node.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_line_builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +20 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +117 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_writing_mode.h View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 67 (36 generated)
kojii
Emil, could you advise? Still WIP, but I chose to add LayoutResult to NGLayoutInlineItem. This ...
3 years, 9 months ago (2017-03-13 01:12:03 UTC) #3
eae
The overall implementation looks good but the LayoutResult mapping has some problems as you identified. ...
3 years, 9 months ago (2017-03-13 01:17:15 UTC) #5
ikilpatrick
+morten; need to decide if we are going to allow fragmenting of atomic inlines - ...
3 years, 9 months ago (2017-03-15 16:39:41 UTC) #7
kojii
https://codereview.chromium.org/2745973002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2745973002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode320 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:320: LayoutAtomicInlines(*constraint_space); It'd be great if we can, though I ...
3 years, 9 months ago (2017-03-15 17:30:28 UTC) #8
ikilpatrick
On 2017/03/15 17:30:28, kojii wrote: > https://codereview.chromium.org/2745973002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc > File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): > > https://codereview.chromium.org/2745973002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode320 > ...
3 years, 9 months ago (2017-03-15 17:56:31 UTC) #9
kojii
On 2017/03/15 at 17:56:31, ikilpatrick wrote: > > I'd like us to support BreakTokens for ...
3 years, 9 months ago (2017-03-15 18:29:04 UTC) #10
kojii
PTAL. PS6 moved NGLayoutResult to NGLineBuilder. This supports break tokens better, since we layout atomic ...
3 years, 9 months ago (2017-03-15 18:44:48 UTC) #12
kojii
linebox fragment is likely to conflict with this, I'll think about API re-unify first.
3 years, 9 months ago (2017-03-15 18:54:41 UTC) #13
mstensho (USE GERRIT)
Good news! Atomic inlines should never be fragmented. :) https://codereview.chromium.org/2745973002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2745973002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode320 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:320: ...
3 years, 9 months ago (2017-03-16 09:20:15 UTC) #16
kojii
Thank you for the pointer to the newer spec, Morten. The text make sense to ...
3 years, 9 months ago (2017-03-16 09:43:17 UTC) #17
mstensho (USE GERRIT)
On 2017/03/16 09:43:17, kojii wrote: > Thank you for the pointer to the newer spec, ...
3 years, 9 months ago (2017-03-16 10:01:16 UTC) #18
kojii
On 2017/03/16 at 10:01:16, mstensho wrote: > On 2017/03/16 09:43:17, kojii wrote: > > Thank ...
3 years, 9 months ago (2017-03-16 11:32:46 UTC) #21
kojii
Filed an issue for clarification: https://github.com/w3c/csswg-drafts/issues/1111 Please feel free to join there, or keep discussion ...
3 years, 9 months ago (2017-03-16 14:50:37 UTC) #27
kojii
PTAL. I think PS9 is ready for review, and at this level, whether to allow ...
3 years, 9 months ago (2017-03-16 15:45:48 UTC) #33
ikilpatrick
On 2017/03/16 15:45:48, kojii wrote: > PTAL. I think PS9 is ready for review, and ...
3 years, 9 months ago (2017-03-16 15:58:57 UTC) #34
kojii
On 2017/03/16 at 15:58:57, ikilpatrick wrote: > On 2017/03/16 15:45:48, kojii wrote: > > PTAL. ...
3 years, 9 months ago (2017-03-16 16:12:24 UTC) #35
ikilpatrick
https://codereview.chromium.org/2745973002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2745973002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode246 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:246: NGConstraintSpaceBuilder constraint_space_builder(&parent_space); we should do this in the parents ...
3 years, 9 months ago (2017-03-16 16:15:41 UTC) #36
ikilpatrick
On 2017/03/16 16:12:24, kojii wrote: > On 2017/03/16 at 15:58:57, ikilpatrick wrote: > > On ...
3 years, 9 months ago (2017-03-16 16:17:51 UTC) #37
kojii
On 2017/03/16 at 16:17:51, ikilpatrick wrote: > FF's behaviour seems more correct; I think we ...
3 years, 9 months ago (2017-03-16 16:48:24 UTC) #40
kojii
Thank you for your prompt review, all done. See inline. https://codereview.chromium.org/2745973002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2745973002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode246 ...
3 years, 9 months ago (2017-03-16 16:48:45 UTC) #41
kojii
https://codereview.chromium.org/2745973002/diff/220001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc File third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc (right): https://codereview.chromium.org/2745973002/diff/220001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc#newcode431 third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc:431: if (IsHorizontalWritingMode()) { ah, wait, I should use NGBoxFragment ...
3 years, 9 months ago (2017-03-16 16:53:42 UTC) #42
kojii
https://codereview.chromium.org/2745973002/diff/220001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc File third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc (right): https://codereview.chromium.org/2745973002/diff/220001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc#newcode431 third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc:431: if (IsHorizontalWritingMode()) { On 2017/03/16 at 16:53:41, kojii wrote: ...
3 years, 9 months ago (2017-03-16 17:00:31 UTC) #45
ikilpatrick
https://codereview.chromium.org/2745973002/diff/240001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc File third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc (right): https://codereview.chromium.org/2745973002/diff/240001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc#newcode174 third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc:174: layout_result = node->Layout(constraint_space.get()); just: return node->Layout(constraint_space.get()); https://codereview.chromium.org/2745973002/diff/240001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc#newcode286 third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc:286: LayoutUnit ...
3 years, 9 months ago (2017-03-16 17:53:19 UTC) #46
ikilpatrick
https://codereview.chromium.org/2745973002/diff/240001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2745973002/diff/240001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode312 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:312: sizes.max_content += line_builder.InlineSize(item); this will need to be changed ...
3 years, 9 months ago (2017-03-16 17:55:16 UTC) #47
kojii
All done, thank you for your prompt review again. https://codereview.chromium.org/2745973002/diff/240001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc File third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc (right): https://codereview.chromium.org/2745973002/diff/240001/third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc#newcode174 third_party/WebKit/Source/core/layout/ng/ng_line_builder.cc:174: ...
3 years, 9 months ago (2017-03-16 18:19:29 UTC) #50
ikilpatrick
lgtm w/ nits. Thanks. https://codereview.chromium.org/2745973002/diff/260001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2745973002/diff/260001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode312 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:312: sizes.max_content += line_builder.InlineSize(item); add todo ...
3 years, 9 months ago (2017-03-16 18:26:16 UTC) #51
kojii
https://codereview.chromium.org/2745973002/diff/260001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2745973002/diff/260001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode312 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:312: sizes.max_content += line_builder.InlineSize(item); On 2017/03/16 at 18:26:15, ikilpatrick wrote: ...
3 years, 9 months ago (2017-03-16 19:16:33 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2745973002/280001
3 years, 9 months ago (2017-03-17 01:42:09 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2745973002/300001
3 years, 9 months ago (2017-03-17 02:02:19 UTC) #63
commit-bot: I haz the power
Committed patchset #14 (id:300001) as https://chromium.googlesource.com/chromium/src/+/45bfc6a336b60497cb564ebfac61f8858664e86a
3 years, 9 months ago (2017-03-17 03:34:40 UTC) #66
kojii
3 years, 9 months ago (2017-03-22 08:43:10 UTC) #67
Message was sent while issue was closed.
FYI, fantasai comment on the issue:

I think we made this a MAY case so that an implementation could fragment an
inline block, if it wanted to--didn't want to forbid it, since that can be a
better result than what the spec requirs. The alternatives are to clip the line
box it's in or to graphically slice said line box and all its contents.

https://github.com/w3c/csswg-drafts/issues/1111#issuecomment-287677936

Powered by Google App Engine
This is Rietveld 408576698