diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/svg/shapes/reftests | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/svg/shapes/reftests')
9 files changed, 233 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/shapes/reftests/disabled-shapes-01.svg b/testing/web-platform/tests/svg/shapes/reftests/disabled-shapes-01.svg new file mode 100644 index 0000000000..49572fe71e --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/disabled-shapes-01.svg @@ -0,0 +1,61 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml"> + <title>Disabled shapes are not rendered</title> + <metadata> + <h:link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#RectElement"/> + <h:link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#CircleElement"/> + <h:link rel="help" href="https://svgwg.org/svg2-draft/shapes.html#EllipseElement"/> + <h:link rel="match" href="reference/empty.svg"/> + </metadata> + <g stroke="red" stroke-width="100"> + <g transform="translate(50, 50)"> + <rect/> + <rect width="10"/> + <rect height="10"/> + <rect width="10%"/> + <rect height="10%"/> + <rect width="0" height="10"/> + <rect width="-10" height="10"/> + <rect height="0" width="10"/> + <rect height="-10" width="10"/> + <rect style="width: 0"/> + <rect style="width: 10px"/> + <rect style="width: 10%"/> + <rect style="width: calc(10%+10px)"/> + <rect style="width: 0" height="10"/> + <rect style="width: -10px"/> + <rect style="width: -10px" height="10"/> + <rect style="height: 0"/> + <rect style="height: 10px"/> + <rect style="height: 10%"/> + <rect style="height: calc(10%+10px)"/> + <rect style="height: 0" width="10"/> + <rect style="height: -10px"/> + <rect style="height: -10px" width="10"/> + <rect style="width: calc(-10px); height: calc(-10px)"/> + </g> + + <g transform="translate(150, 50)"> + <circle/> + <circle r="0"/> + <circle r="-10"/> + <circle style="r: 0"/> + <circle style="r: -10px"/> + <circle style="r: calc(-10px)"/> + </g> + + <g transform="translate(250, 50)"> + <ellipse/> + <ellipse rx="0"/> + <ellipse rx="0" ry="10"/> + <ellipse ry="0"/> + <ellipse ry="0" rx="10"/> + <ellipse style="rx: 0"/> + <ellipse style="rx: -10px"/> + <ellipse style="rx: 0" ry="10"/> + <ellipse style="ry: 0"/> + <ellipse style="ry: -10px"/> + <ellipse style="ry: 0" rx="10"/> + <ellipse style="rx: calc(-10px); ry: calc(-10px)"/> + </g> + </g> +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/pathlength-001-ref.svg b/testing/web-platform/tests/svg/shapes/reftests/pathlength-001-ref.svg new file mode 100644 index 0000000000..0ec9e0353a --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/pathlength-001-ref.svg @@ -0,0 +1,18 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 480 360" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <g id="testmeta"> + <title>Test of 'pathLength' on shapes.</title> + <html:link rel="author" + title="Tavmjong Bah" + href="http://tavmjong.free.fr"/> + </g> + + <g id="test-reference" style="fill:none;stroke:black;stroke-width:5"> + <path d="m 20,140 200,0 0,200 -200,0 z" style="stroke-dasharray:50" /> + <path d="m 260,140 200,0 0,200 -200,0 z" style="stroke-dasharray:0.25" pathLength="4"/> + </g> + +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/pathlength-001.svg b/testing/web-platform/tests/svg/shapes/reftests/pathlength-001.svg new file mode 100644 index 0000000000..cd60c05239 --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/pathlength-001.svg @@ -0,0 +1,21 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 480 360" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <g id="testmeta"> + <title>Test of 'pathLength' on shapes.</title> + <html:link rel="author" + title="Tavmjong Bah" + href="http://tavmjong.free.fr"/> + <html:link rel="help" + href="https://www.w3.org/TR/SVG2/shapes.html#RectElement"/> + <html:link rel="match" href="pathlength-001-ref.svg" /> + </g> + + <g id="test-body-content" style="fill:none;stroke:black;stroke-width:5px"> + <rect x="20" y="140" width="200" height="200" style="stroke-dasharray:50"/> + <rect x="260" y="140" width="200" height="200" style="stroke-dasharray:0.25" pathLength="4"/> + </g> + +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/pathlength-002-ref.svg b/testing/web-platform/tests/svg/shapes/reftests/pathlength-002-ref.svg new file mode 100644 index 0000000000..21ec28a244 --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/pathlength-002-ref.svg @@ -0,0 +1,18 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 480 360" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <g id="testmeta"> + <title>Test of 'pathLength' on shapes.</title> + <html:link rel="author" + title="Tavmjong Bah" + href="http://tavmjong.free.fr"/> + </g> + + <g id="test-reference" style="fill:none;stroke:black;stroke-width:5"> + <path d="m 220,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z" style="stroke-dasharray:39.27" /> + <path d="m 460,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z" style="stroke-dasharray:0.25" pathLength="4"/> + </g> + +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/pathlength-002.svg b/testing/web-platform/tests/svg/shapes/reftests/pathlength-002.svg new file mode 100644 index 0000000000..bdae7e75f2 --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/pathlength-002.svg @@ -0,0 +1,21 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 480 360" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <g id="testmeta"> + <title>Test of 'pathLength' on shapes.</title> + <html:link rel="author" + title="Tavmjong Bah" + href="http://tavmjong.free.fr"/> + <html:link rel="help" + href="https://www.w3.org/TR/SVG2/shapes.html#CircleElement"/> + <html:link rel="match" href="pathlength-002-ref.svg" /> + </g> + + <g id="test-body-content" style="fill:none;stroke:black;stroke-width:5px"> + <circle cx="120" cy="240" r="100" style="stroke-dasharray:39.27"/> + <circle cx="360" cy="240" r="100" style="stroke-dasharray:0.25" pathLength="4"/> + </g> + +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/pathlength-003-ref.svg b/testing/web-platform/tests/svg/shapes/reftests/pathlength-003-ref.svg new file mode 100644 index 0000000000..8d6f43f9d8 --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/pathlength-003-ref.svg @@ -0,0 +1,40 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 480 360" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <g id="testmeta"> + <title>Test of 'pathLength' on shapes.</title> + <html:link rel="author" + title="Tavmjong Bah" + href="http://tavmjong.free.fr"/> + </g> + + <style id="test-font" type="text/css"> + /* Standard Font (if needed). */ + @font-face { + font-family: FreeSans; + src: url("../fonts/FreeSans.woff") format("woff"); + } + text { + font-family: FreeSans, sans-serif; + text-anchor: middle; + fill: black; + } + #title { + font-size: 24px; + } + .label { + font-size: 18px; + } + </style> + + + <g id="test-reference" style="fill:none;stroke:black;stroke-width:1px"> + <path id="circle1" d="m 220,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z"/> + <path id="circle2" d="m 460,240 a 100,100 0 0 1 -200,0 100,100 0 0 1 200,0 z" pathLength="4"/> + <text><textPath xlink:href="#circle1" startOffset="471.8" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text> + <text><textPath xlink:href="#circle2" startOffset="3" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text> + </g> + +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/pathlength-003.svg b/testing/web-platform/tests/svg/shapes/reftests/pathlength-003.svg new file mode 100644 index 0000000000..506952f54b --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/pathlength-003.svg @@ -0,0 +1,43 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 480 360" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <g id="testmeta"> + <title>Test of 'pathLength' on shapes.</title> + <html:link rel="author" + title="Tavmjong Bah" + href="http://tavmjong.free.fr"/> + <html:link rel="help" + href="https://www.w3.org/TR/SVG2/shapes.html#CircleElement"/> + <html:link rel="match" href="pathlength-003-ref.svg" /> + </g> + + <style id="test-font" type="text/css"> + /* Standard Font (if needed). */ + @font-face { + font-family: FreeSans; + src: url("../fonts/FreeSans.woff") format("woff"); + } + text { + font-family: FreeSans, sans-serif; + text-anchor: middle; + fill: black; + } + #title { + font-size: 24px; + } + .label { + font-size: 18px; + } + </style> + + + <g id="test-body-content" style="fill:none;stroke:black;stroke-width:1px"> + <circle id="circle1" cx="120" cy="240" r="100"/> + <circle id="circle2" cx="360" cy="240" r="100" pathLength="4"/> + <text><textPath xlink:href="#circle1" startOffset="471.8" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text> + <text><textPath xlink:href="#circle2" startOffset="3" style="font-size:24px;stroke:none">Some text on a circle!</textPath></text> + </g> + +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/polygon-with-filtered-marker.html b/testing/web-platform/tests/svg/shapes/reftests/polygon-with-filtered-marker.html new file mode 100644 index 0000000000..def8adc685 --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/polygon-with-filtered-marker.html @@ -0,0 +1,10 @@ +<!doctype html> +<title>Filtered <marker> with <clipPath> ancestor on <polygon></title> +<link rel="match" href="../../struct/reftests/reference/green-100x100.html"> +<svg> + <clipPath> + <marker id="m" filter="url(#f)"/> + <filter id="f"/> + </clipPath> + <polygon points="0,0 100,0 100,100 0,100" fill="green" marker-start="url(#m)"/> +</svg> diff --git a/testing/web-platform/tests/svg/shapes/reftests/reference/empty.svg b/testing/web-platform/tests/svg/shapes/reftests/reference/empty.svg new file mode 100644 index 0000000000..0c7be4e2da --- /dev/null +++ b/testing/web-platform/tests/svg/shapes/reftests/reference/empty.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg"/> |