diff --git a/Libraries/LibWeb/Layout/Node.cpp b/Libraries/LibWeb/Layout/Node.cpp index b6768b22d53..28974d3291a 100644 --- a/Libraries/LibWeb/Layout/Node.cpp +++ b/Libraries/LibWeb/Layout/Node.cpp @@ -1413,6 +1413,10 @@ bool NodeWithStyleAndBoxModelMetrics::should_create_inline_continuation() const if (is_svg_box()) return false; + // SVGForeignObjectBoxes should never be split. + if (is_svg_foreign_object_box()) + return false; + return true; } diff --git a/Tests/LibWeb/Layout/expected/svg/svg-foreign-object-with-block-element.txt b/Tests/LibWeb/Layout/expected/svg/svg-foreign-object-with-block-element.txt index a399623e2a2..90135bba377 100644 --- a/Tests/LibWeb/Layout/expected/svg/svg-foreign-object-with-block-element.txt +++ b/Tests/LibWeb/Layout/expected/svg/svg-foreign-object-with-block-element.txt @@ -1,31 +1,22 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline - BlockContainer at (0,0) content-size 800x316 [BFC] children: not-inline - BlockContainer
at (8,8) content-size 784x300 children: not-inline - BlockContainer <(anonymous)> at (8,8) content-size 784x100 children: inline - frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100 - SVGSVGBox