mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibWeb: Allow <svg> layout boxes to have children
We can't say that "no replaced boxes can have children", since that breaks SVG. Instead, let each LayoutNode decide whether it's allowed to have children. Fixes #4223.
This commit is contained in:
@@ -129,11 +129,7 @@ void TreeBuilder::create_layout_tree(DOM::Node& dom_node)
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore fallback content inside replaced elements.
|
||||
if (layout_node->is_replaced())
|
||||
return;
|
||||
|
||||
if (dom_node.has_children()) {
|
||||
if (dom_node.has_children() && layout_node->can_have_children()) {
|
||||
push_parent(*layout_node);
|
||||
downcast<DOM::ParentNode>(dom_node).for_each_child([&](auto& dom_child) {
|
||||
create_layout_tree(dom_child);
|
||||
|
||||
Reference in New Issue
Block a user