mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 13:02:28 +00:00
LibWeb: Test layout of standalone SVG document: main use case
SVG document with specified width and height attributes is layed out with this width/height.
This commit is contained in:
parent
f5e01192cc
commit
5d77104c2f
Notes:
github-actions[bot]
2024-12-13 15:03:56 +00:00
Author: https://github.com/manuel-za
Commit: 5d77104c2f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2806
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/awesomekling
2 changed files with 24 additions and 0 deletions
17
Tests/LibWeb/Layout/expected/svg/standalone.txt
Normal file
17
Tests/LibWeb/Layout/expected/svg/standalone.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
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 128x256 children: not-inline
|
||||
TextNode <#text>
|
||||
SVGGraphicsBox <g> at (0,0) content-size 128x256 children: inline
|
||||
TextNode <#text>
|
||||
SVGGeometryBox <path> at (0,0) content-size 128x256 children: not-inline
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
SVGSVGPaintable (SVGSVGBox<svg>) [0,0 128x256]
|
||||
SVGPathPaintable (SVGGeometryBox<rect>) [0,0 128x256]
|
||||
SVGGraphicsPaintable (SVGGraphicsBox<g>) [0,0 128x256]
|
||||
SVGPathPaintable (SVGGeometryBox<path>) [0,0 128x256]
|
7
Tests/LibWeb/Layout/input/svg/standalone.svg
Normal file
7
Tests/LibWeb/Layout/input/svg/standalone.svg
Normal file
|
@ -0,0 +1,7 @@
|
|||
<svg viewBox="0 0 32 64" width="128" height="256" xmlns="http://www.w3.org/2000/svg">
|
||||
<title>white diamond on blue</title>
|
||||
<rect x="0" y="0" width="32" height="64" fill="blue"/>
|
||||
<g fill="white">
|
||||
<path d="M16 0 L32 32 L16 64 L0 32 Z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 272 B |
Loading…
Add table
Add a link
Reference in a new issue