mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:58:11 +00:00
LibWeb: Ignore non-painting layout nodes when hit testing
We currently have to check this because the paint tree hangs from the layout tree and has no independent means of traversal.
This commit is contained in:
parent
85dd891811
commit
3c4bdd7cfa
1 changed files with 2 additions and 0 deletions
|
@ -341,6 +341,8 @@ Optional<HitTestResult> StackingContext::hit_test(Gfx::FloatPoint const& positio
|
|||
if (!m_box.children_are_inline()) {
|
||||
m_box.for_each_in_subtree_of_type<Layout::Box>([&](Layout::Box const& box) {
|
||||
if (!box.is_absolutely_positioned() && !box.is_floating()) {
|
||||
if (!box.paint_box())
|
||||
return IterationDecision::Continue;
|
||||
if (auto candidate = box.paint_box()->hit_test(transformed_position, type); candidate.has_value())
|
||||
result = move(candidate);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue