diff --git a/Tests/LibWeb/Layout/expected/svg/abspos-svg-polygon.txt b/Tests/LibWeb/Layout/expected/svg/abspos-svg-polygon.txt new file mode 100644 index 00000000000..656b99c953f --- /dev/null +++ b/Tests/LibWeb/Layout/expected/svg/abspos-svg-polygon.txt @@ -0,0 +1,14 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x216 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x200 children: not-inline + BlockContainer
at (8,8) content-size 784x200 positioned children: inline + frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200] baseline: 200 + SVGSVGBox at (8,8) content-size 200x200 [SVG] children: not-inline + SVGGeometryBox at (48,18) content-size 120x170 positioned [BFC] children: not-inline + +ViewportPaintable (Viewport<#document>) [0,0 800x600] + PaintableWithLines (BlockContainer) [0,0 800x216] + PaintableWithLines (BlockContainer) [8,8 784x200] + PaintableWithLines (BlockContainer
) [8,8 784x200] + SVGSVGPaintable (SVGSVGBox) [8,8 200x200] + SVGPathPaintable (SVGGeometryBox) [48,18 120x170] diff --git a/Tests/LibWeb/Layout/input/svg/abspos-svg-polygon.html b/Tests/LibWeb/Layout/input/svg/abspos-svg-polygon.html new file mode 100644 index 00000000000..63856d12ed4 --- /dev/null +++ b/Tests/LibWeb/Layout/input/svg/abspos-svg-polygon.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp index 04496eb599f..16e30d0856f 100644 --- a/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/FormattingContext.cpp @@ -1222,6 +1222,11 @@ StaticPositionRect FormattingContext::calculate_static_position_rect(Box const& void FormattingContext::layout_absolutely_positioned_element(Box const& box, AvailableSpace const& available_space) { + if (box.is_svg_box()) { + dbgln("FIXME: Implement support for absolutely positioned SVG elements."); + return; + } + auto& containing_block_state = m_state.get_mutable(*box.containing_block()); // The size of the containing block of an abspos box is always definite from the perspective of the abspos box.