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

Issue 1994483002: Compute min-content width when hyphenation is enabled (Closed)

Created:
4 years, 7 months ago by kojii
Modified:
4 years, 7 months ago
Reviewers:
eae
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, drott, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Compute correct min-content width when hyphenation is enabled This patch computes the correct min-content width[1] when hyphenation makes it shorter. The basic logic is as same as the one removed in [2], but: 1. Updated to the current code base. 2. Shape with context, the same way as BreakingContext in [3]. 3. Drop support for CSS Text Level 4 properties. Unlike the line breaker which needs to find one hyphen location, computing min-content needs to find all hyphen locations. A method to get all hyphen locations in a word is added for platforms that can get all hyphen locations at once. [1] https://www.w3.org/TR/css-sizing-3/#min-content-inline-size [2] https://crrev.com/20526006 [3] https://crrev.com/1978683002 BUG=605840 Committed: https://crrev.com/0561d33fae84b66b8e1c6e8f9a31dec2dcec697b Cr-Commit-Position: refs/heads/master@{#394791}

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : Shape each fragment #

Patch Set 4 : Back to getCharacterRange and cleanup #

Patch Set 5 : max -> std::max #

Patch Set 6 : Fix test #

Total comments: 1

Patch Set 7 : eae review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -17 lines) Patch
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphen-min-preferred-width-mock.html View 1 2 3 4 5 6 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/text/hyphens/hyphen-min-preferred-width-mock-expected.html View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutText.cpp View 1 2 3 4 5 6 6 chunks +60 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h View 1 2 3 4 5 6 1 chunk +10 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/platform/text/Hyphenation.h View 1 2 3 4 5 6 3 chunks +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/text/Hyphenation.cpp View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (14 generated)
kojii
PTAL.
4 years, 7 months ago (2016-05-18 14:55:59 UTC) #8
eae
Overall this looks great but I'd like to see some of the trigger logic shared ...
4 years, 7 months ago (2016-05-18 17:53:37 UTC) #9
kojii
Thanks, moved all common code to the Hyphenation class.
4 years, 7 months ago (2016-05-19 07:03:13 UTC) #14
eae
LGTM Thanks for making the suggested changes.
4 years, 7 months ago (2016-05-19 16:25:35 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1994483002/120002 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1994483002/120002
4 years, 7 months ago (2016-05-19 16:26:09 UTC) #17
commit-bot: I haz the power
Committed patchset #7 (id:120002)
4 years, 7 months ago (2016-05-19 16:30:16 UTC) #19
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 16:32:55 UTC) #21
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/0561d33fae84b66b8e1c6e8f9a31dec2dcec697b
Cr-Commit-Position: refs/heads/master@{#394791}

Powered by Google App Engine
This is Rietveld 408576698