mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:17:45 +00:00
LibWeb: Use Layout::Box::paint_box() accessor in more places
This commit is contained in:
parent
02b316fd5c
commit
9461e44afa
22 changed files with 60 additions and 61 deletions
|
@ -159,7 +159,7 @@ public:
|
|||
return;
|
||||
|
||||
auto& box_child = verify_cast<Box>(child);
|
||||
auto* stacking_context = box_child.m_paint_box->stacking_context();
|
||||
auto* stacking_context = box_child.paint_box()->stacking_context();
|
||||
if (stacking_context && box_child.computed_values().z_index().has_value() && box_child.computed_values().z_index().value() < 0)
|
||||
callback(child);
|
||||
});
|
||||
|
@ -167,7 +167,7 @@ public:
|
|||
// 4. For all its in-flow, non-positioned, block-level descendants in tree order: If the element is a block, list-item,
|
||||
// or other block equivalent:
|
||||
for_each_child([&](auto& child) {
|
||||
if (is<Box>(child) && verify_cast<Box>(child).m_paint_box->stacking_context())
|
||||
if (is<Box>(child) && verify_cast<Box>(child).paint_box()->stacking_context())
|
||||
return;
|
||||
if (!child.is_positioned())
|
||||
callback(child);
|
||||
|
@ -177,7 +177,7 @@ public:
|
|||
// a new stacking context, but any positioned descendants and descendants which actually create a new stacking context
|
||||
// should be considered part of the parent stacking context, not this new one.
|
||||
for_each_child([&](auto& child) {
|
||||
if (is<Box>(child) && verify_cast<Box>(child).m_paint_box->stacking_context())
|
||||
if (is<Box>(child) && verify_cast<Box>(child).paint_box()->stacking_context())
|
||||
return;
|
||||
if (child.is_positioned())
|
||||
callback(child);
|
||||
|
@ -192,7 +192,7 @@ public:
|
|||
return;
|
||||
|
||||
auto& box_child = verify_cast<Box>(child);
|
||||
auto* stacking_context = box_child.m_paint_box->stacking_context();
|
||||
auto* stacking_context = box_child.paint_box()->stacking_context();
|
||||
if (stacking_context && box_child.computed_values().z_index().has_value() && box_child.computed_values().z_index().value() == 0)
|
||||
callback(child);
|
||||
});
|
||||
|
@ -205,7 +205,7 @@ public:
|
|||
return;
|
||||
|
||||
auto& box_child = verify_cast<Box>(child);
|
||||
auto* stacking_context = box_child.m_paint_box->stacking_context();
|
||||
auto* stacking_context = box_child.paint_box()->stacking_context();
|
||||
if (stacking_context && box_child.computed_values().z_index().has_value() && box_child.computed_values().z_index().value() > 0)
|
||||
callback(child);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue