mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibWeb: Make StackingContext point to paint tree instead of layout tree
Eventually we should not need the layout tree for anything when painting and this code will only look at the paint tree. For now, this is just another step in that direction.
This commit is contained in:
parent
1e0ea45fe5
commit
d296992fb3
6 changed files with 86 additions and 100 deletions
|
@ -31,7 +31,7 @@ void ViewportPaintable::build_stacking_context_tree_if_needed()
|
|||
|
||||
void ViewportPaintable::build_stacking_context_tree()
|
||||
{
|
||||
set_stacking_context(make<StackingContext>(layout_box(), nullptr, 0));
|
||||
set_stacking_context(make<StackingContext>(*this, nullptr, 0));
|
||||
|
||||
size_t index_in_tree_order = 1;
|
||||
for_each_in_subtree_of_type<PaintableBox>([&](PaintableBox const& paintable) {
|
||||
|
@ -43,7 +43,7 @@ void ViewportPaintable::build_stacking_context_tree()
|
|||
}
|
||||
auto* parent_context = paintable_box.enclosing_stacking_context();
|
||||
VERIFY(parent_context);
|
||||
paintable_box.set_stacking_context(make<Painting::StackingContext>(paintable_box.layout_box(), parent_context, index_in_tree_order++));
|
||||
paintable_box.set_stacking_context(make<Painting::StackingContext>(paintable_box, parent_context, index_in_tree_order++));
|
||||
return TraversalDecision::Continue;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue