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

Issue 2924463002: Fix ShapeResult::OffsetForPosition edge behavior (Closed)

Created:
3 years, 6 months ago by kojii
Modified:
3 years, 6 months ago
Reviewers:
eae
CC:
blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -36 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 1 chunk +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp View 1 2 3 4 5 1 chunk +63 lines, -33 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp View 1 2 3 4 5 2 chunks +17 lines, -3 lines 0 comments Download

Messages

Total messages: 22 (17 generated)
kojii
PTAL. A few more fixes are needed until we can enable shaper-driven-line breaker, but with ...
3 years, 6 months ago (2017-06-04 07:07:31 UTC) #9
eae
LGTM w/suggestion https://codereview.chromium.org/2924463002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp File third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp (right): https://codereview.chromium.org/2924463002/diff/80001/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp#newcode136 third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp:136: if (!Rtl()) { How about static bool ...
3 years, 6 months ago (2017-06-06 00:03:54 UTC) #11
kojii
Thank you for great advice as always, I like it. Took in PS6.
3 years, 6 months ago (2017-06-06 11:34:51 UTC) #16
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/2924463002/100001
3 years, 6 months ago (2017-06-06 11:35:01 UTC) #19
commit-bot: I haz the power
3 years, 6 months ago (2017-06-06 12:02:40 UTC) #22
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/1fb6007f25ce38b50bd6700f292e...

Powered by Google App Engine
This is Rietveld 408576698