diff options
author | Andreas Kling <kling@serenityos.org> | 2023-04-18 19:32:00 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-04-19 07:52:26 +0200 |
commit | ce5a9391482b054ba231e6e10de75f1de3287893 (patch) | |
tree | 3d611255d2719168bb844dff582f2c37839b8def /Tests/LibWeb | |
parent | ec5d5918c4f9f6e389f16154e24450a2bb170876 (diff) | |
download | serenity-ce5a9391482b054ba231e6e10de75f1de3287893.zip |
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. :^)
Diffstat (limited to 'Tests/LibWeb')
-rw-r--r-- | Tests/LibWeb/Layout/expected/svg/svg-inside-svg.txt | 10 | ||||
-rw-r--r-- | Tests/LibWeb/Layout/input/svg/svg-inside-svg.html | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/expected/svg/svg-inside-svg.txt b/Tests/LibWeb/Layout/expected/svg/svg-inside-svg.txt new file mode 100644 index 0000000000..b8b8734e33 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/svg/svg-inside-svg.txt @@ -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> diff --git a/Tests/LibWeb/Layout/input/svg/svg-inside-svg.html b/Tests/LibWeb/Layout/input/svg/svg-inside-svg.html new file mode 100644 index 0000000000..03ead1fa2e --- /dev/null +++ b/Tests/LibWeb/Layout/input/svg/svg-inside-svg.html @@ -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>
\ No newline at end of file |