DescriptionManage DOM and string offsets separately in TextIteratorTextState
TextIteratorTextState stores only one offset range as both DOM offset and
string offset, which is incorrect (e.g., when with text-transform).
This patch changes TextIteratorTextState to store DOM and string offsets
separately, so that the above issue no longer exist in the class (it still
widely exists in many other components, though).
This patch also makes it possible to stop using LayoutText in the class, so
that TextIteratorTextState can also work with Layout NG.
Note: The class originally has a member |text_start_offet_| as a hack when
there is :first-letter, which is removed by the patch. A new member for
string offset is added back, which has the same name by pure coincidence.
BUG=721957
TEST=n/a; no behavioral change
Review-Url: https://codereview.chromium.org/2914313002
Cr-Commit-Position: refs/heads/master@{#476759}
Committed: https://chromium.googlesource.com/chromium/src/+/b31e3ce881bd72c860c563cbcf74ff16e3bfbe84
Patch Set 1 #Patch Set 2 : Thu Jun 1 18:08:24 PDT 2017 #
Total comments: 2
Patch Set 3 : Fri Jun 2 10:34:55 PDT 2017 #
Dependent Patchsets: Messages
Total messages: 24 (19 generated)
|