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

Issue 2910133002: [LayoutNG] Handle empty inlines and border edges (Closed)

Created:
3 years, 6 months ago by kojii
Modified:
3 years, 6 months ago
Reviewers:
ikilpatrick, eae
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, lchoi+reviews_chromium.org, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[LayoutNG] Handle empty inlines and border edges After we supported inline margin/border/padding[1] and adding box fragments when needed[2], this patch adds a few finishing touches: 1. Creates empty box fragments when needed. [2] creates box fragments for inline boxes, but does not create when it's empty. Whether to create empty box fragments or not affects layout, since such inline boxes affects line height. The behavior isn't well defined, but there are some CSS2 tests. NG passes them now. 2. Improve "Edges" support. When an inline box was broken by line wrap or inline continuation, the broken edge should not have margins/ borders/paddings. This patch supports suppressing borders on edges. Note, computing positions for edges was done in [1]. 3. Add margins/borders/paddings to NGInlineItemResult to re-use in later phases. 4. Some minor fixes found in wpt/css/CSS2 test suites. #2 was needed because it was working magically in common cases, but #1 broke the magic. Implementing it properly also helps NG paint work. [1] https://codereview.chromium.org/2865903002 [2] https://codereview.chromium.org/2898413002 BUG=636993 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng Review-Url: https://codereview.chromium.org/2910133002 Cr-Commit-Position: refs/heads/master@{#477273} Committed: https://chromium.googlesource.com/chromium/src/+/d8dad9313c05c4fb241eb1139a3ec864199b5d96

Patch Set 1 #

Patch Set 2 : WIP #

Patch Set 3 : WIP #

Patch Set 4 : WIP #

Patch Set 5 : Cleanup #

Patch Set 6 : Cleanup #

Total comments: 4

Patch Set 7 : enum bitmasks to unsigned #

Patch Set 8 : Changed to struct #

Patch Set 9 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -159 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/geometry/ng_border_edges.h View 1 2 3 4 5 6 7 1 chunk +26 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/geometry/ng_border_edges.cc View 1 2 3 4 5 6 7 1 chunk +19 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.h View 1 2 3 4 5 6 7 7 chunks +16 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc View 1 2 3 4 5 6 7 11 chunks +55 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc View 1 2 3 4 5 6 7 8 3 chunks +19 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc View 1 2 3 4 5 6 7 8 2 chunks +24 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_box_fragment.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_box_fragment.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 50 (38 generated)
kojii
PTAL, given SetBorderEdges CL seems smooth. # sorry Ian, I'm touching line breaker a bit ...
3 years, 6 months ago (2017-05-31 15:39:15 UTC) #15
eae
https://codereview.chromium.org/2910133002/diff/100001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc (right): https://codereview.chromium.org/2910133002/diff/100001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc#newcode245 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc:245: box.SetBorderEdges(static_cast<NGBorderEdges::Logical>( We probably don't want to cast a bitfield ...
3 years, 6 months ago (2017-05-31 16:12:10 UTC) #16
eae
https://codereview.chromium.org/2910133002/diff/100001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc (right): https://codereview.chromium.org/2910133002/diff/100001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc#newcode134 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc:134: line_left_position = position + item_result.margins.inline_start; Can the margin be ...
3 years, 6 months ago (2017-05-31 16:12:43 UTC) #17
kojii
Thank you for your prompt review as always. Comments inline, patch not updated. https://codereview.chromium.org/2910133002/diff/100001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc File ...
3 years, 6 months ago (2017-05-31 16:45:52 UTC) #18
eae
On 2017/05/31 16:45:52, kojii wrote: > Thank you for your prompt review as always. Comments ...
3 years, 6 months ago (2017-06-01 20:33:53 UTC) #21
kojii
On 2017/06/01 at 20:33:53, eae wrote: > The enum defines the different edges not all ...
3 years, 6 months ago (2017-06-02 05:39:54 UTC) #25
kojii
On 2017/06/02 at 05:39:54, kojii wrote: > > Ooh, thank you, I didn't know it's ...
3 years, 6 months ago (2017-06-02 10:37:35 UTC) #30
eae
LGTM!
3 years, 6 months ago (2017-06-05 16:48:41 UTC) #36
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/2910133002/180001
3 years, 6 months ago (2017-06-06 03:09:45 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/110883) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 6 months ago (2017-06-06 03:12:56 UTC) #40
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/2910133002/200001
3 years, 6 months ago (2017-06-06 13:18:51 UTC) #47
commit-bot: I haz the power
3 years, 6 months ago (2017-06-06 13:25:13 UTC) #50
Message was sent while issue was closed.
Committed patchset #9 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/d8dad9313c05c4fb241eb1139a3e...

Powered by Google App Engine
This is Rietveld 408576698