1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

LibWeb: Check for invalid SVG viewBox sizes

Fixes #21825
This commit is contained in:
MacDue 2023-11-11 21:11:27 +00:00 committed by Andreas Kling
parent cdfe893717
commit f57b3423eb
3 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,16 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x100 children: inline
line 0 width: 100, height: 100, bottom: 100, baseline: 100
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100]
SVGSVGBox <svg> at (8,8) content-size 100x100 [SVG] children: inline
TextNode <#text>
SVGTextBox <text> (not painted) children: inline
TextNode <#text>
TextNode <#text>
TextNode <#text>
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]

View file

@ -0,0 +1,3 @@
<svg width="100" height="100" viewBox="0 0 0 0">
<text>Hello!</text>
</svg>

After

Width:  |  Height:  |  Size: 78 B