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

Issue 2963093002: Add full offset mapping construction in a block (Closed)

Created:
3 years, 5 months ago by Xiaocheng
Modified:
3 years, 5 months ago
CC:
atotic+reviews_chromium.org, blink-reviews, blink-reviews-layout_chromium.org, cbiesinger, chromium-reviews, dgrogan+ng_chromium.org, eae+blinkwatch, glebl+reviews_chromium.org, jchaffraix+rendering, lchoi+reviews_chromium.org, leviw+renderwatch, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add full offset mapping construction in a block This CL constructs the DOM-to-TextContent offset mapping of a block. It adds the following API: NGOffsetMappingResult NGInlineNode::BuildOffsetMapping() const; See ng_offset_mapping_result.h for information about NGOffsetMappingResult. See ng_inline_node_offset_mapping_test.cc for examples. Note 1: The patch can be made cleaner if we do not write whitespace-collapsed strings back to LayoutText after layout. Note 2: The built offset mapping is wrong when text-transform expands/removes characters (e.g., ß => SS) BUG=699017 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng Review-Url: https://codereview.chromium.org/2963093002 Cr-Commit-Position: refs/heads/master@{#487489} Committed: https://chromium.googlesource.com/chromium/src/+/13b1999a87a545bcab93d66a2294758c3125a84b

Patch Set 1 #

Patch Set 2 : Thu Jun 29 11:37:39 PDT 2017 #

Patch Set 3 : Thu Jun 29 12:38:25 PDT 2017 #

Patch Set 4 : Thu Jun 29 14:43:14 PDT 2017 #

Total comments: 4

Patch Set 5 : Thu Jun 29 14:43:14 PDT 2017 #

Total comments: 17

Patch Set 6 : Thu Jun 29 19:48:40 PDT 2017 #

Patch Set 7 : Fri Jun 30 14:03:12 PDT 2017 #

Patch Set 8 : Fri Jun 30 14:24:31 PDT 2017 #

Total comments: 2

Patch Set 9 : Mon Jul 17 13:51:46 PDT 2017 #

Patch Set 10 : Mon Jul 17 14:18:49 PDT 2017 #

Patch Set 11 : Fix first letter handling #

