[LayoutNG] Replicate most inline hit test behavior to NG
Legacy hit tests inline elements and nodes in the way that: - Enter inline boxes from block flow only when HitTestAction is kHitTestForeground (LineBoxList::HitTest) - When entering atomic inline from an inline box, hit test all phases regardless of the HitTestAction for parent (InlineBox::NodeAtPoint) - After hit testing the children of an InlineFlowBox, the InlineFlowBox itself is also hit tested (InlineFlowBox::NodeAtPoint). This applies even when the the InlineFlowBox is a RootInlineBox (i.e., line box). This patch replicates the above behaviors in NG. Since NG treats line boxes differently from normal inline boxes, this patch introduces NGBoxFragmentPainter::HitTestLineBoxFragment() for relevant handling. Note: this patch doesn't handled culled inlines. One test related to vertical-rl writing mode is regressed due to passing incorrect accumulated offset to legacy. This will be fixed later. Bug: 851075 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I5eceb4fe5c8270bc17407212ae2fe7c3841daf90 Reviewed-on: https://chromium-review.googlesource.com/1093577 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Reviewed-by:
Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#567814}
Showing
Please register or sign in to comment