LibWeb: Support percentage values in SVG line element

This commit is contained in:
Edwin Hoksberg 2024-07-21 19:21:29 +02:00 committed by Andreas Kling
commit ac6126e263
Notes: github-actions[bot] 2024-07-21 17:57:27 +00:00
4 changed files with 59 additions and 21 deletions

View file

@ -0,0 +1,23 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x408 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x392 children: inline
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x392] baseline: 392
SVGSVGBox <svg> at (8,8) content-size 784x392 [SVG] children: inline
TextNode <#text>
SVGGeometryBox <line> at (6.046875,135.40625) content-size 787.921875x3.921875 children: not-inline
TextNode <#text>
SVGGeometryBox <line> at (6.046875,264.765625) content-size 787.921875x3.921875 children: not-inline
TextNode <#text>
SVGGeometryBox <line> at (264.765625,6.046875) content-size 3.921875x395.921875 children: not-inline
TextNode <#text>
SVGGeometryBox <line> at (523.484375,6.046875) content-size 3.921875x395.921875 children: not-inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x408]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x392]
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x392]
SVGPathPaintable (SVGGeometryBox<line>) [6.046875,135.40625 787.921875x3.921875]
SVGPathPaintable (SVGGeometryBox<line>) [6.046875,264.765625 787.921875x3.921875]
SVGPathPaintable (SVGGeometryBox<line>) [264.765625,6.046875 3.921875x395.921875]
SVGPathPaintable (SVGGeometryBox<line>) [523.484375,6.046875 3.921875x395.921875]

View file

@ -0,0 +1,12 @@
<!doctype html><style>
line {
stroke: red;
}
</style>
<svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
<line x1="0" y1="33%" x2="100%" y2="33%"></line>
<line x1="0" y1="66%" x2="100%" y2="66%"></line>
<line x1="33%" y1="0" x2="33%" y2="100%"></line>
<line x1="66%" y1="0" x2="66%" y2="100%"></line>
</svg>