summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/embedded
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/svg/embedded
parentInitial commit. (diff)
downloadfirefox-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/embedded')
-rw-r--r--testing/web-platform/tests/svg/embedded/image-embedding-svg-nested-svg-in-foreignobject.html16
-rw-r--r--testing/web-platform/tests/svg/embedded/image-embedding-svg-viewref-with-viewbox.svg14
-rw-r--r--testing/web-platform/tests/svg/embedded/image-embedding-svg-with-auto-height.svg8
-rw-r--r--testing/web-platform/tests/svg/embedded/image-embedding-svg-with-fractional-viewbox.svg11
-rw-r--r--testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units-inline-style.svg10
-rw-r--r--testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units.svg10
-rw-r--r--testing/web-platform/tests/svg/embedded/image-fractional-width-vertical-fidelity.svg15
-rw-r--r--testing/web-platform/tests/svg/embedded/reference/green-rect-100x100.svg3
8 files changed, 87 insertions, 0 deletions
diff --git a/testing/web-platform/tests/svg/embedded/image-embedding-svg-nested-svg-in-foreignobject.html b/testing/web-platform/tests/svg/embedded/image-embedding-svg-nested-svg-in-foreignobject.html
new file mode 100644
index 0000000000..880305253c
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/image-embedding-svg-nested-svg-in-foreignobject.html
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>Only synthesize a 'viewBox' for the outermost SVG root in image contexts</title>
+<link rel="help" href="https://crbug.com/1313530">
+<link rel="match" href="../struct/reftests/reference/green-100x100.html">
+<img width="100" height="100" src="data:image/svg+xml,
+ <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' width='100' id='svg'>
+ <rect width='200' height='200' fill='red'/>
+ <foreignObject width='200' height='200'>
+ <div xmlns='http://www.w3.org/1999/xhtml' style='height: 100px; width: 100px'>
+ <svg xmlns='http://www.w3.org/2000/svg' style='width: 100%; height: 100%; overflow: visible' width='200' height='200'>
+ <rect width='200' height='200' fill='green'/>
+ </svg>
+ </div>
+ </foreignObject>
+ </svg>
+">
diff --git a/testing/web-platform/tests/svg/embedded/image-embedding-svg-viewref-with-viewbox.svg b/testing/web-platform/tests/svg/embedded/image-embedding-svg-viewref-with-viewbox.svg
new file mode 100644
index 0000000000..6340c19d2a
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/image-embedding-svg-viewref-with-viewbox.svg
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:h="http://www.w3.org/1999/xhtml">
+ <title>&#x3c;image&#x3e; referencing SVG image with &#x3c;view&#x3e; with 'viewBox'</title>
+ <h:link rel="help" href="https://svgwg.org/svg2-draft/embedded.html#ImageElement"/>
+ <h:link rel="help" href="https://svgwg.org/svg2-draft/linking.html#LinksIntoSVG"/>
+ <h:link rel="match" href="reference/green-rect-100x100.svg"/>
+ <rect x="-355" y="-1110" width="455" height="1210" fill="red"/>
+ <image preserveAspectRatio="none" x="-355" y="-1110" width="455" height="1210"
+ xlink:href="data:image/svg+xml,
+ %3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 2317 2320'%3e
+ %3cview id='view' preserveAspectRatio='none' viewBox='0 0 455 1210'/%3e
+ %3crect width='455' height='1210' fill='green'/%3e
+ %3c/svg%3e#view"/>
+</svg>
diff --git a/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-auto-height.svg b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-auto-height.svg
new file mode 100644
index 0000000000..45ebb57376
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-auto-height.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:h="http://www.w3.org/1999/xhtml" viewBox="0 0 3 3" width="200" height="200">
+ <metadata>
+ <title>&lt;image&gt; embedding SVG image with auto height</title>
+ <h:link rel="match" href="reference/green-rect-100x100.svg"/>
+ </metadata>
+ <image href="data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' width='50' height='50' &gt;&lt;rect width='50' height='50' fill='green'/&gt;&lt;/svg&gt;" width="1.5"/>
+</svg>
diff --git a/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-fractional-viewbox.svg b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-fractional-viewbox.svg
new file mode 100644
index 0000000000..6e37c7b7b6
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-fractional-viewbox.svg
@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
+ <title>&lt;image&gt; embedding SVG image with fractional viewBox</title>
+ <h:link rel="help" href="https://crbug.com/1123047"/>
+ <h:link rel="match" href="reference/green-rect-100x100.svg"/>
+
+ <rect width="100" height="100" fill="red"/>
+ <svg viewBox="0 0 200 150" width="100" height="100" preserveAspectRatio="none">
+ <image preserveAspectRatio="none" y="-150" width="200" height="300"
+ href="data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1683.78 1190.55'&gt;&lt;rect width='1696' height='1199' fill='green'/&gt;&lt;/svg&gt;"/>
+ </svg>
+</svg>
diff --git a/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units-inline-style.svg b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units-inline-style.svg
new file mode 100644
index 0000000000..7ef2655dc9
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units-inline-style.svg
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:h="http://www.w3.org/1999/xhtml">
+ <metadata>
+ <title>&lt;image&gt; embedding SVG image with viewport units</title>
+ <h:link rel="match" href="reference/green-rect-100x100.svg"/>
+ </metadata>
+ <image xlink:href="data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg'&gt;&lt;rect style='width: 50vw; height: 50vh' fill='green'/&gt;&lt;/svg&gt;"
+ width="200" height="200"/>
+</svg>
diff --git a/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units.svg b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units.svg
new file mode 100644
index 0000000000..653856de21
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/image-embedding-svg-with-viewport-units.svg
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:h="http://www.w3.org/1999/xhtml">
+ <metadata>
+ <title>&lt;image&gt; embedding SVG image with viewport units</title>
+ <h:link rel="match" href="reference/green-rect-100x100.svg"/>
+ </metadata>
+ <image xlink:href="data:image/svg+xml,&lt;svg xmlns='http://www.w3.org/2000/svg'&gt;&lt;rect width='50vw' height='50vh' fill='green'/&gt;&lt;/svg&gt;"
+ width="200" height="200"/>
+</svg>
diff --git a/testing/web-platform/tests/svg/embedded/image-fractional-width-vertical-fidelity.svg b/testing/web-platform/tests/svg/embedded/image-fractional-width-vertical-fidelity.svg
new file mode 100644
index 0000000000..4409ee32a9
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/image-fractional-width-vertical-fidelity.svg
@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
+ <title>Vertical fidelity of &#x3c;image&#x3e; element with fractional width</title>
+ <h:link rel="help" href="https://svgwg.org/svg2-draft/embedded.html#ImageElement"/>
+ <h:link rel="match" href="reference/green-rect-100x100.svg"/>
+ <rect x="95" width="5" height="100" fill="green"/>
+ <rect width="95" height="100" fill="red"/>
+ <g clip-path="url(#c)">
+ <clipPath id="c">
+ <rect width="95" height="100"/>
+ </clipPath>
+ <image href="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='xMinYMin'%3e
+ %3crect width='100' height='100' fill='green'/%3e%3c/svg%3e"
+ width="101.2" height="100"/>
+ </g>
+</svg>
diff --git a/testing/web-platform/tests/svg/embedded/reference/green-rect-100x100.svg b/testing/web-platform/tests/svg/embedded/reference/green-rect-100x100.svg
new file mode 100644
index 0000000000..120941444a
--- /dev/null
+++ b/testing/web-platform/tests/svg/embedded/reference/green-rect-100x100.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect width="100" height="100" fill="green"/>
+</svg>