mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 19:56:30 +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
Notes:
sideshowbarker
2024-07-17 03:03:37 +09:00
Author: https://github.com/awesomekling
Commit: 3d7c880a42
Pull-request: https://github.com/SerenityOS/serenity/pull/20661
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