mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibWeb: Prevent hidden PaintableWithLines being hit tested
Now follows the same pattern as PaintableBox and StackingContext, where it exits if hidden, then hit tests children, then hit tests itself if it's `visible_for_hit_testing()`.
This commit is contained in:
parent
4e892b8b67
commit
5c14db868d
Notes:
github-actions[bot]
2025-09-08 13:37:27 +00:00
Author: https://github.com/zacoons
Commit: 5c14db868d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6125
3 changed files with 8 additions and 2 deletions
|
@ -1266,6 +1266,9 @@ TraversalDecision PaintableWithLines::hit_test(CSSPixelPoint position, HitTestTy
|
|||
if (clip_rect_for_hit_testing().has_value() && !clip_rect_for_hit_testing()->contains(position))
|
||||
return TraversalDecision::Continue;
|
||||
|
||||
if (computed_values().visibility() != CSS::Visibility::Visible)
|
||||
return TraversalDecision::Continue;
|
||||
|
||||
// TextCursor hit testing mode should be able to place cursor in contenteditable elements even if they are empty
|
||||
if (m_fragments.is_empty()
|
||||
&& !has_children()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue