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

Issue 2865903002: [LayoutNG] Inline margin/border/padding, inter-item breaking, and tests (Closed)

Created:
3 years, 7 months ago by kojii
Modified:
3 years, 6 months ago
Reviewers:
cbiesinger, ikilpatrick, eae
CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, 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/heads/master
Project:
chromium
Visibility:
Public.

Description

[LayoutNG] Inline margin/border/padding, inter-item breaking, and tests This patch implements inline margin/border/padding. NGTextFragment is placed according to these properties. The border is not reflected to fragment tree yet, adding NGBoxFragments will be in following patches. This patch also supports when inter-item is not breakable. Inline margin/border/padding belong to different NGInlineItem than its text, but between them are not breakable. Includes a fix for LazyLineBreakIterator where offset 0 should not be breakable. This patch also adds tests when inter-items are not breakable. BUG=636993 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng Review-Url: https://codereview.chromium.org/2865903002 Cr-Commit-Position: refs/heads/master@{#475799} Committed: https://chromium.googlesource.com/chromium/src/+/ec0c017a410d4c51bfdc3a0d3423d2cff3c6f064

Patch Set 1 #

Patch Set 2 : WIP #

Patch Set 3 : WIP #

Patch Set 4 : WIP #

Patch Set 5 : WIP #

Patch Set 6 : WIP #

Patch Set 7 : WIP #

Patch Set 8 : WIP #

Patch Set 9 : WIP #

Patch Set 10 : WIP #

Patch Set 11 : Cleanup #

Total comments: 3

Patch Set 12 : Minor cleanup #

Patch Set 13 : cbiesinger review #

Patch Set 14 : cbiesinger review #

Total comments: 4

Patch Set 15 : ikilpatrick review + rebase #

Patch Set 16 : End border position fix #

Patch Set 17 : TestExpectations #

Total comments: 8

Patch Set 18 : ikilpatrick review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+615 lines, -196 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 3 chunks +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item_result.cc View 1 2 3 4 5 6 7 8 9 10 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 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +36 lines, -9 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 9 10 11 12 13 14 7 chunks +286 lines, -177 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +252 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/text/TextBreakIterator.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/text/TextBreakIterator.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 64 (45 generated)
kojii
PTAL. This turned out to be larger than expected. Some tests maybe still failing, but ...
3 years, 7 months ago (2017-05-22 16:04:17 UTC) #10
cbiesinger
https://codereview.chromium.org/2865903002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc File third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc (right): https://codereview.chromium.org/2865903002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc#newcode399 third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc:399: LayoutUnit ComputeMarginBorderPaddingInlineStart( I'd rather not add functions like these; ...
3 years, 7 months ago (2017-05-22 19:02:59 UTC) #14
kojii
https://codereview.chromium.org/2865903002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc File third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc (right): https://codereview.chromium.org/2865903002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc#newcode399 third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc:399: LayoutUnit ComputeMarginBorderPaddingInlineStart( On 2017/05/22 at 19:02:58, cbiesinger wrote: > ...
3 years, 7 months ago (2017-05-22 19:22:42 UTC) #15
kojii
https://codereview.chromium.org/2865903002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc File third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc (right): https://codereview.chromium.org/2865903002/diff/200001/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc#newcode399 third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc:399: LayoutUnit ComputeMarginBorderPaddingInlineStart( BTW, you might know but in case, ...
3 years, 7 months ago (2017-05-22 19:26:31 UTC) #16
cbiesinger
I think for now we should try to keep the API simpler. These functions are ...
3 years, 7 months ago (2017-05-22 20:41:10 UTC) #17
kojii
On 2017/05/22 at 20:41:10, cbiesinger wrote: > I think for now we should try to ...
3 years, 7 months ago (2017-05-23 04:14:06 UTC) #20
kojii
Or I can cache this since its quite transitional, from the beginning of line breaking ...
3 years, 7 months ago (2017-05-23 04:31:18 UTC) #21
kojii
Done, PTAL.
3 years, 7 months ago (2017-05-23 04:32:40 UTC) #23
cbiesinger
Thank you! I like this better. I'll leave the actual review of the inline layout ...
3 years, 7 months ago (2017-05-23 18:30:43 UTC) #29
ikilpatrick
sorry for the slow review, I'll do another pass in the morning if thats ok, ...
3 years, 7 months ago (2017-05-24 04:03:39 UTC) #30
kojii
> sorry for the slow review, I'll do another pass in the morning if thats ...
3 years, 7 months ago (2017-05-24 15:50:55 UTC) #31
kojii
Gentle reminder in case this was forgotten... In the mean time, Alex cleaning up TestExpectations ...
3 years, 6 months ago (2017-05-29 05:26:33 UTC) #47
eae
LGTM for line breaker and inline logic
3 years, 6 months ago (2017-05-30 15:12:24 UTC) #52
ikilpatrick
lgtm https://codereview.chromium.org/2865903002/diff/380001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc (right): https://codereview.chromium.org/2865903002/diff/380001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc#newcode129 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc:129: return !GetLayoutObject()->IsInlineElementContinuation(); These should be switch to break ...
3 years, 6 months ago (2017-05-30 16:05:27 UTC) #53
kojii
Thank you for your review! https://codereview.chromium.org/2865903002/diff/380001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc (right): https://codereview.chromium.org/2865903002/diff/380001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc#newcode129 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_item.cc:129: return !GetLayoutObject()->IsInlineElementContinuation(); On 2017/05/30 ...
3 years, 6 months ago (2017-05-30 17:56:18 UTC) #55
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/2865903002/400001
3 years, 6 months ago (2017-05-30 17:56:42 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/395934)
3 years, 6 months ago (2017-05-30 19:20:47 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/2865903002/400001
3 years, 6 months ago (2017-05-31 01:36:37 UTC) #61
commit-bot: I haz the power
3 years, 6 months ago (2017-05-31 04:27:06 UTC) #64
Message was sent while issue was closed.
Committed patchset #18 (id:400001) as
https://chromium.googlesource.com/chromium/src/+/ec0c017a410d4c51bfdc3a0d3423...

Powered by Google App Engine
This is Rietveld 408576698