diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /testing/web-platform/tests/svg/painting/reftests | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/svg/painting/reftests')
6 files changed, 149 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/painting/reftests/green-100x100.svg b/testing/web-platform/tests/svg/painting/reftests/green-100x100.svg new file mode 100644 index 0000000000..120941444a --- /dev/null +++ b/testing/web-platform/tests/svg/painting/reftests/green-100x100.svg @@ -0,0 +1,3 @@ +<svg xmlns="http://www.w3.org/2000/svg"> + <rect width="100" height="100" fill="green"/> +</svg> diff --git a/testing/web-platform/tests/svg/painting/reftests/non-scaling-stroke-001.html b/testing/web-platform/tests/svg/painting/reftests/non-scaling-stroke-001.html new file mode 100644 index 0000000000..a9870ac8bb --- /dev/null +++ b/testing/web-platform/tests/svg/painting/reftests/non-scaling-stroke-001.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> +<title>non-scaling-stroke with scaling</title> +<link rel="help" href="https://svgwg.org/svg2-draft/painting.html#PaintingVectorEffects" /> +<link rel="match" href="green-100x100.svg" /> +<body> + <style> + body { + border: none; + margin: 0; + width: 200px; + height: 200px; + transform: scale(2); + } + svg { + width: 100px; + height: 100px; + } + rect { + fill: red; + stroke: green; + stroke-width: 50px; + vector-effect: non-scaling-stroke; + } + </style> + <svg> + <rect width="75" height="75"/> + </svg> +</body> +</html> diff --git a/testing/web-platform/tests/svg/painting/reftests/paint-context-007-ref.svg b/testing/web-platform/tests/svg/painting/reftests/paint-context-007-ref.svg new file mode 100644 index 0000000000..0328272c6a --- /dev/null +++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-007-ref.svg @@ -0,0 +1,29 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 400 300" + 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>Paint: 'context-fill' and 'context-stroke' in 'use' with transform</title> + <html:link rel="author" + title="Stefan Zager" + href="mailto:szager@chromium.org"/> + </g> + + <defs> + <linearGradient id="lg1" x2="125%"> + <stop offset="0" stop-color="red"/> + <stop offset="1" stop-color="blue"/> + </linearGradient> + + <linearGradient id="lg2" x1="-25%"> + <stop offset="0" stop-color="red"/> + <stop offset="1" stop-color="blue"/> + </linearGradient> + </defs> + + <g id="test-reference"> + <rect x="50" y="90" width="240" height="120" fill="url(#lg1)"/> + <path d="M 110 30 l 240 120 l -240 120 Z" fill="url(#lg2)" /> + </g> +</svg> diff --git a/testing/web-platform/tests/svg/painting/reftests/paint-context-007.svg b/testing/web-platform/tests/svg/painting/reftests/paint-context-007.svg new file mode 100644 index 0000000000..50360a302e --- /dev/null +++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-007.svg @@ -0,0 +1,32 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 400 300" + 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>Paint: 'context-fill' and 'context-stroke' in 'use' with transform</title> + <html:link rel="author" + title="Stefan Zager" + href="mailto:szager@chromium.org"/> + <html:link rel="help" + href="https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint"/> + <html:link rel="match" href="paint-context-007-ref.svg" /> + </g> + + <defs> + <linearGradient id="lg"> + <stop offset="0" stop-color="red"/> + <stop offset="1" stop-color="blue"/> + </linearGradient> + + <g id="shapes"> + <rect x="50" y="90" width="240" height="120" fill="context-fill"/> + <path d="M 170 -30 l -120 240 l 240 0 Z" fill="context-fill" + transform-origin="170 150" transform="rotate(90)"/> + </g> + </defs> + + <g id="test-body-content"> + <use x="0" y="0" fill="url(#lg)" xlink:href="#shapes"/> + </g> +</svg> diff --git a/testing/web-platform/tests/svg/painting/reftests/paint-context-008-ref.svg b/testing/web-platform/tests/svg/painting/reftests/paint-context-008-ref.svg new file mode 100644 index 0000000000..49d4f8947b --- /dev/null +++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-008-ref.svg @@ -0,0 +1,22 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 400 300" + 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>Paint: paint server transform for 'context-fill' based on nearest 'use' ancestor</title> + <html:link rel="author" + title="Stefan Zager" + href="mailto:szager@chromium.org"/> + </g> + + <defs> + <pattern id="grid" x="0" y="0" width="0.125" height="0.25" stroke="blue" stroke-width="0.03125" patternContentUnits="objectBoundingBox"> + <path fill="none" d="M 0.0625 0 l 0.0625 0.125 l -0.0625 0.125 l -0.0625 -0.125 Z"/> + </pattern> + </defs> + + <g id="test-reference"> + <rect x="69" y="113" width="256" height="128" fill="url(#grid)"/> + </g> +</svg> diff --git a/testing/web-platform/tests/svg/painting/reftests/paint-context-008.svg b/testing/web-platform/tests/svg/painting/reftests/paint-context-008.svg new file mode 100644 index 0000000000..83308f09b1 --- /dev/null +++ b/testing/web-platform/tests/svg/painting/reftests/paint-context-008.svg @@ -0,0 +1,33 @@ +<svg id="svg-root" + width="100%" height="100%" viewBox="0 0 400 300" + 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>Paint: paint server transform for 'context-fill' based on nearest 'use' ancestor</title> + <html:link rel="author" + title="Stefan Zager" + href="mailto:szager@chromium.org"/> + <html:link rel="help" + href="https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint"/> + <html:link rel="match" href="paint-context-008-ref.svg" /> + </g> + + <defs> + <pattern id="grid" x="0" y="0" width="0.125" height="0.25" stroke="blue" stroke-width="0.03125" patternContentUnits="objectBoundingBox"> + <path fill="none" d="M 0.0625 0 l 0.0625 0.125 l -0.0625 0.125 l -0.0625 -0.125 Z"/> + </pattern> + + <g id="shapes"> + <rect x="50" y="90" width="256" height="128" fill="context-fill"/> + </g> + + <g id="intermediate"> + <use x="19" y="23" fill="url(#grid)" xlink:href="#shapes"/> + </g> + </defs> + + <g id="test-body-content"> + <use xlink:href="#intermediate"/> + </g> +</svg> |