• Xiaocheng Hu's avatar
    [LayoutNG] Implement hit test on culled inline elements · c0d690f1
    Xiaocheng Hu authored
    This patch implements hit testing on culled inline elements by:
    
    - After hit testing each inline fragment, fall back to the legacy
      LayoutObject tree to see if there is any culled inline ancestor
      element, and hit test each of them. This part replicates relevant
      logic in InlineFlowBox::NodeAtPoint.
    
    - Adds a |parent_fragment| parameter to
      LayoutInline::HitTestCulledInline to ensure that only descendant
      rects of |parent_fragment| are hit tested. This ensure that, e.g.,
      for a multi-line SPAN, we hit test its rects line-by-line, to ensure
      correct hit test ordering.
    
    Tests: 6 layout tests are fixed. One of them is rebaselined due to
    whitespace-only difference in text dump.
    
    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: Ic303ce5f8a192f92ad326c304a9d84fa898e4c94
    Reviewed-on: https://chromium-review.googlesource.com/1110737Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
    Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
    Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
    Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#570335}
    c0d690f1
enable-blink-features=LayoutNG 73.9 KB