[LayoutNG] Implement hit testing

Desktop / Chromium - Emil A Eklund [chromium.org] - 11 October 2017 15:08 EDT

Implement hit testing using the LayoutNG fragment tree. Thereby allowing hit testing to work when fragment painting is enabled and no legacy tree is produced. It's an important step towards enabling fragment painting & disabling legacy propagation by default.

Previously hit testing used the legacy layout tree and required geometry information and line boxes to be copied over from LayoutNG to the legacy layout tree.

Also changes NGTextFragmentBuilder to use dedicated set methods for each use case instead of a number of unrelated ones in order to prevent stale or uninitialized data from previous runs to be used for subsequent ones.

Bug: 714962, 636993 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Ib77fa9e2755a9202623681d41e553489854f0594 Reviewed-on: https://chromium-review.googlesource.com/710498

ba8b428 [LayoutNG] Implement hit testing
.../layout/ng/inline/ng_inline_layout_algorithm.cc | 20 +--
.../layout/ng/inline/ng_text_fragment_builder.cc | 58 ++++---
.../layout/ng/inline/ng_text_fragment_builder.h | 34 ++---
.../Source/core/layout/ng/layout_ng_block_flow.cc | 27 ++++
.../Source/core/layout/ng/layout_ng_block_flow.h | 7 +
.../Source/core/paint/ng/ng_block_flow_painter.cc | 12 ++
.../Source/core/paint/ng/ng_block_flow_painter.h | 12 +-
.../core/paint/ng/ng_box_fragment_painter.cc | 168 ++++++++++++++++++++-
.../Source/core/paint/ng/ng_box_fragment_painter.h | 26 +++-
.../Source/core/paint/ng/ng_paint_fragment.h | 8 +
10 files changed, 310 insertions(+), 62 deletions(-)

Upstream: git.chromium.org


  • Share