mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWeb: Prevent hit testing from transforming position more than once
The transform of each paintable was being applied multiple times due to the recursive nature of the hit testing methods. Previously it used combined_css_transform to transform the position, and then it would pass that position to children, which would then apply combined_css_transform again, and so on. PaintableBoxes are also not hit tested anymore when having a stacking context. A similar check is done in PaintableWithLines, but it was missing from PaintableBox. Without this check some elements can get returned multiple times from a hit test. StackingContexts with zero opacity will now also get hit tested, as it should have been before.
This commit is contained in:
Notes:
github-actions[bot]
2025-08-27 07:15:40 +00:00
Author: https://github.com/zacoons Commit: https://github.com/LadybirdBrowser/ladybird/commit/4070f5a7e03 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5681 Reviewed-by: https://github.com/gmta ✅
@@ -0,0 +1,10 @@
|
||||
Harness status: OK
|
||||
|
||||
Found 5 tests
|
||||
|
||||
5 Pass
|
||||
Pass hit testing of rectangle with 'translate' and 'rotate'
|
||||
Pass hit testing of rectangle with 'transform'
|
||||
Pass hit testing of rectangle with 'translate' and 'rotate' and 'scale' and 'transform'
|
||||
Pass hit testing of square with 'rotate'
|
||||
Pass hit testing of square with 'scale'
|
||||
Reference in New Issue
Block a user