LibWeb: Do not consider <foreignObject> for inline continuation

We used to have an exception for this element that erroneously got
removed in 336684bc5c.

Fixes #3453.
This commit is contained in:
Jelle Raaijmakers 2025-02-19 10:31:47 +01:00 committed by Andreas Kling
commit c0109039cb
Notes: github-actions[bot] 2025-02-19 12:50:31 +00:00
3 changed files with 21 additions and 0 deletions

View file

@ -611,6 +611,7 @@ void TreeBuilder::update_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
// because the restructuring adds new children after this node that become part of the ancestor stack.
auto* layout_parent = layout_node->parent();
if (layout_parent && layout_parent->display().is_inline_outside() && !display.is_contents()
&& !is<SVG::SVGForeignObjectElement>(layout_parent->dom_node())
&& !display.is_inline_outside() && layout_parent->display().is_flow_inside() && !layout_node->is_out_of_flow())
restructure_block_node_in_inline_parent(static_cast<NodeWithStyleAndBoxModelMetrics&>(*layout_node));
}