[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 Review-Url: https://codereview.chromium.org/2563403002 Cr-Commit-Position: refs/heads/master@{#439427}
Showing
Please register or sign in to comment