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:
parent
ff8ac60184
commit
99536449d5
Notes:
sideshowbarker
2024-07-19 01:14:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/99536449d5e
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue