1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:17:36 +00:00

LibWeb: Update SVG <circle> element to use geometry properties

With this the `<circle>` element now correctly parses percentage sizes,
and resolves them relative to the viewport.

The rest of the geometry elements are still left TODO.
This commit is contained in:
MacDue 2024-03-03 20:47:10 +00:00 committed by Andreas Kling
parent 344eb98b3c
commit 74b655d035
6 changed files with 71 additions and 35 deletions

View file

@ -8,7 +8,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
SVGGeometryBox <rect> at (8,8) content-size 1x1 children: not-inline
TextNode <#text>
SVGGeometryBox <circle> at (8.09375,8.09375) content-size 0.796875x0.796875 children: not-inline
SVGGeometryBox <circle> at (8.09375,8.09375) content-size 0.8125x0.8125 children: not-inline
TextNode <#text>
TextNode <#text>
SVGGeometryBox <rect> at (8,8) content-size 200x200 children: not-inline

View file

@ -0,0 +1,13 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x366 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x350 children: inline
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 784x350] baseline: 350
SVGSVGBox <svg> at (8,8) content-size 784x350 [SVG] children: not-inline
SVGGeometryBox <circle> at (250,28) content-size 300x300 children: not-inline
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x366]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x350]
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 784x350]
SVGPathPaintable (SVGGeometryBox<circle>) [250,28 300x300]