mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:57:44 +00:00
LibWeb: Hang StackingContext off of the paint boxes
Stacking contexts have nothing to do with layout and everything with painting, so let's keep them in Painting::Box.
This commit is contained in:
parent
cc8e429126
commit
9f5cbcaad3
10 changed files with 39 additions and 38 deletions
|
@ -165,7 +165,7 @@ Layout::HitTestResult StackingContext::hit_test(const Gfx::IntPoint& position, L
|
|||
Layout::HitTestResult result;
|
||||
// 6. the child stacking contexts with stack level 0 and the positioned descendants with stack level 0.
|
||||
m_box.for_each_in_subtree_of_type<Layout::Box>([&](Layout::Box const& box) {
|
||||
if (box.is_positioned() && !box.stacking_context()) {
|
||||
if (box.is_positioned() && !box.m_paint_box->stacking_context()) {
|
||||
result = box.hit_test(position, type);
|
||||
if (result.layout_node)
|
||||
return IterationDecision::Break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue