LibWeb: Reorder paintable hit-testing to account for pointer-events

Instead of ignoring any paintable immediately when they're invisible to
hit-testing, consider every candidate and while the most specific
candidate is invisible to hit-testing, traverse up to its parent
paintable.

This more closely reflects the behavior expected when wrapping block
elements inside inline elements, where although the block element might
have `pointer-events: none`, it still becomes part of the hit-test body
of the inline parent.

This makes the following link work as expected:

  <a href="https://ladybird.org">
    <div style="pointer-events: none">Ladybird</div>
  </a>
This commit is contained in:
Jelle Raaijmakers 2025-01-21 15:24:46 +01:00 committed by Jelle Raaijmakers
commit b7a554d1f2
Notes: github-actions[bot] 2025-01-23 08:34:09 +00:00
4 changed files with 76 additions and 10 deletions

View file

@ -0,0 +1,12 @@
<DIV id="a1" >
<BODY >
---
<DIV id="b3" >
<DIV id="b2" >
---
<A id="c1" >
<BODY >
---
<I id="d2" >
<B id="d1" >
---