LibWeb: Don't generate layout nodes for DOM inside replaced elements

Before this change, we'd show both a <canvas>, and any fallback content
inside the <canvas> for browsers that don't support <canvas>. :^)
This commit is contained in:
Andreas Kling 2020-11-28 00:42:24 +01:00
parent ff8ac60184
commit 99536449d5
Notes: sideshowbarker 2024-07-19 01:14:15 +09:00

View file

@ -129,6 +129,10 @@ 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()) {
push_parent(*layout_node);
downcast<DOM::ParentNode>(dom_node).for_each_child([&](auto& dom_child) {