Chromium Code Reviews
DescriptionFix ShapeResult::OffsetForPosition edge behavior
This patch fixes ShapeResult::OffsetForPosition, when the position is at
exact character boundaries and include_partial_glyphs is false, to
return the next character.
Before this change, boundaries were part of previous characters. This
function is used to identify how many characters can fit in a space,
such as ShapingLineBreaker, ellipsis, and break-all, and thus the old
behavior failed to fit a character exactly equal to the available space.
Existing tests were rebaselined for such cases to be better.
This fix also make OffsetForPosition matches to PositionForOffset.
BUG=729318
Review-Url: https://codereview.chromium.org/2924463002
Cr-Commit-Position: refs/heads/master@{#477263}
Committed: https://chromium.googlesource.com/chromium/src/+/1fb6007f25ce38b50bd6700f292e65ca8e501e7b
Patch Set 1 #Patch Set 2 : Keep include_partial_glyphs unchanged #Patch Set 3 : Parameterized tests, TestExpectations #Patch Set 4 : Cleanup and test again #Patch Set 5 : TestExpectations #
Total comments: 1
Patch Set 6 : eae review suggestion #
Messages
Total messages: 22 (17 generated)
|
|||||||||||||||||||||||||||||||||||||