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

Issue 2523573003: Use logicalBottom when computing baselines in vertical-lr inline-blocks (Closed)

Created:
4 years, 1 month ago by jfernandez
Modified:
4 years ago
CC:
chromium-reviews, krit, szager+layoutwatch_chromium.org, drott+blinkwatch_chromium.org, jbroman, zoltan1, blink-reviews-platform-graphics_chromium.org, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, Justin Novosad, dshwang, Rik, f(malita), jchaffraix+rendering, pdr+graphicswatchlist_chromium.org, blink-reviews, danakj+watch_chromium.org, ajuma+watch_chromium.org, Stephen Chennney, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use logicalBottom when computing baselines in vertical-lr inline-blocks When computing the baseline position of inline-block elements we use the InlineFlow logicalTop and the FontMetrics ascent. The issue comes from the fact that these units are incompatible. The logicalTop of a vertical-lr element is offset to the left edge, while the ascent is the distance from the right edge. We need to either use logical value for the FontMetrics ascent so we can compute the correctly the baselines of vertical-lr elements, or just using the logicalBottom for these cases. The approach based on a logicalAscent API for FontMetrics would require a lot of work because inline-block logic assumes everything is vertical-rl and at some point, flips the elements along the block-axis in case of vertical-lr mode. While it'd be desirable to get rid of this flipping logic, this patch tries first the simpler approach of using logicalBottom, which aligns with the currently implemented logic. BUG=664386 Committed: https://crrev.com/e2226caaef64115627bddea776cac031d065fd5a Cr-Commit-Position: refs/heads/master@{#438502}

Patch Set 1 #

Patch Set 2 : New approach: assume everything as vertical-LR. #

Patch Set 3 : Rebaselined some tests. #

Total comments: 2

Patch Set 4 : Added requires layout test. #

Patch Set 5 : Platform baselines for the new layout test. #

Total comments: 4

Patch Set 6 : Applied suggested changes. #

Patch Set 7 : Rebaselined layout tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+628 lines, -70 lines) Patch
A third_party/WebKit/LayoutTests/fast/inline-block/baseline-vertical.html View 1 2 3 4 5 1 chunk +82 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/backgrounds/background-leakage-transforms-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/fast/inline-block/baseline-vertical-expected.png View 1 2 3 4 5 6 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/linux/fast/inline-block/baseline-vertical-expected.txt View 1 2 3 4 5 6 1 chunk +155 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/border-styles-vertical-lr-expected.txt View 1 2 10 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/backgrounds/background-leakage-transforms-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/fast/inline-block/baseline-vertical-expected.png View 1 2 3 4 5 6 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/mac/fast/inline-block/baseline-vertical-expected.txt View 1 2 3 4 5 6 1 chunk +155 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/border-styles-vertical-lr-expected.txt View 1 2 10 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/backgrounds/background-leakage-transforms-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/fast/inline-block/baseline-vertical-expected.png View 1 2 3 4 5 6 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/platform/win/fast/inline-block/baseline-vertical-expected.txt View 1 2 3 4 5 6 1 chunk +155 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/border-styles-vertical-lr-expected.txt View 1 2 10 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/japanese-ruby-vertical-lr-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/japanese-ruby-vertical-lr-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/platform/win7/fast/writing-mode/japanese-ruby-vertical-lr-expected.png View 1 2 Binary file 0 comments Download
M third_party/WebKit/LayoutTests/platform/win7/fast/writing-mode/japanese-ruby-vertical-lr-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 4 5 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (13 generated)
jfernandez
Hi @kojii I hope you could give me some feedback in this patch. It's still ...
4 years, 1 month ago (2016-11-22 23:43:55 UTC) #4
kojii
Thank you for your investigation and continued efforts on this topic. In short, I think ...
4 years ago (2016-11-24 03:41:26 UTC) #5
jfernandez
On 2016/11/24 03:41:26, kojii wrote: > Thank you for your investigation and continued efforts on ...
4 years ago (2016-11-24 09:25:54 UTC) #6
jfernandez
Adding more layout people to help with the review.
4 years ago (2016-11-24 23:30:50 UTC) #10
mstensho (USE GERRIT)
Please add a minimal test. https://codereview.chromium.org/2523573003/diff/60001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): https://codereview.chromium.org/2523573003/diff/60001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode2567 third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:2567: // case of verticalLR ...
4 years ago (2016-12-01 10:33:07 UTC) #11
jfernandez
Yeah, sorry. I ust wanted to verify the approach to address verticalLR cases was correct. ...
4 years ago (2016-12-01 10:50:16 UTC) #12
jfernandez
Added a new LayoutTest.
4 years ago (2016-12-02 01:28:35 UTC) #13
mstensho (USE GERRIT)
On 2016/12/02 01:28:35, jfernandez wrote: > Added a new LayoutTest. Please don't add PNG tests, ...
4 years ago (2016-12-02 09:02:40 UTC) #14
jfernandez
On 2016/12/02 09:02:40, mstensho wrote: > On 2016/12/02 01:28:35, jfernandez wrote: > > Added a ...
4 years ago (2016-12-02 10:34:45 UTC) #15
mstensho (USE GERRIT)
> Finally, I'm not really sure what do you mean with "keep it simple"; IMHO ...
4 years ago (2016-12-02 11:38:03 UTC) #16
jfernandez
https://codereview.chromium.org/2523573003/diff/100001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp File third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp (right): https://codereview.chromium.org/2523573003/diff/100001/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp#newcode2568 third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp:2568: return ((style()->isFlippedLinesWritingMode() On 2016/12/02 11:38:03, mstensho wrote: > This ...
4 years ago (2016-12-05 23:57:28 UTC) #17
mstensho (USE GERRIT)
lgtm - typo in description: "logicaAscent"
4 years ago (2016-12-06 08:03:55 UTC) #18
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/2523573003/140001
4 years ago (2016-12-12 09:11:40 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/196999)
4 years ago (2016-12-12 10:50:06 UTC) #23
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/2523573003/140001
4 years ago (2016-12-14 09:35:36 UTC) #25
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years ago (2016-12-14 13:39:43 UTC) #28
commit-bot: I haz the power
4 years ago (2016-12-14 13:41:32 UTC) #30
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e2226caaef64115627bddea776cac031d065fd5a
Cr-Commit-Position: refs/heads/master@{#438502}

Powered by Google App Engine
This is Rietveld 408576698