TextIterator NG

Desktop / Chromium - Xiaocheng Hu [chromium.org] - 10 August 2017 01:29 EDT

This patch reimplements TextIteratorTextNodeHandler on top of the NG offset mapping APIs to make TextIterator work with Layout NG.

Most critical changes are in TextIteratorTextNodeHandler.cpp, which gives a new and clean implementation of the class. Other changes are rebaseline of layout tests and changes to test expectations.

New failure due to LayoutText writeback:- editing/text-iterator/findString-restarts-at-last-position.html- editing/pasteboard/19644-1.html- editing/pasteboard/19644-2.html- virtual/layout_ng/fast/block/float/overhanging-float-crashes-when-sibling-becomes-formatting-context.html
- minimal repro: https://jsfiddle.net/767q3cbc/. There should be a trailing space in |container.innerText|, which is missing when LayoutNG is enabled

New failures due to lack of support for rect-related APIs:- accessibility/selection-affinity.html- fast/multicol/float-truncation.html- fast/multicol/vertical-lr/float-truncation.html

Some new failures are due to irrelevant bugs in layout test framework.

Other tests are rebaselined.

Bug: 699017 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: I8670c1d879437a36788c6ff50d83c7609cf08e79 Reviewed-on: https://chromium-review.googlesource.com/580371

95a9122 TextIterator NG
.../enable-blink-features=LayoutNG | 26 +++++
third_party/WebKit/LayoutTests/TestExpectations | 5 +
.../draw-focus-if-needed-expected.txt | 16 +++
.../accessibility/image-map2-expected.txt | 14 +++
.../canvas-background-layer-expected.txt | 69 ++++++++++++
.../webgl-background-layer-expected.txt | 47 ++++++++
...re-tapHighlight-pixel-rotated-link-expected.txt | 6 +
.../overflow/iframe-scroll-children-expected.txt | 2 +
.../webgl/webgl-copy-image-expected.txt | 7 ++
.../selection/button-right-click-expected.txt | 3 +
.../selection-in-iframe-removed-crash-expected.txt | 1 +
...est-animation-frame-detach-element-expected.txt | 1 +
...st-animation-frame-detach-element2-expected.txt | 1 +
.../float/trailing-float-layout-2-expected.txt | 3 +
...ppers-when-subtree-being-destroyed-expected.txt | 2 +
.../extreme-outline-offset-crash-expected.txt | 1 +
.../css-tables-expected.txt | 25 +++++
...tent-container-with-replaced-child-expected.txt | 9 ++
.../intrinsic-sized-blocks-expected.txt | 16 +++
.../css-intrinsic-dimensions/tables-expected.txt | 25 +++++
.../inline-contain-layout-crash-expected.txt | 1 +
.../display-inline-block-scrollbar-expected.txt | 2 +
.../crash-flexbox-no-layout-child-expected.txt | 3 +
.../dom/Document/xml-document-focus-expected.txt | 10 ++
.../HTMLImageElement/image-picture-1x-expected.txt | 30 +++++
.../image-picture-in-template-expected.txt | 12 ++
.../image-picture-invalid-expected.txt | 19 ++++
.../image-picture-nested-expected.txt | 25 +++++
...age-picture-source-dynamic-changes-expected.txt | 13 +++
...mage-picture-source-src-and-srcset-expected.txt | 2 +
.../image-picture-source-src-expected.txt | 2 +
.../nodesFromRect-continuation-crash-expected.txt | 3 +
...nt-path-for-user-agent-shadow-tree-expected.txt | 29 +++++
.../fast/dom/window-load-crash-expected.txt | 2 +
.../fast/encoding/bracket-in-tag-expected.txt | 2 +
.../text/input-element-attach-crash-expected.txt | 2 +
.../text/textfield-inside-anchor-expected.txt | 4 +
...ented-iframe-cleared-contentWindow-expected.txt | 5 +
.../frames/unique-name-set-same-name-expected.txt | 6 +
...ixed-repeating-gradient-color-hint-expected.txt | 1 +
.../html/layout-runs-and-floats-crash-expected.txt | 2 +
.../vertical-align-top-and-bottom-expected.txt | 2 +
.../inline-offsetLeft-continuation-expected.txt | 2 +
.../fast/js/text-field-resize-expected.txt | 3 +
.../image-map-alt-content-crash-expected.txt | 2 +
...er-inline-cast-to-render-box-crash-expected.txt | 1 +
...y-run-percentage-height-descendant-expected.txt | 2 +
.../snav-div-in-anchor-expected.txt | 7 ++
.../snav-fully-aligned-horizontally-expected.txt | 49 ++++++++
.../snav-imagemap-area-not-focusable-expected.txt | 11 ++
.../snav-imagemap-area-without-image-expected.txt | 9 ++
.../snav-imagemap-overlapped-areas-expected.txt | 19 ++++
.../snav-imagemap-simple-expected.txt | 17 +++
.../snav-zero-margin-content-expected.txt | 6 +
...inline-anonoymous-wrapper-to-block-expected.txt | 2 +
.../fast/text/font-linux-normalize-expected.txt | 2 +
...ween-text-nodes-with-inline-blocks-expected.txt | 2 +
.../fast/xpath/preceding-axis-expected.txt | 18 +++
.../fast/xpath/union-context-node-expected.txt | 62 ++++++++++
.../full-screen-line-boxes-crash-expected.txt | 4 +
.../tests/cache/cached-main-resource-expected.txt | 2 +
.../http/tests/cache/iframe-304-crash-expected.txt | 5 +
.../tests/loading/nested_bad_objects-expected.txt | 6 +
.../loading/preload-picture-nested-expected.txt | 47 ++++++++
.../loading/preload-picture-sizes-2x-expected.txt | 61 ++++++++++
.../loading/preload-picture-sizes-expected.txt | 63 +++++++++++
.../recreate-location-after-detach-expected.txt | 1 +
...rofile-background-image-cross-fade-expected.txt | 1 +
...le-background-image-cross-fade-png-expected.txt | 1 +
...olor-profile-munsell-adobe-to-srgb-expected.txt | 42 +++++++
...color-profile-munsell-srgb-to-srgb-expected.txt | 42 +++++++
.../images/crash-bad-cast-expected.txt | 1 +
.../images/imagemap-nested-area-expected.txt | 4 +
.../elements/styles-2/add-import-rule-expected.txt | 21 ++++
...yer-sticky-position-constraint-get-expected.txt | 67 +++++++++++
.../obscured-background-no-repaint-expected.txt | 4 +
...me-composited-nonstacking-ancestor-expected.txt | 2 +
.../printing/webgl-repeated-printing-expected.txt | 19 ++++
...ted-printing-preservedrawingbuffer-expected.txt | 19 ++++
.../multiple-begin-animation-events-expected.txt | 1 +
.../traversal/tree-walker-001-expected.txt | 20 ++++
.../traversal/tree-walker-002-expected.txt | 16 +++
.../traversal/tree-walker-005-expected.txt | 16 +++
.../svg/animations/exposed/effect-expected.txt | 5 +
.../float/trailing-float-layout-2-expected.txt | 3 +
.../iterators/TextIteratorTextNodeHandler.cpp | 125 +++++++++++++++++++--
.../iterators/TextIteratorTextNodeHandler.h | 5 +
87 files changed, 1263 insertions(+), 10 deletions(-)

Upstream: git.chromium.org


  • Share