mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:38:10 +00:00
LibHTML: Add a simple TreeNode<T> template for making trees.
We'll be making a lot of trees here, so let's share code during bootstrap. Eventually some of these classes are gonna want custom trees but for now we can just fit them all into the same clothes.
This commit is contained in:
parent
e9b619c4aa
commit
8adae51b35
8 changed files with 68 additions and 109 deletions
|
@ -21,8 +21,8 @@ static void create_layout_tree_for_node(Node& node)
|
|||
printf("created layout node for <%s>, parent is %p, parent ln is %p\n", static_cast<const Element&>(node).tag_name().characters(), node.parent_node(), node.parent_node()->layout_node());
|
||||
}
|
||||
#endif
|
||||
if (node.parent_node() && node.parent_node()->layout_node())
|
||||
node.parent_node()->layout_node()->append_child(*layout_node);
|
||||
if (node.parent() && node.parent()->layout_node())
|
||||
node.parent()->layout_node()->append_child(*layout_node);
|
||||
}
|
||||
if (node.is_parent_node()) {
|
||||
static_cast<ParentNode&>(node).for_each_child([&](auto& child) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue