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

Issue 2845913002: [LayoutNG] Fix 'vertical-align: text-top/-bottom' and atomic inline margins (Closed)

Created:
3 years, 7 months ago by kojii
Modified:
3 years, 7 months ago
Reviewers:
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] Fix 'vertical-align: text-top/-bottom' and atomic inline margins This patch fixes: 1. 'vertical-align: text-top' and 'text-bottom' to align to the text edge, not to the box edge. 2. Use the margin box of atomic inlines, not the border box. It also: 3. Changes the geometry of NGLineBoxFragment from the text box to the line box to simplify. The geometry of RootInlineBox is unchanged. Positions were fixed in relevant tests, but they were not rendered yet. A false-positive test was discovered as its reference layout was improved. This patch fixes the block progression margins for atomic inline, but: a. The block progression margin/border/padding for non-atomic inlines do not affect layout, only to overflows. Overflows is not implemented yet. b. The inline progression margin for atomic inlines and margin/border/ padding for non-atomic inlines is not implemented yet. It turned out that it's better to work on it after line breaker refactoring. BUG=636993 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng Review-Url: https://codereview.chromium.org/2845913002 Cr-Commit-Position: refs/heads/master@{#470869} Committed: https://chromium.googlesource.com/chromium/src/+/fe323e6fc54e4f4ef0460d5052876d6b092c1e9e

Patch Set 1 #

Patch Set 2 : WIP #

Patch Set 3 : WIP #

Patch Set 4 : WIP #

Patch Set 5 : Fix crashes #

Patch Set 6 : Change line box position to include leadings #

Patch Set 7 : Fix position of atomic inlines with top margin #

Total comments: 4

Patch Set 8 : eae review #

Total comments: 4

Patch Set 9 : Split out basseline changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -25 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +1 line, -0 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 2 chunks +6 lines, -4 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 4 chunks +25 lines, -9 lines 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 5 chunks +12 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc View 1 2 3 4 5 6 2 chunks +5 lines, -6 lines 0 comments Download

Messages

Total messages: 74 (52 generated)
kojii
PTAL.
3 years, 7 months ago (2017-05-08 13:53:48 UTC) #33
eae
This is great, thanks for working on this! https://codereview.chromium.org/2845913002/diff/140001/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/2845913002/diff/140001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc#newcode42 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_box_state.cc:42: baseline_type_ ...
3 years, 7 months ago (2017-05-08 15:43:28 UTC) #35
kojii
All done, with one reply below. Win bots are failing to compile but looks like ...
3 years, 7 months ago (2017-05-08 19:22:19 UTC) #38
ikilpatrick
https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc File third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc (right): https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc#newcode45 third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc:45: // RunOldLayout. if we aren't using a line_box we ...
3 years, 7 months ago (2017-05-08 22:47:06 UTC) #42
kojii
https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc File third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc (right): https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc#newcode45 third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc:45: // RunOldLayout. On 2017/05/08 at 22:47:06, ikilpatrick wrote: > ...
3 years, 7 months ago (2017-05-09 01:23:34 UTC) #43
kojii
https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc File third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc (right): https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc#newcode45 third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc:45: // RunOldLayout. and forgot MultiCol, this maybe the first ...
3 years, 7 months ago (2017-05-09 01:35:27 UTC) #44
ikilpatrick
https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc File third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc (right): https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc#newcode45 third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc:45: // RunOldLayout. On 2017/05/09 01:35:27, kojii wrote: > and ...
3 years, 7 months ago (2017-05-09 02:18:42 UTC) #45
kojii
On 2017/05/09 at 02:18:42, ikilpatrick wrote: > > Right, I think we actually want each ...
3 years, 7 months ago (2017-05-09 02:27:11 UTC) #46
kojii
Oh, wait , it's a little more complicated. Parents can request baselines of different yours ...
3 years, 7 months ago (2017-05-09 02:33:23 UTC) #47
kojii
s/yours/types/
3 years, 7 months ago (2017-05-09 02:34:25 UTC) #48
kojii
Split to https://codereview.chromium.org/2867293002 and updated description. Sorry for putting multiple things into one CL.
3 years, 7 months ago (2017-05-09 03:10:58 UTC) #52
eae
LGTM
3 years, 7 months ago (2017-05-09 15:19:13 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/2845913002/180001
3 years, 7 months ago (2017-05-10 04:14:04 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/449555)
3 years, 7 months ago (2017-05-10 06:43:18 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/2845913002/180001
3 years, 7 months ago (2017-05-10 16:12:36 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/450233)
3 years, 7 months ago (2017-05-10 18:12:46 UTC) #63
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/2845913002/180001
3 years, 7 months ago (2017-05-11 02:40:16 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/451214)
3 years, 7 months ago (2017-05-11 04:52:11 UTC) #67
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/2845913002/180001
3 years, 7 months ago (2017-05-11 05:38:07 UTC) #69
commit-bot: I haz the power
Committed patchset #9 (id:180001) as https://chromium.googlesource.com/chromium/src/+/fe323e6fc54e4f4ef0460d5052876d6b092c1e9e
3 years, 7 months ago (2017-05-11 08:05:07 UTC) #72
cbiesinger
On 2017/05/09 02:18:42, ikilpatrick wrote: > https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc > File third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc (right): > > https://codereview.chromium.org/2845913002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_box_fragment.cc#newcode45 > ...
3 years, 7 months ago (2017-05-11 19:54:19 UTC) #73
kojii
3 years, 7 months ago (2017-05-11 22:20:01 UTC) #74
Message was sent while issue was closed.
On 2017/05/11 at 19:54:19, cbiesinger wrote:
> On 2017/05/09 02:18:42, ikilpatrick wrote:
> > Right, I think we actually want each fragment or layout_result to have a
member
> > which is its baseline position. Otherwise w/ caching we'd have to perform a
tree
> > walk to do this correctly.
> > 
> > If it is needed for painting it should be on the fragment, otherwise it
should
> > be on the layout_result.
> 
> Yeah, I agree with this. We may need two members (alphabetic vs ideographic)

I agree it's good today, but that doesn't work when we support 8 different
baselines:
https://drafts.csswg.org/css-inline/#dominant-baseline-property

Even more, OpenType may provide per-script baselines, and TextBox needs to
compute how to align between different baseline types.

> and possible four (vertical line vs horizontal)

When orthogonal, baseline is synthesized, right?

> Also, there's kPositionOfInteriorLineBoxes; I don't really know much about how
that works but that may have to go onto the constraint space?

Yeah, I need to find all usages in the legacy and think about how to handle
that. I'm not there yet.

Powered by Google App Engine
This is Rietveld 408576698