-
kojii@chromium.org authored
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 Review URL: https://codereview.chromium.org/1314543003 git-svn-id: svn://svn.chromium.org/blink/trunk@201181 bbb929c8-8fbe-4397-9dbb-9b2b20218538
c42408e2