1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibWeb: Give Paintable its own pointer to the corresponding DOM node

Instead of going through the layout node's DOM pointer.
This commit is contained in:
Andreas Kling 2023-08-18 13:01:45 +02:00
parent 216bd513fa
commit e67ac16862
3 changed files with 21 additions and 2 deletions

View file

@ -208,6 +208,7 @@ static void build_paint_tree(Node& node, Painting::Paintable* parent_paintable =
}
parent_paintable->append_child(paintable);
}
paintable.set_dom_node(node.dom_node());
for (auto* child = node.first_child(); child; child = child->next_sibling()) {
build_paint_tree(*child, &paintable);
}