DescriptionFix 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 #
Messages
Total messages: 6 (2 generated)
|