Unified diffs Side-by-side diffs Delta from patch set Stats (+565 lines, -18 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextFragment.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.h View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_items_builder.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +116 lines, -6 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node_offset_mapping_test.cc View 1 2 3 4 5 6 7 8 9 1 chunk +228 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h View 1 2 3 4 5 6 7 8 4 chunks +12 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.cc View 1 2 3 4 5 6 7 8 9 4 chunks +108 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_result.h View 1 2 3 4 5 6 7 8 1 chunk +65 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 42 (22 generated)
Xiaocheng
I've put up an all-in-one prototype that builds the offset mapping of a LayoutNGBlockFlow. Please ...
3 years, 5 months ago (2017-06-29 21:52:54 UTC) #6
eae
Overall this approach looks fine to me. https://codereview.chromium.org/2963093002/diff/60001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc (right): https://codereview.chromium.org/2963093002/diff/60001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc#newcode167 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc:167: template <typename ...
3 years, 5 months ago (2017-06-29 22:05:48 UTC) #8
Xiaocheng
https://codereview.chromium.org/2963093002/diff/60001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc (right): https://codereview.chromium.org/2963093002/diff/60001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc#newcode167 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc:167: template <typename OffsetMappingBuilder> On 2017/06/29 at 22:05:48, eae wrote: ...
3 years, 5 months ago (2017-06-29 22:18:38 UTC) #9
yosin_UTC9
https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h File third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h (right): https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h#newcode28 third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h:28: void Composite(const EmptyOffsetMappingBuilder&) {} nit: Try to alphabetical order ...
3 years, 5 months ago (2017-06-30 02:03:05 UTC) #10
yoichio
https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h File third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h (right): https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h#newcode18 third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h:18: struct NGOffsetMappingUnit { Please add comment about these structs. ...
3 years, 5 months ago (2017-06-30 02:04:27 UTC) #11
Xiaocheng
Thanks for all the comments! https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h File third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h (right): https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h#newcode28 third_party/WebKit/Source/core/layout/ng/inline/empty_offset_mapping_builder.h:28: void Composite(const EmptyOffsetMappingBuilder&) {} ...
3 years, 5 months ago (2017-06-30 02:49:20 UTC) #12
yoichio
https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h File third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h (right): https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h#newcode18 third_party/WebKit/Source/core/layout/ng/inline/ng_offset_mapping_builder.h:18: struct NGOffsetMappingUnit { On 2017/06/30 02:49:20, Xiaocheng wrote: > ...
3 years, 5 months ago (2017-06-30 05:51:46 UTC) #13
kojii
Thank you for working on this, looks good to me too. Just curious, why is ...
3 years, 5 months ago (2017-06-30 06:02:31 UTC) #14
yosin_UTC9
https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc (right): https://codereview.chromium.org/2963093002/diff/80001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc#newcode264 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.cc:264: Vector<NGInlineItem> items; On 2017/06/30 at 02:49:20, Xiaocheng wrote: > ...
3 years, 5 months ago (2017-06-30 06:51:00 UTC) #15
Xiaocheng
Updated with more comments added. About DO-NOT-COMMIT: This patch is an all-in-one patch for reference. ...
3 years, 5 months ago (2017-06-30 20:57:50 UTC) #16
yoichio
https://codereview.chromium.org/2963093002/diff/160001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h (right): https://codereview.chromium.org/2963093002/diff/160001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h#newcode68 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h:68: NGOffsetMappingResult BuildOffsetMapping() const; If a NGOffsetMappingResult stores the units ...
3 years, 5 months ago (2017-07-03 02:29:08 UTC) #18
kojii
On 2017/06/30 at 20:57:50, xiaochengh wrote: > About DO-NOT-COMMIT: This patch is an all-in-one patch ...
3 years, 5 months ago (2017-07-03 03:10:20 UTC) #19
kojii
BTW, FYI, if we were to apply text-transform in NG, I think it's easier to ...
3 years, 5 months ago (2017-07-03 03:11:57 UTC) #20
Xiaocheng
https://codereview.chromium.org/2963093002/diff/160001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h File third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h (right): https://codereview.chromium.org/2963093002/diff/160001/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h#newcode68 third_party/WebKit/Source/core/layout/ng/inline/ng_inline_node.h:68: NGOffsetMappingResult BuildOffsetMapping() const; On 2017/07/03 at 02:29:08, yoichio wrote: ...
3 years, 5 months ago (2017-07-03 06:02:35 UTC) #21
Xiaocheng
On 2017/07/03 at 03:11:57, kojii wrote: > BTW, FYI, if we were to apply text-transform ...
3 years, 5 months ago (2017-07-03 06:04:51 UTC) #22
yoichio
lgtm for result and usage.
3 years, 5 months ago (2017-07-03 07:19:02 UTC) #23
Xiaocheng
I was thinking about further polishing and splitting before landing the patch. But it turns ...
3 years, 5 months ago (2017-07-17 21:24:56 UTC) #27
eae
On 2017/07/17 21:24:56, Xiaocheng_OOO_till_July_17 wrote: > I was thinking about further polishing and splitting before ...
3 years, 5 months ago (2017-07-17 22:16:01 UTC) #28
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/2963093002/220001
3 years, 5 months ago (2017-07-18 15:54:51 UTC) #39
commit-bot: I haz the power
3 years, 5 months ago (2017-07-18 15:59:35 UTC) #42
Message was sent while issue was closed.
Committed patchset #11 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/13b1999a87a545bcab93d66a2294...

Powered by Google App Engine
This is Rietveld 408576698