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