DescriptionChange Font::offsetForPositionForComplexText to use CachingWordShapeIterator
In the discussion at a CL for the tab characters support in complex path[1],
it was desired that HarfBuzzShaper being a lower layer of
CachingWordShapeIterator, and higher layers should not use HarfBuzzShaper
directly. It gives us flexibility to move code between these two classes.
This patch changes Font::offsetForPositionForComplexText to switch from
HarfBuzzShaper to CachingWordShapeIterator. This method is currently the
only direct user of HarfBuzzShaper.
A basic test that tests all integer positions using Ahem is added, and
confirmed no behavior changes from the current complex path code, but this
code path has several dependencies (fonts, shaping, graphics layers etc.)
that this patch needs to rebaseline 7 tests (7 Mac, 2 Linux, 0 Windows.)
Among the 7 tests:
* 4 are editing to move carets in block directions:
- 2 out of 4 have rooms to improve, but very rare (only Mac & vertical & RTL)
- 2 look reasonable changes (also only Mac & vertical & RTL)
* 3 are ellipsis for RTL, neither before and after look stable.
[1] https://codereview.chromium.org/1242213002/
BUG=422670
TEST=editing/selection/offset-from-point.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200233
Patch Set 1 #Patch Set 2 : #Patch Set 3 : RTL support #Patch Set 4 : Move logic to HarfBuzzShaper #Patch Set 5 : #Patch Set 6 : Add test #Patch Set 7 : #Patch Set 8 : #Patch Set 9 : Avoid flaky tests in vertical flow #Patch Set 10 : TestExpectations and rebase #
Total comments: 2
Patch Set 11 : Rebase #Patch Set 12 : eae's review #Patch Set 13 : Rebase (resolved conflicts) #Patch Set 14 : Rebase #
Total comments: 1
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 12 (4 generated)
|