Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Issue 2563403002: [LayoutNG] Add Bidi reordering and fill in NGPhysicalTextFragment (Closed)

Created:
4 years ago by kojii
Modified:
4 years ago
Reviewers:
ikilpatrick, eae
CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, eae+blinkwatch, glebl+reviews_chromium.org, jchaffraix+rendering, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

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)
kojii
Can I ask yet another early thoughts? What should NGPhysicalTextFragment have? I put String and ...
4 years ago (2016-12-12 08:06:16 UTC) #5
eae
Originally I had envisioned it having a pointer to the NGInlineNode and a start and ...
4 years ago (2016-12-12 17:48:18 UTC) #6
kojii
On 2016/12/12 at 17:48:18, eae wrote: > Originally I had envisioned it having a pointer ...
4 years ago (2016-12-13 03:20:59 UTC) #7
kojii
PTAL, the other CL was merged into this.
4 years ago (2016-12-14 14:19:18 UTC) #19
eae
This is great and so much easier to read and reason about than the old ...
4 years ago (2016-12-14 18:43:43 UTC) #22
ikilpatrick
https://codereview.chromium.org/2563403002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2563403002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode220 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:220: NGFragmentBuilder* builder) { So we probably want most of ...
4 years ago (2016-12-14 18:49:34 UTC) #23
kojii
https://codereview.chromium.org/2563403002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2563403002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode220 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:220: NGFragmentBuilder* builder) { On 2016/12/14 at 18:49:34, ikilpatrick wrote: ...
4 years ago (2016-12-14 21:36:37 UTC) #24
kojii
I think I understand what you said better, after my head refreshed. IIUC I should ...
4 years ago (2016-12-15 07:55:24 UTC) #25
kojii
PTAL. Moved the logic to NGTextLayoutAlgorithm, added a helper class NGLayoutInlineItemRange, a class like StringView ...
4 years ago (2016-12-15 08:36:40 UTC) #29
ikilpatrick
lgtm, sorry for the slow review. https://codereview.chromium.org/2563403002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc (right): https://codereview.chromium.org/2563403002/diff/160001/third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc#newcode46 third_party/WebKit/Source/core/layout/ng/ng_inline_node.cc:46: NGLayoutInlineItemRange::NGLayoutInlineItemRange( move to ...
4 years ago (2016-12-18 22:54:06 UTC) #32
kojii
Thank you, all done! Not slow at all!
4 years ago (2016-12-19 07:45:23 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2563403002/180001
4 years ago (2016-12-19 07:45:39 UTC) #40
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years ago (2016-12-19 07:50:05 UTC) #43
commit-bot: I haz the power
4 years ago (2016-12-19 07:53:04 UTC) #45
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/f77b0d3954eefc100b4236fb3d8776599071fd29
Cr-Commit-Position: refs/heads/master@{#439427}

Powered by Google App Engine
This is Rietveld 408576698