summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/moz-only
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/svg/moz-only')
-rw-r--r--layout/reftests/svg/moz-only/big.pngbin0 -> 82 bytes
-rw-r--r--layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg13
-rw-r--r--layout/reftests/svg/moz-only/feImage-zoom-01a.svg16
-rw-r--r--layout/reftests/svg/moz-only/feImage-zoom-01b.svg16
-rw-r--r--layout/reftests/svg/moz-only/foreignObject-zoom-01.svg34
-rw-r--r--layout/reftests/svg/moz-only/pass-black.svg8
-rw-r--r--layout/reftests/svg/moz-only/pass.svg8
-rw-r--r--layout/reftests/svg/moz-only/reftest-stylo.list40
-rw-r--r--layout/reftests/svg/moz-only/reftest.list23
-rw-r--r--layout/reftests/svg/moz-only/replaced-element-zoom-01.html39
-rw-r--r--layout/reftests/svg/moz-only/small.pngbin0 -> 85 bytes
-rw-r--r--layout/reftests/svg/moz-only/xbl-basic-01.svg23
-rw-r--r--layout/reftests/svg/moz-only/xbl-basic-02.svg14
-rw-r--r--layout/reftests/svg/moz-only/xbl-basic-02.xbl9
-rw-r--r--layout/reftests/svg/moz-only/xbl-basic-03.svg19
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-01.svg29
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.svg14
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.xbl13
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-03.svg26
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.svg13
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.xbl16
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-01.svg27
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.svg19
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.xbl10
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-03.svg25
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.svg17
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.xbl12
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-01.svg37
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.svg14
-rw-r--r--layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.xbl21
-rw-r--r--layout/reftests/svg/moz-only/zoom-invalidation-01.svg26
-rw-r--r--layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg13
-rw-r--r--layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg14
33 files changed, 608 insertions, 0 deletions
diff --git a/layout/reftests/svg/moz-only/big.png b/layout/reftests/svg/moz-only/big.png
new file mode 100644
index 000000000..76a32497c
--- /dev/null
+++ b/layout/reftests/svg/moz-only/big.png
Binary files differ
diff --git a/layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg b/layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg
new file mode 100644
index 000000000..92046f8d2
--- /dev/null
+++ b/layout/reftests/svg/moz-only/feImage-zoom-01-ref.svg
@@ -0,0 +1,13 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<title>test image-rendering: -moz-crisp-edges</title>
+<defs>
+ <filter id="i" x="0%" y="0%" width="100%" height="100%">
+ <feImage xlink:href="big.png"/>
+ </filter>
+</defs>
+<rect x="0" y="0" width="10" height="10" filter="url(#i)"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/feImage-zoom-01a.svg b/layout/reftests/svg/moz-only/feImage-zoom-01a.svg
new file mode 100644
index 000000000..3b2ea655f
--- /dev/null
+++ b/layout/reftests/svg/moz-only/feImage-zoom-01a.svg
@@ -0,0 +1,16 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ reftest-zoom="5"
+ width="20%" height="20%">
+<title>test image-rendering: -moz-crisp-edges</title>
+<defs>
+ <filter id="i" x="0%" y="0%" width="100%" height="100%">
+ <feImage image-rendering="-moz-crisp-edges" xlink:href="small.png"/>
+ </filter>
+</defs>
+<rect x="0" y="0" width="10" height="10" filter="url(#i)"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/feImage-zoom-01b.svg b/layout/reftests/svg/moz-only/feImage-zoom-01b.svg
new file mode 100644
index 000000000..c8be9ea6b
--- /dev/null
+++ b/layout/reftests/svg/moz-only/feImage-zoom-01b.svg
@@ -0,0 +1,16 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ reftest-zoom="5"
+ width="20%" height="20%">
+<title>test image-rendering: -moz-crisp-edges</title>
+<defs>
+ <filter id="i" x="0%" y="0%" width="100%" height="100%">
+ <feImage style="image-rendering:-moz-crisp-edges" xlink:href="small.png"/>
+ </filter>
+</defs>
+<rect x="0" y="0" width="10" height="10" filter="url(#i)"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/foreignObject-zoom-01.svg b/layout/reftests/svg/moz-only/foreignObject-zoom-01.svg
new file mode 100644
index 000000000..42250464a
--- /dev/null
+++ b/layout/reftests/svg/moz-only/foreignObject-zoom-01.svg
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ onload="startTest()" reftest-zoom="2" class="reftest-wait"
+ style="width:50%; height:50%;">
+
+ <title>Testcase for zoomed foreignObject</title>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=484677 -->
+
+ <style type="text/css">
+ * { margin:0;height:100%;width:100% }
+ </style>
+ <foreignObject width="100%" height="100%">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <body>
+ <div id="div" style="width:20px;height:20px;background:yellow;"/>
+ </body>
+ </html>
+ </foreignObject>
+ <script type="text/javascript">
+ function startTest() {
+ document.addEventListener("MozReftestInvalidate", doTest, false);
+ }
+ function doTest() {
+ var elem = document.elementFromPoint(25, 25);
+ var div = document.getElementById("div");
+ div.setAttribute("style", "background:" + ((elem == div) ? "red" : "lime") + ";");
+ document.documentElement.removeAttribute("class");
+ }
+ </script>
+</svg>
diff --git a/layout/reftests/svg/moz-only/pass-black.svg b/layout/reftests/svg/moz-only/pass-black.svg
new file mode 100644
index 000000000..d80f66d63
--- /dev/null
+++ b/layout/reftests/svg/moz-only/pass-black.svg
@@ -0,0 +1,8 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <title>Testcase reference file for black pass condition</title>
+ <rect width="100%" height="100%" fill="black"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/pass.svg b/layout/reftests/svg/moz-only/pass.svg
new file mode 100644
index 000000000..c09c6601e
--- /dev/null
+++ b/layout/reftests/svg/moz-only/pass.svg
@@ -0,0 +1,8 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <title>Testcase reference file for generic pass condition</title>
+ <rect width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/reftest-stylo.list b/layout/reftests/svg/moz-only/reftest-stylo.list
new file mode 100644
index 000000000..19633a793
--- /dev/null
+++ b/layout/reftests/svg/moz-only/reftest-stylo.list
@@ -0,0 +1,40 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+
+# XBL tests
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-basic-01.svg xbl-basic-01.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-basic-02.svg xbl-basic-02.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) == xbl-basic-03.svg xbl-basic-03.svg
+# bug 773482
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) == xbl-grad-ref--grad-in-binding-01.svg xbl-grad-ref--grad-in-binding-01.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-grad-ref--grad-in-binding-02.svg xbl-grad-ref--grad-in-binding-02.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-grad-ref--grad-in-bound-01.svg xbl-grad-ref--grad-in-bound-01.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+== xbl-grad-ref--grad-in-bound-02.svg xbl-grad-ref--grad-in-bound-02.svg
+== xbl-grad-ref--grad-in-resources-01.svg xbl-grad-ref--grad-in-resources-01.svg
+== xbl-grad-ref--grad-in-resources-02.svg xbl-grad-ref--grad-in-resources-02.svg
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-grad-ref--grad-in-binding-03.svg xbl-grad-ref--grad-in-binding-03.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-grad-ref--grad-in-bound-03.svg xbl-grad-ref--grad-in-bound-03.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-grad-ref--grad-in-binding-04.svg xbl-grad-ref--grad-in-binding-04.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if((B2G&&browserIsRemote)||Mulet) == xbl-grad-ref--grad-in-bound-04.svg xbl-grad-ref--grad-in-bound-04.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+
+# Tests for zooming with the full page zoom UI
+skip-if(B2G||Mulet) random-if(d2d) == feImage-zoom-01a.svg feImage-zoom-01a.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) random-if(d2d) == feImage-zoom-01b.svg feImage-zoom-01b.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) == foreignObject-zoom-01.svg foreignObject-zoom-01.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) == zoom-invalidation-01.svg zoom-invalidation-01.svg
+# Initial mulet triage: parity with B2G/B2G Desktop
+skip-if(B2G||Mulet) == replaced-element-zoom-01.html replaced-element-zoom-01.html
+# Initial mulet triage: parity with B2G/B2G Desktop
+fuzzy-if(winWidget,12,7) == zoomed-svg-with-viewBox-01.svg zoomed-svg-with-viewBox-01.svg
diff --git a/layout/reftests/svg/moz-only/reftest.list b/layout/reftests/svg/moz-only/reftest.list
new file mode 100644
index 000000000..f01a8121c
--- /dev/null
+++ b/layout/reftests/svg/moz-only/reftest.list
@@ -0,0 +1,23 @@
+
+# XBL tests
+== xbl-basic-01.svg pass.svg
+== xbl-basic-02.svg pass.svg
+== xbl-basic-03.svg pass.svg
+== xbl-grad-ref--grad-in-binding-01.svg pass.svg
+== xbl-grad-ref--grad-in-binding-02.svg pass.svg
+== xbl-grad-ref--grad-in-bound-01.svg pass.svg
+fails == xbl-grad-ref--grad-in-bound-02.svg pass-black.svg
+fails == xbl-grad-ref--grad-in-resources-01.svg pass.svg
+fails == xbl-grad-ref--grad-in-resources-02.svg pass.svg
+== xbl-grad-ref--grad-in-binding-03.svg pass.svg
+== xbl-grad-ref--grad-in-bound-03.svg pass.svg
+== xbl-grad-ref--grad-in-binding-04.svg pass.svg
+== xbl-grad-ref--grad-in-bound-04.svg pass.svg
+
+# Tests for zooming with the full page zoom UI
+random-if(d2d) == feImage-zoom-01a.svg feImage-zoom-01-ref.svg
+random-if(d2d) == feImage-zoom-01b.svg feImage-zoom-01-ref.svg
+== foreignObject-zoom-01.svg pass.svg
+== zoom-invalidation-01.svg pass.svg
+== replaced-element-zoom-01.html pass.svg
+fuzzy-if(winWidget,12,7) == zoomed-svg-with-viewBox-01.svg zoomed-svg-with-viewBox-01-ref.svg
diff --git a/layout/reftests/svg/moz-only/replaced-element-zoom-01.html b/layout/reftests/svg/moz-only/replaced-element-zoom-01.html
new file mode 100644
index 000000000..724bb304e
--- /dev/null
+++ b/layout/reftests/svg/moz-only/replaced-element-zoom-01.html
@@ -0,0 +1,39 @@
+<!doctype html>
+<html reftest-zoom="2" class="reftest-wait">
+ <head>
+ <title>SVG page zoom test</title>
+ <style>
+ iframe, object, img {
+ width: 150px;
+ height: 100px;
+ border: none;
+ }
+ body {
+ background-color: lime;
+ }
+ </style>
+ <script>
+
+var expected = 3;
+var actual = 0;
+
+function process_load() {
+ ++actual;
+ if (actual == expected)
+ document.documentElement.removeAttribute("class");
+}
+
+ </script>
+ </head>
+ <body>
+ <div>
+ <iframe onload="process_load()" src="pass.svg"></iframe>
+ </div>
+ <div>
+ <object onload="process_load()" data="pass.svg"></object>
+ </div>
+ <div>
+ <img onload="process_load()" src="pass.svg">
+ </div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/moz-only/small.png b/layout/reftests/svg/moz-only/small.png
new file mode 100644
index 000000000..9ff11a993
--- /dev/null
+++ b/layout/reftests/svg/moz-only/small.png
Binary files differ
diff --git a/layout/reftests/svg/moz-only/xbl-basic-01.svg b/layout/reftests/svg/moz-only/xbl-basic-01.svg
new file mode 100644
index 000000000..8abbb29e6
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-basic-01.svg
@@ -0,0 +1,23 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" style="-moz-binding: url(#lime);">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test XBL bindings inline in an SVG file can be used in the SVG</title>
+
+ <bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <children/>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="lime"/>
+ </content>
+ </binding>
+ </bindings>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-basic-02.svg b/layout/reftests/svg/moz-only/xbl-basic-02.svg
new file mode 100644
index 000000000..c031af8c2
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-basic-02.svg
@@ -0,0 +1,14 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ style="-moz-binding: url(xbl-basic-02.xbl#lime);">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test XBL bindings in an external file can be used by SVG</title>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-basic-02.xbl b/layout/reftests/svg/moz-only/xbl-basic-02.xbl
new file mode 100644
index 000000000..543e5ff96
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-basic-02.xbl
@@ -0,0 +1,9 @@
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <children/>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="lime"/>
+ </content>
+ </binding>
+</bindings>
diff --git a/layout/reftests/svg/moz-only/xbl-basic-03.svg b/layout/reftests/svg/moz-only/xbl-basic-03.svg
new file mode 100644
index 000000000..33ff88f21
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-basic-03.svg
@@ -0,0 +1,19 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:ex="http://example.org/">
+
+ <bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="b" extends="svg:generic">
+ <content>
+ <svg:rect width="100%" height="100%" fill="lime"/>
+ </content>
+ </binding>
+ </bindings>
+
+ <rect width="100%" height="100%" fill="red"/>
+ <g style="-moz-binding: url(#b)"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-01.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-01.svg
new file mode 100644
index 000000000..3a4c36156
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-01.svg
@@ -0,0 +1,29 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test gradient reference in binding for gradient in &lt;binding&gt;</title>
+
+ <bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <children/>
+ <g xmlns="http://www.w3.org/2000/svg">
+ <linearGradient id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+ <rect width="100%" height="100%" fill="url(#grad)"/>
+ </g>
+ </content>
+ </binding>
+ </bindings>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+ <g style="-moz-binding: url(#lime);"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.svg
new file mode 100644
index 000000000..172ea971e
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.svg
@@ -0,0 +1,14 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ style="-moz-binding: url(xbl-grad-ref--grad-in-binding-02.xbl#lime);">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test gradient reference in binding for gradient in &lt;binding&gt;</title>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.xbl b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.xbl
new file mode 100644
index 000000000..dc07078a8
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-02.xbl
@@ -0,0 +1,13 @@
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <children/>
+ <g xmlns="http://www.w3.org/2000/svg">
+ <linearGradient id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+ <rect width="100%" height="100%" fill="url(#grad)"/>
+ </g>
+ </content>
+ </binding>
+</bindings>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-03.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-03.svg
new file mode 100644
index 000000000..b2e576b00
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-03.svg
@@ -0,0 +1,26 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=587585 -->
+
+ <title>Test gradient reference in binding for gradient inside &lt;bindings&gt;</title>
+
+ <g style="-moz-binding: url(#lime);"/>
+
+ <bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(#grad) red"/>
+ <linearGradient xmlns="http://www.w3.org/2000/svg"
+ id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+ </content>
+ </binding>
+ </bindings>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.svg
new file mode 100644
index 000000000..4b9c11f56
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.svg
@@ -0,0 +1,13 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=587585 -->
+
+ <title>Test gradient reference in binding for gradient inside &lt;bindings&gt; with external binding</title>
+
+ <g style="-moz-binding: url(xbl-grad-ref--grad-in-binding-04.xbl#lime);"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.xbl b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.xbl
new file mode 100644
index 000000000..48b033633
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-binding-04.xbl
@@ -0,0 +1,16 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(#grad) red"/>
+ <linearGradient xmlns="http://www.w3.org/2000/svg"
+ id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+ </content>
+ </binding>
+</bindings>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-01.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-01.svg
new file mode 100644
index 000000000..c53e98db3
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-01.svg
@@ -0,0 +1,27 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" style="-moz-binding: url(#lime);">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test gradient reference in binding for gradient outside &lt;bindings&gt;</title>
+
+ <linearGradient id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+
+ <bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <children/>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(#grad)"/>
+ </content>
+ </binding>
+ </bindings>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.svg
new file mode 100644
index 000000000..9e2334193
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.svg
@@ -0,0 +1,19 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ style="-moz-binding: url(xbl-grad-ref--grad-in-bound-02.xbl#red);">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test SVG in XBL can't reference gradient in the bound document</title>
+
+ <!-- SVG in the binding should not be able to reference this gradient -->
+ <linearGradient id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="red"/>
+ </linearGradient>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.xbl b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.xbl
new file mode 100644
index 000000000..c9eb99357
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-02.xbl
@@ -0,0 +1,10 @@
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="red">
+ <content>
+ <children/>
+ <!-- gradient reference should fail, fill should fall back to black -->
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(#grad)"/>
+ </content>
+ </binding>
+</bindings>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-03.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-03.svg
new file mode 100644
index 000000000..2e2482182
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-03.svg
@@ -0,0 +1,25 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=587585 -->
+
+ <title>Test gradient reference in binding for gradient outside &lt;bindings&gt;</title>
+
+ <g style="-moz-binding: url(#lime);"/>
+
+ <bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(#grad) lime"/>
+ </content>
+ </binding>
+ </bindings>
+
+ <linearGradient id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="red"/>
+ </linearGradient>
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.svg
new file mode 100644
index 000000000..dc1892148
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.svg
@@ -0,0 +1,17 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=587585 -->
+
+ <title>Test gradient reference in binding for gradient in bound document with external binding</title>
+
+ <g style="-moz-binding: url(xbl-grad-ref--grad-in-bound-04.xbl#lime);"/>
+
+ <linearGradient id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.xbl b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.xbl
new file mode 100644
index 000000000..076d9bbc9
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-bound-04.xbl
@@ -0,0 +1,12 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <content>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(xbl-grad-ref--grad-in-bound-04.svg#grad) red"/>
+ </content>
+ </binding>
+</bindings>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-01.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-01.svg
new file mode 100644
index 000000000..e46d3dfd2
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-01.svg
@@ -0,0 +1,37 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test gradient reference in binding for gradient in &lt;resources&gt;</title>
+
+ <bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <resources>
+
+ <!-- don't need <svg> - only used to eliminate its omission as a problem -->
+
+ <svg xmlns="http://www.w3.org/2000/svg">
+ <linearGradient xmlns="http://www.w3.org/2000/svg"
+ id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+ </svg>
+
+ </resources>
+ <content>
+ <children/>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(#grad)"/>
+ </content>
+ </binding>
+ </bindings>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+ <g style="-moz-binding: url(#lime);"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.svg b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.svg
new file mode 100644
index 000000000..7b81f749c
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.svg
@@ -0,0 +1,14 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ style="-moz-binding: url(xbl-grad-ref--grad-in-resources-02.xbl#lime);">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=389670 -->
+
+ <title>Test gradient reference in binding for gradient in &lt;resources&gt;</title>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.xbl b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.xbl
new file mode 100644
index 000000000..def5cc3f2
--- /dev/null
+++ b/layout/reftests/svg/moz-only/xbl-grad-ref--grad-in-resources-02.xbl
@@ -0,0 +1,21 @@
+<bindings xmlns="http://www.mozilla.org/xbl">
+ <binding id="lime">
+ <resources>
+
+ <!-- don't need <svg> - only used to eliminate its omission as a problem -->
+
+ <svg xmlns="http://www.w3.org/2000/svg">
+ <linearGradient xmlns="http://www.w3.org/2000/svg"
+ id="grad" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime"/>
+ </linearGradient>
+ </svg>
+
+ </resources>
+ <content>
+ <children/>
+ <rect xmlns="http://www.w3.org/2000/svg"
+ width="100%" height="100%" fill="url(#grad)"/>
+ </content>
+ </binding>
+</bindings>
diff --git a/layout/reftests/svg/moz-only/zoom-invalidation-01.svg b/layout/reftests/svg/moz-only/zoom-invalidation-01.svg
new file mode 100644
index 000000000..e8270968b
--- /dev/null
+++ b/layout/reftests/svg/moz-only/zoom-invalidation-01.svg
@@ -0,0 +1,26 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ reftest-zoom="2" class="reftest-wait"
+ width="50%" height="50%">
+
+ <title>Test invalidation of zoomed SVG</title>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=726928 -->
+
+ <script type="text/javascript">
+
+document.addEventListener("MozReftestInvalidate", doTest, false);
+
+function doTest() {
+ var redRect = document.getElementById('red-rect');
+ redRect.parentNode.removeChild(redRect);
+ document.documentElement.removeAttribute("class");
+}
+
+ </script>
+ <rect width="100%" height="100%" fill="lime"/>
+ <rect id="red-rect" x="10" y="10" width="100" height="100" fill="red"/>
+</svg>
diff --git a/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg
new file mode 100644
index 000000000..99a3d36b5
--- /dev/null
+++ b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg
@@ -0,0 +1,13 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" width="40" height="30">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=407959 -->
+
+ <title>Reference for zoomed-svg-with-viewBox-01.svg</title>
+
+ <ellipse cx="20" cy="15" rx="20" ry="15" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg
new file mode 100644
index 000000000..530f892f4
--- /dev/null
+++ b/layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg
@@ -0,0 +1,14 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" reftest-zoom="3"
+ width="40" height="30" viewBox="20 20 120 90">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=407959 -->
+
+ <title>Test that zooming isn't broken when we have a viewBox</title>
+
+ <ellipse cx="40" cy="35" rx="20" ry="15" fill="blue"/>
+
+</svg>