mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Implement hit testing a bit closer to spec
We now perform hit testing in reverse paint order as described in CSS2's section about the z-index property.
This commit is contained in:
parent
0401d7da36
commit
15ed0ebdc6
Notes:
sideshowbarker
2024-07-17 17:58:11 +09:00
Author: https://github.com/awesomekling
Commit: 15ed0ebdc6
4 changed files with 74 additions and 26 deletions
|
@ -101,7 +101,7 @@ HitTestResult BlockContainer::hit_test(const Gfx::IntPoint& position, HitTestTyp
|
|||
|
||||
if (type == HitTestType::TextCursor && last_good_candidate.layout_node)
|
||||
return last_good_candidate;
|
||||
return { absolute_rect().contains(position.x(), position.y()) ? this : nullptr };
|
||||
return { absolute_border_box_rect().contains(position.x(), position.y()) ? this : nullptr };
|
||||
}
|
||||
|
||||
bool BlockContainer::is_scrollable() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue