summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/as-image/zoom
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/svg/as-image/zoom')
-rw-r--r--layout/reftests/svg/as-image/zoom/circle-large.svg3
-rw-r--r--layout/reftests/svg/as-image/zoom/circle-small.svg3
-rw-r--r--layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomIn-1.html29
-rw-r--r--layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomOut-1.html29
-rw-r--r--layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1-ref.html27
-rw-r--r--layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1.html27
-rw-r--r--layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1-ref.html27
-rw-r--r--layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1.html27
-rw-r--r--layout/reftests/svg/as-image/zoom/img-zoomIn-1.html5
-rw-r--r--layout/reftests/svg/as-image/zoom/img-zoomOut-1.html5
-rw-r--r--layout/reftests/svg/as-image/zoom/reftest-stylo.list12
-rw-r--r--layout/reftests/svg/as-image/zoom/reftest.list11
-rw-r--r--layout/reftests/svg/as-image/zoom/squaredCircle-150x150-ref.html5
-rw-r--r--layout/reftests/svg/as-image/zoom/squaredCircle-50x50-ref.html5
-rw-r--r--layout/reftests/svg/as-image/zoom/squaredCircle.svg6
15 files changed, 221 insertions, 0 deletions
diff --git a/layout/reftests/svg/as-image/zoom/circle-large.svg b/layout/reftests/svg/as-image/zoom/circle-large.svg
new file mode 100644
index 000000000..a097f3c66
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/circle-large.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="80" height="80">
+ <circle cx="40" cy="40" r="40" style="fill: green"/>
+</svg>
diff --git a/layout/reftests/svg/as-image/zoom/circle-small.svg b/layout/reftests/svg/as-image/zoom/circle-small.svg
new file mode 100644
index 000000000..b0cba24a6
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/circle-small.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="20" height="20">
+ <circle cx="10" cy="10" r="10" style="fill: green"/>
+</svg>
diff --git a/layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomIn-1.html b/layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomIn-1.html
new file mode 100644
index 000000000..b4eadba92
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomIn-1.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+ - http://creativecommons.org/publicdomain/zero/1.0/ -->
+<html>
+<head>
+ <style>
+ body {
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ }
+ div {
+ background: url('circle-small.svg');
+ background-size: 40px 40px;
+ background-repeat: repeat;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ width: 80px;
+ height: 80px;
+ transform: scale(2.0);
+ transform-origin: 0 0;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomOut-1.html b/layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomOut-1.html
new file mode 100644
index 000000000..db0e6c06b
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-fuzzy-transform-zoomOut-1.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+ - http://creativecommons.org/publicdomain/zero/1.0/ -->
+<html>
+<head>
+ <style>
+ body {
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ }
+ div {
+ background: url('circle-large.svg');
+ background-size: 40px 40px;
+ background-repeat: repeat;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ width: 80px;
+ height: 80px;
+ transform: scale(0.5);
+ transform-origin: 0 0;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1-ref.html b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1-ref.html
new file mode 100644
index 000000000..81e6011e6
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+ - http://creativecommons.org/publicdomain/zero/1.0/ -->
+<html>
+<head>
+ <style>
+ body {
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ }
+ div {
+ background: url('circle-large.svg');
+ background-size: 80px 80px;
+ background-repeat: repeat;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ width: 160px;
+ height: 160px;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1.html b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1.html
new file mode 100644
index 000000000..de39990b9
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomIn-1.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+ - http://creativecommons.org/publicdomain/zero/1.0/ -->
+<html reftest-zoom="2.0">
+<head>
+ <style>
+ body {
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ }
+ div {
+ background: url('circle-small.svg');
+ background-size: 40px 40px;
+ background-repeat: repeat;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ width: 80px;
+ height: 80px;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1-ref.html b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1-ref.html
new file mode 100644
index 000000000..48f2d05ff
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1-ref.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+ - http://creativecommons.org/publicdomain/zero/1.0/ -->
+<html>
+<head>
+ <style>
+ body {
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ }
+ div {
+ background: url('circle-small.svg');
+ background-size: 20px 20px;
+ background-repeat: repeat;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ width: 40px;
+ height: 40px;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1.html b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1.html
new file mode 100644
index 000000000..75cd1d61a
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-fuzzy-zoomOut-1.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<!-- Any copyright is dedicated to the Public Domain.
+ - http://creativecommons.org/publicdomain/zero/1.0/ -->
+<html reftest-zoom="0.5">
+<head>
+ <style>
+ body {
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ }
+ div {
+ background: url('circle-large.svg');
+ background-size: 40px 40px;
+ background-repeat: repeat;
+ margin: 0px;
+ padding: 0px;
+ border: 0px;
+ width: 80px;
+ height: 80px;
+ }
+ </style>
+</head>
+<body>
+ <div></div>
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/img-zoomIn-1.html b/layout/reftests/svg/as-image/zoom/img-zoomIn-1.html
new file mode 100644
index 000000000..cc31a933e
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-zoomIn-1.html
@@ -0,0 +1,5 @@
+<html reftest-zoom="1.5">
+<body>
+ <img src="squaredCircle.svg">
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/img-zoomOut-1.html b/layout/reftests/svg/as-image/zoom/img-zoomOut-1.html
new file mode 100644
index 000000000..5133acb8b
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/img-zoomOut-1.html
@@ -0,0 +1,5 @@
+<html reftest-zoom="0.5">
+<body>
+ <img src="squaredCircle.svg">
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/reftest-stylo.list b/layout/reftests/svg/as-image/zoom/reftest-stylo.list
new file mode 100644
index 000000000..fe8a9bd67
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/reftest-stylo.list
@@ -0,0 +1,12 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+# Tests related to SVG being used as an image, with zooming
+
+# Simple <img> tests
+fuzzy-if(skiaContent,1,408) == img-zoomIn-1.html img-zoomIn-1.html
+fuzzy-if(skiaContent,1,74) == img-zoomOut-1.html img-zoomOut-1.html
+
+# Ensure that scaled SVG images aren't fuzzy when tiled.
+== img-fuzzy-zoomOut-1.html img-fuzzy-zoomOut-1.html
+== img-fuzzy-zoomIn-1.html img-fuzzy-zoomIn-1.html
+== img-fuzzy-transform-zoomOut-1.html img-fuzzy-transform-zoomOut-1.html
+== img-fuzzy-transform-zoomIn-1.html img-fuzzy-transform-zoomIn-1.html
diff --git a/layout/reftests/svg/as-image/zoom/reftest.list b/layout/reftests/svg/as-image/zoom/reftest.list
new file mode 100644
index 000000000..73eb41709
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/reftest.list
@@ -0,0 +1,11 @@
+# Tests related to SVG being used as an image, with zooming
+
+# Simple <img> tests
+fuzzy-if(skiaContent,1,408) == img-zoomIn-1.html squaredCircle-150x150-ref.html
+fuzzy-if(skiaContent,1,74) == img-zoomOut-1.html squaredCircle-50x50-ref.html
+
+# Ensure that scaled SVG images aren't fuzzy when tiled.
+== img-fuzzy-zoomOut-1.html img-fuzzy-zoomOut-1-ref.html
+== img-fuzzy-zoomIn-1.html img-fuzzy-zoomIn-1-ref.html
+== img-fuzzy-transform-zoomOut-1.html img-fuzzy-zoomOut-1-ref.html
+== img-fuzzy-transform-zoomIn-1.html img-fuzzy-zoomIn-1-ref.html
diff --git a/layout/reftests/svg/as-image/zoom/squaredCircle-150x150-ref.html b/layout/reftests/svg/as-image/zoom/squaredCircle-150x150-ref.html
new file mode 100644
index 000000000..7f3b524e8
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/squaredCircle-150x150-ref.html
@@ -0,0 +1,5 @@
+<html reftest-zoom="1.5">
+<body>
+ <embed src="squaredCircle.svg">
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/squaredCircle-50x50-ref.html b/layout/reftests/svg/as-image/zoom/squaredCircle-50x50-ref.html
new file mode 100644
index 000000000..41686f5bc
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/squaredCircle-50x50-ref.html
@@ -0,0 +1,5 @@
+<html reftest-zoom="0.5">
+<body>
+ <embed src="squaredCircle.svg">
+</body>
+</html>
diff --git a/layout/reftests/svg/as-image/zoom/squaredCircle.svg b/layout/reftests/svg/as-image/zoom/squaredCircle.svg
new file mode 100644
index 000000000..266c9e776
--- /dev/null
+++ b/layout/reftests/svg/as-image/zoom/squaredCircle.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ width="100px" height="100px">
+ <rect x="2" y="2" height="96" width="96"
+ stroke-width="4" stroke="black" fill="yellow"/>
+ <circle cx="50" cy="50" r="46" style="fill: blue"/>
+</svg>