mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:17:36 +00:00
LibWeb: Layout <svg> nested inside <svg>
This is far from perfect, but let's at least make an attempt at laying out <svg> when encountering it inside another <svg>. This makes https://awesomekling.substack.com actually load and render instead of asserting. :^)
This commit is contained in:
parent
ec5d5918c4
commit
ce5a939148
3 changed files with 29 additions and 3 deletions
10
Tests/LibWeb/Layout/expected/svg/svg-inside-svg.txt
Normal file
10
Tests/LibWeb/Layout/expected/svg/svg-inside-svg.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x40 children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x24 children: inline
|
||||
line 0 width: 24, height: 24, bottom: 24, baseline: 24
|
||||
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 24x24]
|
||||
SVGSVGBox <svg> at (8,8) content-size 24x24 children: inline
|
||||
SVGGraphicsBox <g> children: inline
|
||||
SVGSVGBox <svg> at (8,8) content-size 24x24 children: not-inline
|
||||
SVGGeometryBox <rect> at (8,8) content-size 24x24 children: not-inline
|
||||
TextNode <#text>
|
12
Tests/LibWeb/Layout/input/svg/svg-inside-svg.html
Normal file
12
Tests/LibWeb/Layout/input/svg/svg-inside-svg.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<!doctype html><body><svg
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
><g><svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
><rect x="0" y="0" width="24" height="24"></svg></g>
|
||||
</svg>
|
Loading…
Add table
Add a link
Reference in a new issue