From 5abffc9c5a462fe7ed7d8d2da4d3367b346eaf9d Mon Sep 17 00:00:00 2001 From: MacDue Date: Mon, 10 Apr 2023 12:48:57 +0100 Subject: [PATCH] Tests: Add layout test for SVG transforms and viewboxes Now that these are kind of working, lets add a layout test to prevent future regressions :^) This test is the same as the previous example (it is copied, though that seems to have been done for other tests, e.g. Acid 1). --- .../expected/svg-transforms-and-viewboxes.txt | 96 +++++++++++++++ .../input/svg-transforms-and-viewboxes.html | 111 ++++++++++++++++++ 2 files changed, 207 insertions(+) create mode 100644 Tests/LibWeb/Layout/expected/svg-transforms-and-viewboxes.txt create mode 100644 Tests/LibWeb/Layout/input/svg-transforms-and-viewboxes.html diff --git a/Tests/LibWeb/Layout/expected/svg-transforms-and-viewboxes.txt b/Tests/LibWeb/Layout/expected/svg-transforms-and-viewboxes.txt new file mode 100644 index 0000000000..8b8fc8b1da --- /dev/null +++ b/Tests/LibWeb/Layout/expected/svg-transforms-and-viewboxes.txt @@ -0,0 +1,96 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x700 children: not-inline + BlockContainer at (50,50) content-size 700x600 children: inline + line 0 width: 616, height: 203.46875, bottom: 203.46875, baseline: 200 + frag 0 from SVGSVGBox start: 0, length: 0, rect: [50,150 200x100] + frag 1 from TextNode start: 0, length: 1, rect: [250,236 8x17.46875] + " " + frag 2 from SVGSVGBox start: 0, length: 0, rect: [258,50 200x200] + frag 3 from TextNode start: 0, length: 1, rect: [458,236 8x17.46875] + " " + frag 4 from SVGSVGBox start: 0, length: 0, rect: [466,50 200x200] + line 1 width: 616, height: 203.46875, bottom: 403.46875, baseline: 200 + frag 0 from SVGSVGBox start: 0, length: 0, rect: [50,250 200x200] + frag 1 from TextNode start: 0, length: 1, rect: [250,436 8x17.46875] + " " + frag 2 from SVGSVGBox start: 0, length: 0, rect: [258,250 200x200] + frag 3 from TextNode start: 0, length: 1, rect: [458,436 8x17.46875] + " " + frag 4 from SVGSVGBox start: 0, length: 0, rect: [466,250 200x200] + line 2 width: 200, height: 200, bottom: 600, baseline: 200 + frag 0 from SVGSVGBox start: 0, length: 0, rect: [50,450 200x200] + SVGSVGBox at (50,150) content-size 200x100 children: inline + TextNode <#text> + SVGGraphicsBox children: inline + TextNode <#text> + SVGGeometryBox at (45.193222,199.330932) content-size 119.782173x48.453796 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGraphicsBox children: inline + TextNode <#text> + SVGGeometryBox at (84.5,159.504882) content-size 81x80.995117 children: not-inline + TextNode <#text> + TextNode <#text> + TextNode <#text> + SVGSVGBox at (258,50) content-size 200x200 children: inline + TextNode <#text> + SVGGeometryBox at (267.5,59.5) content-size 31x21 children: not-inline + TextNode <#text> + SVGGeometryBox at (287.5,129.5) content-size 111x91 children: not-inline + TextNode <#text> + TextNode <#text> + SVGSVGBox at (466,50) content-size 200x200 children: inline + TextNode <#text> + SVGGeometryBox at (505.5,89.5) content-size 121x121 children: not-inline + TextNode <#text> + SVGGeometryBox at (470.858978,89.5) content-size 190.282043x121 children: not-inline + TextNode <#text> + TextNode <#text> + SVGSVGBox at (50,250) content-size 200x200 children: inline + TextNode <#text> + SVGGeometryBox at (120.088233,320.088256) content-size 59.823524x59.823528 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (51.943771,309.873626) content-size 69.144462x69.144454 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (178.911773,320.981903) content-size 69.14447x69.144462 children: not-inline + TextNode <#text> + TextNode <#text> + SVGSVGBox at (258,250) content-size 200x200 children: inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (277.5,269.5) content-size 161x161 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (337.5,269.5) content-size 41x161 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (277.5,329.5) content-size 161x41 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (337.5,329.5) content-size 41x41 children: not-inline + TextNode <#text> + TextNode <#text> + SVGSVGBox at (466,250) content-size 200x200 children: inline + TextNode <#text> + SVGGeometryBox at (505.5,289.5) content-size 121x121 children: not-inline + TextNode <#text> + SVGGeometryBox at (505.5,254.858978) content-size 121x190.282043 children: not-inline + TextNode <#text> + TextNode <#text> + SVGSVGBox at (50,450) content-size 200x200 children: inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (59.5,459.5) content-size 81x81 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (159.5,459.5) content-size 81x81 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (59.5,559.5) content-size 81x81 children: not-inline + TextNode <#text> + TextNode <#text> + SVGGeometryBox at (159.5,559.5) content-size 81x81 children: not-inline + TextNode <#text> + TextNode <#text> diff --git a/Tests/LibWeb/Layout/input/svg-transforms-and-viewboxes.html b/Tests/LibWeb/Layout/input/svg-transforms-and-viewboxes.html new file mode 100644 index 0000000000..7a57014a5c --- /dev/null +++ b/Tests/LibWeb/Layout/input/svg-transforms-and-viewboxes.html @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +