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/geometry/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/geometry/reftests')
19 files changed, 308 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/geometry/reftests/circle-001.svg b/testing/web-platform/tests/svg/geometry/reftests/circle-001.svg new file mode 100644 index 0000000000..2fbd70d5a6 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/circle-001.svg @@ -0,0 +1,16 @@ +<svg width="340" height="140" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Circle coordinates and radius specified by properties</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="circle-ref.svg" /> + <style> + circle { + cx: 204px; + cy: 56px; + r: 65px; + fill: blue; + } + </style> + <circle /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/circle-002.svg b/testing/web-platform/tests/svg/geometry/reftests/circle-002.svg new file mode 100644 index 0000000000..7f98f56ad0 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/circle-002.svg @@ -0,0 +1,16 @@ +<svg width="340" height="140" viewBox="60000 70000 3400 1400" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Circle coordinates and radius specified in user units</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="circle-ref.svg" /> + <style> + circle { + cx: 62040px; + cy: 70560px; + r: 650px; + fill: blue; + } + </style> + <circle /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/circle-003.svg b/testing/web-platform/tests/svg/geometry/reftests/circle-003.svg new file mode 100644 index 0000000000..74c32fb33c --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/circle-003.svg @@ -0,0 +1,16 @@ +<svg width="340" height="140" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Circle coordinates and radius specified by percentage</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="circle-ref.svg" /> + <style> + circle { + cx: 60%; /* 60% of width 340 */ + cy: 40%; /* 40% of height 140 */ + r: 25%; /* 25% of normalized diagonal 260 */ + fill: blue; + } + </style> + <circle /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/circle-004.svg b/testing/web-platform/tests/svg/geometry/reftests/circle-004.svg new file mode 100644 index 0000000000..36c9e0096f --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/circle-004.svg @@ -0,0 +1,15 @@ +<svg width="340" height="140" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Circle coordinates and radius specified using calc</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="circle-ref.svg" /> + <style> + circle { + fill: blue; + font-size: 40px; + } + </style> + <circle cx="calc(80px + 60% - 2em)" cy="calc(80px + 40% - 2em)" + r="calc(5 * 5%)" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/circle-005.svg b/testing/web-platform/tests/svg/geometry/reftests/circle-005.svg new file mode 100644 index 0000000000..2d1fbf92aa --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/circle-005.svg @@ -0,0 +1,24 @@ +<svg width="340" height="140" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Circle coordinates and radius specified by properties</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1683652"/> + <html:link rel="match" href="circle-ref.svg"/> + <style> + circle { + cx: 204px; + cy: 56px; + r: 5px; + fill: blue; + } + </style> + <circle /> + <script><![CDATA[ + let circle = document.querySelector("circle"); + circle.parentNode.style.display = "none"; + circle.getTotalLength(); + circle.parentNode.style.display = ""; + circle.style.r = "65px"; + ]]></script> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/circle-ref.svg b/testing/web-platform/tests/svg/geometry/reftests/circle-ref.svg new file mode 100644 index 0000000000..36ccde7fce --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/circle-ref.svg @@ -0,0 +1,4 @@ +<svg width="340" height="140" + xmlns="http://www.w3.org/2000/svg"> + <circle cx="204" cy="56" r="65" fill="blue" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/ellipse-001.svg b/testing/web-platform/tests/svg/geometry/reftests/ellipse-001.svg new file mode 100644 index 0000000000..e6d394de20 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/ellipse-001.svg @@ -0,0 +1,17 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Ellipse coordinates and radii specified by properties</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="ellipse-ref.svg" /> + <style> + ellipse { + cx: 75px; + cy: 120px; + rx: 60px; + ry: 50px; + fill: blue; + } + </style> + <ellipse /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/ellipse-002.svg b/testing/web-platform/tests/svg/geometry/reftests/ellipse-002.svg new file mode 100644 index 0000000000..081617288a --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/ellipse-002.svg @@ -0,0 +1,17 @@ +<svg width="300" height="200" viewBox="6000 7000 600 400" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Ellipse coordinates and radii specified in user units</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="ellipse-ref.svg" /> + <style> + ellipse { + cx: 6150px; + cy: 7240px; + rx: 120px; + ry: 100px; + fill: blue; + } + </style> + <ellipse /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/ellipse-003.svg b/testing/web-platform/tests/svg/geometry/reftests/ellipse-003.svg new file mode 100644 index 0000000000..6b81eadf1b --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/ellipse-003.svg @@ -0,0 +1,17 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Ellipse coordinates and radii specified by percentage</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="ellipse-ref.svg" /> + <style> + ellipse { + cx: 25%; + cy: 60%; + rx: 20%; + ry: 25%; + fill: blue; + } + </style> + <ellipse /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/ellipse-004.svg b/testing/web-platform/tests/svg/geometry/reftests/ellipse-004.svg new file mode 100644 index 0000000000..1c6b132cd6 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/ellipse-004.svg @@ -0,0 +1,15 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Ellipse coordinates and radii specified using calc</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="ellipse-ref.svg" /> + <style> + ellipse { + fill: blue; + font-size: 40px; + } + </style> + <ellipse cx="calc(80px + 25% - 2em)" cy="calc(80px + 60% - 2em)" + rx="calc(4 * 5%)" ry="calc(5 * 5%)" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/ellipse-ref.svg b/testing/web-platform/tests/svg/geometry/reftests/ellipse-ref.svg new file mode 100644 index 0000000000..57e6f4d5e8 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/ellipse-ref.svg @@ -0,0 +1,4 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg"> + <ellipse cx="75" cy="120" rx="60" ry="50" fill="blue" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/percentage-attribute.svg b/testing/web-platform/tests/svg/geometry/reftests/percentage-attribute.svg new file mode 100644 index 0000000000..44c386d517 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/percentage-attribute.svg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Percentages in shapes</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="percentage-ref.svg" /> + + <style> + svg { + fill: none; + stroke-width: 30px; + } + </style> + + <circle cx="70%" cy="60%" r="50%" stroke="cyan" /> + <ellipse cx="40%" cy="30%" rx="10%" ry="20%" stroke="green" /> + <rect x="10%" y="20%" width="70%" height="60%" stroke="blue" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/percentage-ref.svg b/testing/web-platform/tests/svg/geometry/reftests/percentage-ref.svg new file mode 100644 index 0000000000..09fd10f287 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/percentage-ref.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + + <style> + svg { + fill: none; + stroke-width: 30px; + } + </style> + + <circle cx="434" cy="204" r="250" stroke="cyan" /> + <ellipse cx="248" cy="102" rx="62" ry="68" stroke="green" /> + <rect x="62" y="68" width="434" height="204" stroke="blue" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/percentage.svg b/testing/web-platform/tests/svg/geometry/reftests/percentage.svg new file mode 100644 index 0000000000..c2ca49341c --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/percentage.svg @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg id="svg-root" + width="310" height="170" viewBox="0, 0, 620, 340" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Percentages in shapes</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="percentage-ref.svg" /> + + <style> + svg { + fill: none; + stroke-width: 30px; + } + circle { + cx: 70%; + cy: 60%; + r: 50%; + } + ellipse { + cx: 40%; + cy: 30%; + rx: 10%; + ry: 20%; + } + rect { + x: 10%; + y: 20%; + width: 70%; + height: 60%; + } + </style> + + <circle stroke="cyan" /> + <ellipse stroke="green" /> + <rect stroke="blue" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/rect-001.svg b/testing/web-platform/tests/svg/geometry/reftests/rect-001.svg new file mode 100644 index 0000000000..020e499dc2 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/rect-001.svg @@ -0,0 +1,17 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Rectangle coordinates and sizes specified by properties</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="rect-ref.svg" /> + <style> + rect { + x: 30px; + y: 60px; + width: 120px; + height: 100px; + fill: blue; + } + </style> + <rect /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/rect-002.svg b/testing/web-platform/tests/svg/geometry/reftests/rect-002.svg new file mode 100644 index 0000000000..e9b27db7e6 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/rect-002.svg @@ -0,0 +1,17 @@ +<svg width="300" height="200" viewBox="600 700 150 100" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Rectangle coordinates and sizes specified in user units</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="rect-ref.svg" /> + <style> + rect { + x: 615px; + y: 730px; + width: 60px; + height: 50px; + fill: blue; + } + </style> + <rect /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/rect-003.svg b/testing/web-platform/tests/svg/geometry/reftests/rect-003.svg new file mode 100644 index 0000000000..d3d7c5abb4 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/rect-003.svg @@ -0,0 +1,17 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Rectangle coordinates and sizes specified by percentage</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="rect-ref.svg" /> + <style> + rect { + x: 10%; + y: 30%; + width: 40%; + height: 50%; + fill: blue; + } + </style> + <rect /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/rect-004.svg b/testing/web-platform/tests/svg/geometry/reftests/rect-004.svg new file mode 100644 index 0000000000..926b2a8e0a --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/rect-004.svg @@ -0,0 +1,15 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg" + xmlns:html="http://www.w3.org/1999/xhtml"> + <title>Rectangle coordinates and sizes specified using calc</title> + <html:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html"/> + <html:link rel="match" href="rect-ref.svg" /> + <style> + rect { + fill: blue; + font-size: 40px; + } + </style> + <rect x="calc(80px + 10% - 2em)" y="calc(80px + 30% - 2em)" + width="calc(8 * 5%)" height="calc(10 * 5%)" /> +</svg> diff --git a/testing/web-platform/tests/svg/geometry/reftests/rect-ref.svg b/testing/web-platform/tests/svg/geometry/reftests/rect-ref.svg new file mode 100644 index 0000000000..ddfd51eed1 --- /dev/null +++ b/testing/web-platform/tests/svg/geometry/reftests/rect-ref.svg @@ -0,0 +1,4 @@ +<svg width="300" height="200" + xmlns="http://www.w3.org/2000/svg"> + <rect x="30" y="60" width="120" height="100" fill="blue" /> +</svg> |