Commit Graph

2 Commits

Author SHA1 Message Date
Aliaksandr Kalenik
98afd82491 LibWeb: Integrate clip-path into AccumulatedVisualContext
Previously, clip-path was applied only during painting in
StackingContext::paint(), which meant hit testing did not respect
clip-path boundaries. Clicks outside the visible clipped region but
inside the element's bounding box would incorrectly register as hits.

By moving clip-path into AccumulatedVisualContext, it becomes part of
the same system that handles transforms, clips, and scroll offsets for
both painting and hit testing, ensuring consistent behavior.
2026-01-16 13:39:02 +01:00
Aliaksandr Kalenik
795639fd2b Tests: Add test for clip-path hit testing
This test demonstrates the current broken behavior where hit testing
does not respect clip-path boundaries. Clicking outside the clipped
circle (but inside the element's bounding box) incorrectly registers
as a hit on the element.
2026-01-16 13:39:02 +01:00