mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 03:25:13 +00:00
LibHTML: Oops, fix build.
It's another "hacking on the train and forgetting to try a full build" episode, this time starring LibHTML.
This commit is contained in:
parent
ab90d2e251
commit
3c71dc4320
Notes:
sideshowbarker
2024-07-19 13:22:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3c71dc4320d
1 changed files with 4 additions and 4 deletions
|
@ -69,14 +69,14 @@ RefPtr<LayoutNode> Frame::generate_layout_tree(const StyledNode& styled_root)
|
|||
}
|
||||
};
|
||||
|
||||
Function<RefPtr<LayoutNode>(const StyledNode&, LayoutNode*)> build_layout_tree;
|
||||
build_layout_tree = [&](const StyledNode& styled_node, LayoutNode* parent_layout_node) -> RefPtr<LayoutNode> {
|
||||
Function<RefPtr<LayoutNode>(const StyledNode&)> build_layout_tree;
|
||||
build_layout_tree = [&](const StyledNode& styled_node) -> RefPtr<LayoutNode> {
|
||||
auto layout_node = create_layout_node(styled_node);
|
||||
if (!layout_node)
|
||||
return nullptr;
|
||||
if (styled_node.has_children()) {
|
||||
for (auto* styled_child = styled_node.first_child(); styled_child; styled_child = styled_child->next_sibling()) {
|
||||
auto layout_child = build_layout_tree(*styled_child, layout_node.ptr());
|
||||
auto layout_child = build_layout_tree(*styled_child);
|
||||
if (!layout_child)
|
||||
continue;
|
||||
layout_node->append_child(*layout_child);
|
||||
|
@ -85,7 +85,7 @@ RefPtr<LayoutNode> Frame::generate_layout_tree(const StyledNode& styled_root)
|
|||
return layout_node;
|
||||
};
|
||||
|
||||
return build_layout_tree(styled_root, nullptr);
|
||||
return build_layout_tree(styled_root);
|
||||
}
|
||||
|
||||
void Frame::layout()
|
||||
|
|
Loading…
Add table
Reference in a new issue