LibWeb: Resolve CSS variables if present in SVG presentation attributes

SVG presentation attributes are parsed as CSS values, so we also need to
handle CSS variable expansion when handling them.

This (roughly) matches the behavior of other engines. It's also used on
the web, for example on https://stripe.com/ :^)
This commit is contained in:
Andreas Kling 2023-05-23 18:14:47 +02:00
commit 71d5dc510e
Notes: sideshowbarker 2024-07-17 06:35:16 +09:00
3 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,7 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x118 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 784x102 children: inline
line 0 width: 102, height: 102, bottom: 102, baseline: 60
frag 0 from SVGSVGBox start: 0, length: 0, rect: [9,9 100x100]
SVGSVGBox <svg> at (9,9) content-size 100x100 [SVG] children: not-inline
SVGGeometryBox <rect> at (29,29) content-size 60x60 children: not-inline