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

Issue 1314543003: Fix ShapeResult::offsetForPosition for RTL scripts (Closed)

Created:
5 years, 4 months ago by kojii
Modified:
5 years, 3 months ago
Reviewers:
drott, eae
CC:
blink-reviews, krit, drott+blinkwatch_chromium.org, Rik, dshwang, jbroman, Justin Novosad, danakj, pdr+graphicswatchlist_chromium.org, f(malita), Stephen Chennney, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fix ShapeResult::offsetForPosition for RTL scripts CachingWordShapeIterator splits runs in the logical order, but ShapeResult::offsetForPosition() expected the input to be in the visual order. This patch fixes ShapeResult::offsetForPosition() to handle the list of ShapeResult from CachingWordShapeIterator in the logical order. This is a regression of "Change Font::offsetForPositionForComplexText to use CachingWordShapeIterator"[1]. Unfortunately tests in the CL did not catch this logic/visual inconsistency. The test was updated to include it. The test string has a diacritic mark at offset 1, and the test ensures offsetForPosition() dose not return 1. All platforms pass this criteria, however, only Mac test runner does not return offset 5 (Mac content shell is fine) so Mac -expeted is added separately. [1] https://codereview.chromium.org/1248453004/ BUG=518347 TEST=editing/selection/offset-from-point-complex-scripts.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201181

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : TestExpectations #

Patch Set 4 : Test updated #

Patch Set 5 : Add Mac expected file #

Patch Set 6 : TestExpectations in PS3 was uploaded from wrong PC #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -1 line) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
A LayoutTests/editing/selection/offset-from-point-complex-scripts.html View 1 2 3 1 chunk +33 lines, -0 lines 0 comments Download
A LayoutTests/editing/selection/offset-from-point-complex-scripts-expected.txt View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/platform/mac/editing/selection/offset-from-point-complex-scripts-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/fonts/shaping/HarfBuzzShaper.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 6 (2 generated)
kojii
PTAL. Mac test runner not returning 5 is still a mystery to me, but my ...
5 years, 4 months ago (2015-08-25 12:48:37 UTC) #2
eae
LGTM
5 years, 3 months ago (2015-08-25 16:49:25 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1314543003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1314543003/100001
5 years, 3 months ago (2015-08-26 01:07:35 UTC) #5
commit-bot: I haz the power
5 years, 3 months ago (2015-08-26 01:12:53 UTC) #6
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201181

Powered by Google App Engine
This is Rietveld 408576698