Commit Graph

2 Commits

Author SHA1 Message Date
Aliaksandr Kalenik
8b411ff8c6 LibWeb: Account for border-radius in hit testing
This change adds border-radius awareness to hit testing in two places:
1. ClipData::contains() now uses BorderRadiiData::contains() to properly
   check if a point is inside a rounded clip rect. This handles overflow
   clips from ancestor elements that have border-radius.
2. PaintableBox::hit_test() now directly checks the element's own
   border-radius before reporting a hit.
2026-01-22 11:30:17 +01:00
Aliaksandr Kalenik
0db9ce6131 Tests/LibWeb: Add hit test for border-radius clip
This test demonstrates that hit testing incorrectly hits elements
in areas clipped by border-radius. The corner point (5,5) should
not hit the target element because it falls outside the rounded
corner, but currently it does.
2026-01-22 11:30:17 +01:00