LibWeb: Do not crash when inserting block elements into inline SVGBoxes

Fixes #3395.
This commit is contained in:
Jelle Raaijmakers 2025-02-19 11:04:15 +01:00 committed by Andreas Kling
commit 5f5d18d719
Notes: github-actions[bot] 2025-02-19 12:50:19 +00:00
3 changed files with 10 additions and 5 deletions

View file

@ -1232,6 +1232,10 @@ bool NodeWithStyleAndBoxModelMetrics::should_create_inline_continuation() const
if (is<SVG::SVGForeignObjectElement>(parent()->dom_node()))
return false;
// SVGBoxes are appended directly to their layout parent without changing the parent's (non-)inline behavior.
if (is_svg_box())
return false;
return true;
}