Description[LayoutNG] Add Bidi reordering and fill in NGPhysicalTextFragment
This patch adds Bidi reordering to NGInlineNode, using ICU BiDi[1] to
implement rules defined in UAX#9 3.4 Reordering Resolved Levels[2].
The CreateLine() function produces NGTextFragment in the visual order.
This patch also adds a pointer to NGInlineNode and item index range to
NGPhysicalTextFragment.
UAX#9 L1[3] is not supported in this patch. ICU BiDi has a function for
L1, but efficient implementation needs more considerations. This will be
revisited after the line breaker. Note, L1 is not fully supported in
BidiResolver <crbug.com/316409>.
There is only one test case for the Bidi reordering in this patch. We
may run test cases from Unicode[4], or maybe it's overkill. More test
coverage is to be worked out.
[1] http://userguide.icu-project.org/transforms/bidi
[2] http://unicode.org/reports/tr9/#Reordering_Resolved_Levels
[3] http://unicode.org/reports/tr9/#L1
[4] http://www.unicode.org/Public/UNIDATA/
BUG=636993
Committed: https://crrev.com/f77b0d3954eefc100b4236fb3d8776599071fd29
Cr-Commit-Position: refs/heads/master@{#439427}
Patch Set 1 #Patch Set 2 : Add bidi reordering #Patch Set 3 : WIP #Patch Set 4 : Add offset test #Patch Set 5 : Cleanup #
Total comments: 9
Patch Set 6 : Moved the most of logic to NGTextLayoutAlgorithm #Patch Set 7 : CreateLine adds TextFragment to Vector #Patch Set 8 #Patch Set 9 : Minor editorial cleanup #
Total comments: 4
Patch Set 10 : ikilpatrick review #Messages
Total messages: 45 (31 generated)
|