DescriptionCompute 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 #
Messages
Total messages: 21 (14 generated)
|