mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibWeb: Give DOM::Node a direct pointer to its Paintable
Instead of going via the layout tree.
This commit is contained in:
parent
25375bf1d5
commit
3d7c880a42
3 changed files with 14 additions and 6 deletions
|
@ -209,6 +209,8 @@ static void build_paint_tree(Node& node, Painting::Paintable* parent_paintable =
|
|||
parent_paintable->append_child(paintable);
|
||||
}
|
||||
paintable.set_dom_node(node.dom_node());
|
||||
if (node.dom_node())
|
||||
node.dom_node()->set_paintable(&paintable);
|
||||
for (auto* child = node.first_child(); child; child = child->next_sibling()) {
|
||||
build_paint_tree(*child, &paintable);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue