LibWeb: Test layout of standalone SVG document: edge cases

Tests with different combinations of missing width, height
and viewBox.

All tests confirmed to work on Ladybird:
 - exactly the same as Chromium (131.0.6778.85)
 - almost the same as Firefox (129.0.2)
    - only difference: standalone-w.svg: same size, different alignment
This commit is contained in:
Manuel Zahariev 2024-12-05 20:44:44 -08:00 committed by Sam Atkins
commit 5d85f3a5c8
Notes: github-actions[bot] 2024-12-13 15:03:48 +00:00
14 changed files with 181 additions and 0 deletions

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 128x600 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (0,172) content-size 128x256 children: not-inline
TextNode <#text>
SVGGraphicsBox <g> at (0,172) content-size 128x256 children: inline
TextNode <#text>
SVGGeometryBox <path> at (0,172) content-size 128x256 children: not-inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 128x600]
SVGPathPaintable (SVGGeometryBox<rect>) [0,172 128x256]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [0,172 128x256]
SVGPathPaintable (SVGGeometryBox<path>) [0,172 128x256]

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 128x600 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
SVGGraphicsBox <g> at (0,0) content-size 32x64 children: inline
TextNode <#text>
SVGGeometryBox <path> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 128x600]
SVGPathPaintable (SVGGeometryBox<rect>) [0,0 32x64]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [0,0 32x64]
SVGPathPaintable (SVGGeometryBox<path>) [0,0 32x64]

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 800x256 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
SVGGraphicsBox <g> at (0,0) content-size 32x64 children: inline
TextNode <#text>
SVGGeometryBox <path> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 800x256]
SVGPathPaintable (SVGGeometryBox<rect>) [0,0 32x64]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [0,0 32x64]
SVGPathPaintable (SVGGeometryBox<path>) [0,0 32x64]

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 800x600 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
SVGGraphicsBox <g> at (0,0) content-size 32x64 children: inline
TextNode <#text>
SVGGeometryBox <path> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 800x600]
SVGPathPaintable (SVGGeometryBox<rect>) [0,0 32x64]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [0,0 32x64]
SVGPathPaintable (SVGGeometryBox<path>) [0,0 32x64]

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 128x256 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
SVGGraphicsBox <g> at (0,0) content-size 32x64 children: inline
TextNode <#text>
SVGGeometryBox <path> at (0,0) content-size 32x64 children: not-inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 128x256]
SVGPathPaintable (SVGGeometryBox<rect>) [0,0 32x64]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [0,0 32x64]
SVGPathPaintable (SVGGeometryBox<path>) [0,0 32x64]

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 800x256 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (336,0) content-size 128x256 children: not-inline
TextNode <#text>
SVGGraphicsBox <g> at (336,0) content-size 128x256 children: inline
TextNode <#text>
SVGGeometryBox <path> at (336,0) content-size 128x256 children: not-inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 800x256]
SVGPathPaintable (SVGGeometryBox<rect>) [336,0 128x256]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [336,0 128x256]
SVGPathPaintable (SVGGeometryBox<path>) [336,0 128x256]

View file

@ -0,0 +1,18 @@
Viewport <#document> at (0,0) content-size 800x600 [BFC] children: not-inline
SVGSVGBox <svg> at (0,0) content-size 800x600 [SVG] children: inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (250,0) content-size 300x600 children: not-inline
TextNode <#text>
SVGGraphicsBox <g> at (250,0) content-size 300x600 children: inline
TextNode <#text>
SVGGeometryBox <path> at (250,0) content-size 300x600 children: not-inline
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 800x600]
SVGPathPaintable (SVGGeometryBox<rect>) [250,0 300x600]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [250,0 300x600]
SVGPathPaintable (SVGGeometryBox<path>) [250,0 300x600]