summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/sizing
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/svg/sizing
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/svg/sizing')
-rw-r--r--layout/reftests/svg/sizing/ahem.css4
-rw-r--r--layout/reftests/svg/sizing/dynamic--inline-css-height.xhtml49
-rw-r--r--layout/reftests/svg/sizing/dynamic--inline-css-width.xhtml49
-rw-r--r--layout/reftests/svg/sizing/dynamic--inline-resize-window-height.xhtml52
-rw-r--r--layout/reftests/svg/sizing/dynamic--inline-resize-window-width.xhtml52
-rw-r--r--layout/reftests/svg/sizing/dynamic--object--auto-auto--pct-px.html43
-rw-r--r--layout/reftests/svg/sizing/dynamic--object-svg-unloaded-a.svg40
-rw-r--r--layout/reftests/svg/sizing/dynamic--object-svg-unloaded-b.xhtml37
-rw-r--r--layout/reftests/svg/sizing/dynamic--object-svg-unloaded.xhtml48
-rw-r--r--layout/reftests/svg/sizing/inline--display-block--01-ref.xhtml40
-rw-r--r--layout/reftests/svg/sizing/inline--display-block--01.xhtml47
-rw-r--r--layout/reftests/svg/sizing/inline--display-inline--01-ref.xhtml40
-rw-r--r--layout/reftests/svg/sizing/inline--display-inline--01.xhtml47
-rw-r--r--layout/reftests/svg/sizing/inline--display-inline-block--01-ref.xhtml40
-rw-r--r--layout/reftests/svg/sizing/inline--display-inline-block--01.xhtml47
-rw-r--r--layout/reftests/svg/sizing/inline--float-left--01-ref.xhtml39
-rw-r--r--layout/reftests/svg/sizing/inline--float-left--01.xhtml46
-rw-r--r--layout/reftests/svg/sizing/inline--float-right--01-ref.xhtml39
-rw-r--r--layout/reftests/svg/sizing/inline--float-right--01.xhtml46
-rw-r--r--layout/reftests/svg/sizing/inline--position-absolute--01-ref.xhtml39
-rw-r--r--layout/reftests/svg/sizing/inline--position-absolute--01.xhtml46
-rw-r--r--layout/reftests/svg/sizing/inline--position-absolute--02.xhtml50
-rw-r--r--layout/reftests/svg/sizing/inline--position-relative--01-ref.xhtml40
-rw-r--r--layout/reftests/svg/sizing/inline--position-relative--01.xhtml47
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-0.html42
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-0.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-pct--ref.html37
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-pct.html44
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-pct.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-px--ref.html37
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-px.html44
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--0-px.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-0--ref.html37
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-0.html44
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-0.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-pct--ref.html38
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-pct.html42
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-pct.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-px--ref.html38
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-px.html42
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--pct-px.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-0--ref.html37
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-0.html42
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-0.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-pct--ref.html38
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-pct.html42
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-pct.svg13
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-px--ref.html38
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-px.html42
-rw-r--r--layout/reftests/svg/sizing/object--auto-auto--px-px.svg13
-rw-r--r--layout/reftests/svg/sizing/object--pct-pct--0-0.html30
-rw-r--r--layout/reftests/svg/sizing/pass-empty.svg8
-rw-r--r--layout/reftests/svg/sizing/pass-pct-height-square.xhtml26
-rw-r--r--layout/reftests/svg/sizing/pass-pct-pct.xhtml30
-rw-r--r--layout/reftests/svg/sizing/pass-pct-px.xhtml30
-rw-r--r--layout/reftests/svg/sizing/pass-pct-width-square.xhtml22
-rw-r--r--layout/reftests/svg/sizing/pass-px-pct.xhtml30
-rw-r--r--layout/reftests/svg/sizing/pass-px-px.xhtml30
-rw-r--r--layout/reftests/svg/sizing/pass.svg8
-rw-r--r--layout/reftests/svg/sizing/reftest.list311
-rw-r--r--layout/reftests/svg/sizing/scrollbars-01-anti-ref.svg11
-rw-r--r--layout/reftests/svg/sizing/scrollbars-01.svg13
-rw-r--r--layout/reftests/svg/sizing/scrollbars-02.svg13
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-0--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-auto--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-pct--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--0-px--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-0--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--0-0.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--0-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--0-px.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--pct-0.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--px-0.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-auto--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--0-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--0-pct.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--0-px.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--pct-0.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--pct-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--pct-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--pct-px--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--pct-px.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--px-0.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--px-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--px-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-pct--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--0-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--0-pct.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--0-px.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--pct-0.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--pct-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--pct-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--pct-px--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--pct-px.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--px-0.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--px-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--px-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--auto-px--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-0--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--0-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--0-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--0-px.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--pct-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--pct-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--pct-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--pct-px--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--pct-px.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--px-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--px-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--px-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-auto--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-pct--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--pct-px--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-0--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--0-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--0-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--0-px.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--pct-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--pct-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--pct-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--pct-px--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--pct-px.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--px-0.svg22
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--px-pct--viewBox.svg23
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--px-pct.svg21
-rw-r--r--layout/reftests/svg/sizing/standalone--px-auto--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-pct--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--0-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--0-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--0-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--pct-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--pct-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--pct-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--px-0.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--px-pct.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone--px-px--px-px.svg20
-rw-r--r--layout/reftests/svg/sizing/standalone-sanity-height-150px.svg8
-rw-r--r--layout/reftests/svg/sizing/standalone-sanity-height-pct.svg8
-rw-r--r--layout/reftests/svg/sizing/standalone-sanity-height-px.svg8
-rw-r--r--layout/reftests/svg/sizing/standalone-sanity-width-300px.svg8
-rw-r--r--layout/reftests/svg/sizing/standalone-sanity-width-pct.svg8
-rw-r--r--layout/reftests/svg/sizing/standalone-sanity-width-px.svg8
225 files changed, 5643 insertions, 0 deletions
diff --git a/layout/reftests/svg/sizing/ahem.css b/layout/reftests/svg/sizing/ahem.css
new file mode 100644
index 0000000000..5cea74d04f
--- /dev/null
+++ b/layout/reftests/svg/sizing/ahem.css
@@ -0,0 +1,4 @@
+@font-face {
+ font-family: "Ahem";
+ src: url(../../fonts/Ahem.ttf);
+}
diff --git a/layout/reftests/svg/sizing/dynamic--inline-css-height.xhtml b/layout/reftests/svg/sizing/dynamic--inline-css-height.xhtml
new file mode 100644
index 0000000000..2abf3a32b1
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--inline-css-height.xhtml
@@ -0,0 +1,49 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: change CSS 'height' property on inline SVG</title>
+
+ <!--
+ This testcase checks that when the value of the CSS 'height' property on
+ inline SVG is changed, the SVG resizes as expected.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background: red;
+}
+
+ </style>
+ <script type="text/javascript">
+
+function resize_svg()
+{
+ document.getElementById('svg').style.height = '100%';
+ document.documentElement.removeAttribute('class');
+}
+
+document.addEventListener("MozReftestInvalidate", resize_svg, false);
+
+ </script>
+ </head>
+ <body>
+
+ <svg id="svg" xmlns="http://www.w3.org/2000/svg"
+ style="display:block; width:100%; height:0;" width="0" height="0">
+ <rect width="100%" height="100%" fill="lime"/>
+ </svg>
+
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/dynamic--inline-css-width.xhtml b/layout/reftests/svg/sizing/dynamic--inline-css-width.xhtml
new file mode 100644
index 0000000000..b23407b6dc
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--inline-css-width.xhtml
@@ -0,0 +1,49 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: change CSS 'width' property on inline SVG</title>
+
+ <!--
+ This testcase checks that when the value of the CSS 'width' property on
+ inline SVG is changed, the SVG resizes as expected.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background: red;
+}
+
+ </style>
+ <script type="text/javascript">
+
+function resize_svg()
+{
+ document.getElementById('svg').style.width = '100%';
+ document.documentElement.removeAttribute('class');
+}
+
+document.addEventListener("MozReftestInvalidate", resize_svg, false);
+
+ </script>
+ </head>
+ <body>
+
+ <svg id="svg" xmlns="http://www.w3.org/2000/svg"
+ style="display:block; width:0; height:100%;" width="0" height="0">
+ <rect width="100%" height="100%" fill="lime"/>
+ </svg>
+
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/dynamic--inline-resize-window-height.xhtml b/layout/reftests/svg/sizing/dynamic--inline-resize-window-height.xhtml
new file mode 100644
index 0000000000..3091947d88
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--inline-resize-window-height.xhtml
@@ -0,0 +1,52 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: resize of window height</title>
+
+ <!--
+ This testcase checks that SVG embedded inline with a percentage height is
+ updated correctly when the window is resized.
+ -->
+
+ <style type="text/css">
+
+html, body, div {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background: red;
+ overflow: hidden;
+}
+
+ </style>
+ <script type="text/javascript">
+
+var initial_height = top.innerHeight;
+top.innerHeight /= 2;
+
+function restore_height()
+{
+ top.innerHeight = initial_height;
+ document.documentElement.removeAttribute('class');
+}
+
+document.addEventListener("MozReftestInvalidate", restore_height, false);
+
+ </script>
+ </head>
+ <body>
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="5000" height="100%">
+ <rect width="100%" height="100%" fill="lime"/>
+ </svg>
+
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/dynamic--inline-resize-window-width.xhtml b/layout/reftests/svg/sizing/dynamic--inline-resize-window-width.xhtml
new file mode 100644
index 0000000000..dbf0c87620
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--inline-resize-window-width.xhtml
@@ -0,0 +1,52 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: resize of window width</title>
+
+ <!--
+ This testcase checks that SVG embedded inline with a percentage width is
+ updated correctly when the window is resized.
+ -->
+
+ <style type="text/css">
+
+html, body, div {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background: red;
+ overflow: hidden;
+}
+
+ </style>
+ <script type="text/javascript">
+
+var initial_width = top.innerWidth;
+top.innerWidth /= 2;
+
+function restore_width()
+{
+ top.innerWidth = initial_width;
+ document.documentElement.removeAttribute('class');
+}
+
+document.addEventListener("MozReftestInvalidate", restore_width, false);
+
+ </script>
+ </head>
+ <body onload="restore_width()">
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="5000">
+ <rect width="100%" height="100%" fill="lime"/>
+ </svg>
+
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/dynamic--object--auto-auto--pct-px.html b/layout/reftests/svg/sizing/dynamic--object--auto-auto--pct-px.html
new file mode 100644
index 0000000000..1fbecb0dc7
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--object--auto-auto--pct-px.html
@@ -0,0 +1,43 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="49%" height="70px"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic
+ height of the embedded SVG, but ignores the percentage width. Since
+ the intrinsic height is 70px, you should see a blue rectangle 300px
+ (the magic default) wide by 70px high when viewing this file. You
+ should not see any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--pct-px.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/dynamic--object-svg-unloaded-a.svg b/layout/reftests/svg/sizing/dynamic--object-svg-unloaded-a.svg
new file mode 100644
index 0000000000..8ee8e25709
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--object-svg-unloaded-a.svg
@@ -0,0 +1,40 @@
+<!--
+ 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" width="70" height="70"
+ onload="handle_load(evt);">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by dynamic--object-svg-unloaded.xhtml</title>
+
+ <script type="text/javascript">
+
+var embedding_element;
+
+function handle_load(e)
+{
+ embedding_element = e.originalTarget.ownerDocument.defaultView.frameElement;
+ top.document.addEventListener("MozReftestInvalidate", load_new_page, false);
+}
+
+function load_new_page()
+{
+ // We could set embedding_element.data to load the new page, but that:
+ //
+ // a) Crashes if we don't use setTimeout
+ //
+ // b) Actually works, perhaps because it takes a different code path to the
+ // path that's taken when a user clicks on a link in the embedded SVG
+ //
+ // For these reasons we set document.location.href on the SVG document.
+
+ document.location.href = 'dynamic--object-svg-unloaded-b.xhtml';
+}
+
+ </script>
+
+ <rect width="100%" height="100%" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/dynamic--object-svg-unloaded-b.xhtml b/layout/reftests/svg/sizing/dynamic--object-svg-unloaded-b.xhtml
new file mode 100644
index 0000000000..7ed4c539ce
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--object-svg-unloaded-b.xhtml
@@ -0,0 +1,37 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by dynamic--object-svg-unloaded.xhtml</title>
+
+ <style type="text/css">
+
+html {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ background: lime;
+}
+
+ </style>
+
+ <script type="text/javascript">
+
+var embedding_element;
+
+function handle_load(e)
+{
+ embedding_element = e.originalTarget.defaultView.frameElement;
+ embedding_element.ownerDocument.documentElement.removeAttribute('class');
+}
+
+ </script>
+
+ </head>
+ <body onload="handle_load(event);" style="display:none;"></body>
+</html>
diff --git a/layout/reftests/svg/sizing/dynamic--object-svg-unloaded.xhtml b/layout/reftests/svg/sizing/dynamic--object-svg-unloaded.xhtml
new file mode 100644
index 0000000000..6095e7cb18
--- /dev/null
+++ b/layout/reftests/svg/sizing/dynamic--object-svg-unloaded.xhtml
@@ -0,0 +1,48 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: object should resize when SVG is unloaded</title>
+
+ <!--
+ This testcase checks that HTML <object> will resize correctly if it depends
+ on the intrinsic size of some embedded SVG, and then the SVG is replaced by
+ some other content (perhaps as a result of a link in the SVG being
+ clicked).
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background: lime;
+}
+
+object {
+ background: red;
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+
+ </style>
+ </head>
+ <body>
+
+ <div style="width:300px; height:150px; background:red;"></div>
+
+ <object data="dynamic--object-svg-unloaded-a.svg" type="image/svg+xml">
+ FAIL
+ </object>
+
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--display-block--01-ref.xhtml b/layout/reftests/svg/sizing/inline--display-block--01-ref.xhtml
new file mode 100644
index 0000000000..f258873729
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--display-block--01-ref.xhtml
@@ -0,0 +1,40 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test inline--display-block--01.xhtml</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <div style="width:51px; height:51px; background:blue; display:block; padding:0; border:1px solid blue; margin:0;">
+ </div>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--display-block--01.xhtml b/layout/reftests/svg/sizing/inline--display-block--01.xhtml
new file mode 100644
index 0000000000..4b8cbe4266
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--display-block--01.xhtml
@@ -0,0 +1,47 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: display:block with width="51" height="51"</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ <!--
+ This testcase checks that SVG embedded inline with display:block is
+ positioned correctly.
+ -->
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
+ style="display:block; padding:0; border:1px solid blue; margin:0;">
+ <rect width="100%" height="100%" fill="blue"/>
+ </svg>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--display-inline--01-ref.xhtml b/layout/reftests/svg/sizing/inline--display-inline--01-ref.xhtml
new file mode 100644
index 0000000000..65cb6542ba
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--display-inline--01-ref.xhtml
@@ -0,0 +1,40 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test inline--display-inline--01.xhtml</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
+ style="width:51px; height:51px; display:inline; padding:0; border:1px solid blue; margin:0;"/>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--display-inline--01.xhtml b/layout/reftests/svg/sizing/inline--display-inline--01.xhtml
new file mode 100644
index 0000000000..5139f6e477
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--display-inline--01.xhtml
@@ -0,0 +1,47 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: display:inline with width="51" height="51"</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ <!--
+ This testcase checks that SVG embedded inline with display:inline is
+ positioned correctly.
+ -->
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
+ style="display:inline; padding:0; border:1px solid blue; margin:0;">
+ <rect width="100%" height="100%" fill="blue"/>
+ </svg>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--display-inline-block--01-ref.xhtml b/layout/reftests/svg/sizing/inline--display-inline-block--01-ref.xhtml
new file mode 100644
index 0000000000..93cb2d1ddf
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--display-inline-block--01-ref.xhtml
@@ -0,0 +1,40 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test inline--display-inline-block--01.xhtml</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <div style="width:51px; height:51px; background:blue; display:inline-block; padding:0; border:1px solid blue; margin:0;">
+ </div>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--display-inline-block--01.xhtml b/layout/reftests/svg/sizing/inline--display-inline-block--01.xhtml
new file mode 100644
index 0000000000..f2f9a84812
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--display-inline-block--01.xhtml
@@ -0,0 +1,47 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: display:inline-block with width="51" height="51"</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ <!--
+ This testcase checks that SVG embedded inline with display:inline-block is
+ positioned correctly.
+ -->
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
+ style="display:inline-block; padding:0; border:1px solid blue; margin:0;">
+ <rect width="100%" height="100%" fill="blue"/>
+ </svg>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--float-left--01-ref.xhtml b/layout/reftests/svg/sizing/inline--float-left--01-ref.xhtml
new file mode 100644
index 0000000000..f46dc85919
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--float-left--01-ref.xhtml
@@ -0,0 +1,39 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test inline--float-left--01.xhtml</title>
+
+ </head>
+ <body>
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <div style="width:51px; height:51px; background:blue; float:left; padding:0; border:1px solid blue; margin:0;">
+ </div>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--float-left--01.xhtml b/layout/reftests/svg/sizing/inline--float-left--01.xhtml
new file mode 100644
index 0000000000..f575db2e74
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--float-left--01.xhtml
@@ -0,0 +1,46 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: float:left with width="51" height="51"</title>
+
+ <!--
+ This testcase checks that SVG embedded inline with float:left is
+ positioned correctly.
+ -->
+
+ </head>
+ <body>
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
+ style="float:left; padding:0; border:1px solid blue; margin:0;">
+ <rect width="100%" height="100%" fill="blue"/>
+ </svg>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--float-right--01-ref.xhtml b/layout/reftests/svg/sizing/inline--float-right--01-ref.xhtml
new file mode 100644
index 0000000000..1803862f9e
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--float-right--01-ref.xhtml
@@ -0,0 +1,39 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test inline--float-right--01.xhtml</title>
+
+ </head>
+ <body>
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <div style="width:51px; height:51px; background:blue; float:right; padding:0; border:1px solid blue; margin:0;">
+ </div>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--float-right--01.xhtml b/layout/reftests/svg/sizing/inline--float-right--01.xhtml
new file mode 100644
index 0000000000..1054c1b62f
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--float-right--01.xhtml
@@ -0,0 +1,46 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: float:right with width="51" height="51"</title>
+
+ <!--
+ This testcase checks that SVG embedded inline with float:right is
+ positioned correctly.
+ -->
+
+ </head>
+ <body>
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
+ style="float:right; padding:0; border:1px solid blue; margin:0;">
+ <rect width="100%" height="100%" fill="blue"/>
+ </svg>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--position-absolute--01-ref.xhtml b/layout/reftests/svg/sizing/inline--position-absolute--01-ref.xhtml
new file mode 100644
index 0000000000..24464c520a
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--position-absolute--01-ref.xhtml
@@ -0,0 +1,39 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test inline--position-absolute--01.xhtml</title>
+
+ </head>
+ <body>
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <div style="width:51px; height:51px; background:blue; position:absolute; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;">
+ </div>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--position-absolute--01.xhtml b/layout/reftests/svg/sizing/inline--position-absolute--01.xhtml
new file mode 100644
index 0000000000..370a9bc438
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--position-absolute--01.xhtml
@@ -0,0 +1,46 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: position:absolute with width="51" height="51"</title>
+
+ <!--
+ This testcase checks that SVG embedded inline with position:absolute is
+ positioned correctly.
+ -->
+
+ </head>
+ <body>
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
+ style="position:absolute; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;">
+ <rect width="100%" height="100%" fill="blue"/>
+ </svg>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--position-absolute--02.xhtml b/layout/reftests/svg/sizing/inline--position-absolute--02.xhtml
new file mode 100644
index 0000000000..a9f7a2b7ed
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--position-absolute--02.xhtml
@@ -0,0 +1,50 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=342532 -->
+
+ <title>Test: percentage height on absolutely positioned SVG</title>
+
+ <!--
+ This testcase checks that percentage values for height on absolutely
+ positioned SVG will be computed relative to their containing block, and
+ not relative to the content area of the user agent.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ height: 100%;
+ background: lime;
+}
+
+ </style>
+ </head>
+ <body>
+
+ <!-- create containing block for absolutely positioned children -->
+ <div style="position:relative;">
+
+ <!-- div to expand parent div to a computed height of 20px -->
+ <div style="height:20px; background:red;"/>
+
+ <!-- absolutely positioned SVG - the explicit 100% percentage height
+ should compute as a percentage of the parent div's computed height,
+ not as a percentage of the body's height! I.e. no red should show.
+ -->
+ <svg xmlns="http://www.w3.org/2000/svg" style="position:absolute; top:0; width: 100%; height: 100%">
+ <rect width="100%" height="100%" fill="red"/>
+ <rect width="100%" height="20px" fill="lime"/>
+ </svg>
+
+ </div>
+
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--position-relative--01-ref.xhtml b/layout/reftests/svg/sizing/inline--position-relative--01-ref.xhtml
new file mode 100644
index 0000000000..dd7cff1e18
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--position-relative--01-ref.xhtml
@@ -0,0 +1,40 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test inline--position-relative--01.xhtml</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
+ style="width:51px; height:51px; display:inline; position:relative; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;"/>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/inline--position-relative--01.xhtml b/layout/reftests/svg/sizing/inline--position-relative--01.xhtml
new file mode 100644
index 0000000000..0e4c334fd1
--- /dev/null
+++ b/layout/reftests/svg/sizing/inline--position-relative--01.xhtml
@@ -0,0 +1,47 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: position:relative with width="51" height="51"</title>
+ <link rel="stylesheet" type="text/css" href="ahem.css" />
+
+ <!--
+ This testcase checks that SVG embedded inline with position:relative is
+ positioned correctly.
+ -->
+
+ </head>
+ <body style="font: 10px/12px Ahem">
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+
+ <svg xmlns="http://www.w3.org/2000/svg" width="51" height="51"
+ style="position:relative; top:51px; right:51px; padding:0; border:1px solid blue; margin:0;">
+ <rect width="100%" height="100%" fill="blue"/>
+ </svg>
+
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ Padding text. Padding text. Padding text. Padding text. Padding text.
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-0.html b/layout/reftests/svg/sizing/object--auto-auto--0-0.html
new file mode 100644
index 0000000000..4601a0c37a
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-0.html
@@ -0,0 +1,42 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="0" height="0"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic width and
+ height of the embedded SVG. Since the intrinsic width and height are both
+ zero, you should not see any red when viewing this file.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ border: 0;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--0-0.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-0.svg b/layout/reftests/svg/sizing/object--auto-auto--0-0.svg
new file mode 100644
index 0000000000..fa0eddd82c
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-0.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" version="1.1" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--0-0.html</title>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-pct--ref.html b/layout/reftests/svg/sizing/object--auto-auto--0-pct--ref.html
new file mode 100644
index 0000000000..1dff62fda5
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-pct--ref.html
@@ -0,0 +1,37 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--0-pct.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ width: 0;
+ height: 150px;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-pct.html b/layout/reftests/svg/sizing/object--auto-auto--0-pct.html
new file mode 100644
index 0000000000..92e266e5fd
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-pct.html
@@ -0,0 +1,44 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="0" height="49%"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic
+ width of the embedded SVG but ignores the (percentage) height.
+ Since the intrinsic width is zero, you should see a 1px blue border
+ around rectangle 0px wide by 150px high when viewing this file. You
+ should not see any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--0-pct.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-pct.svg b/layout/reftests/svg/sizing/object--auto-auto--0-pct.svg
new file mode 100644
index 0000000000..e955c400f0
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-pct.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" version="1.1" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--0-pct.html</title>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-px--ref.html b/layout/reftests/svg/sizing/object--auto-auto--0-px--ref.html
new file mode 100644
index 0000000000..5c44bf52b6
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-px--ref.html
@@ -0,0 +1,37 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--0-px.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ width: 0;
+ height: 70px;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-px.html b/layout/reftests/svg/sizing/object--auto-auto--0-px.html
new file mode 100644
index 0000000000..ec0d8d694e
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-px.html
@@ -0,0 +1,44 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="0" height="70px"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic width and
+ height of the embedded SVG. Since the intrinsic width is zero and the
+ intrinsic height is 70px, you should see a 1px blue border around a
+ rectangle 0px wide by 70px high when viewing this file. You should not see
+ any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--0-px.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--0-px.svg b/layout/reftests/svg/sizing/object--auto-auto--0-px.svg
new file mode 100644
index 0000000000..0b4b0984d4
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--0-px.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" version="1.1" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--0-px.html</title>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-0--ref.html b/layout/reftests/svg/sizing/object--auto-auto--pct-0--ref.html
new file mode 100644
index 0000000000..257ff52684
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-0--ref.html
@@ -0,0 +1,37 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--pct-0.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ width: 300px;
+ height: 0;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-0.html b/layout/reftests/svg/sizing/object--auto-auto--pct-0.html
new file mode 100644
index 0000000000..231d4e4b3c
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-0.html
@@ -0,0 +1,44 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="49%" height="0"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic
+ height of the embedded SVG, but ignores the percentage intrinsic
+ width. Since the intrinsic height is zero, you should see a 1px blue
+ border around a rectangle 300px wide by 0px high when viewing this
+ file. You should not see any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--pct-0.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-0.svg b/layout/reftests/svg/sizing/object--auto-auto--pct-0.svg
new file mode 100644
index 0000000000..d460c2fa69
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-0.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" version="1.1" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--pct-0.html</title>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-pct--ref.html b/layout/reftests/svg/sizing/object--auto-auto--pct-pct--ref.html
new file mode 100644
index 0000000000..8e9ae6f878
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-pct--ref.html
@@ -0,0 +1,38 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--pct-pct.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 0;
+ margin: 50px;
+ width: 49%;
+ height: 49%;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-pct.html b/layout/reftests/svg/sizing/object--auto-auto--pct-pct.html
new file mode 100644
index 0000000000..3d05e12c41
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-pct.html
@@ -0,0 +1,42 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="49%" height="49%"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic width and
+ height of the embedded SVG. Since the intrinsic width and height are both
+ 49%, you should see a blue rectangle 49% wide by 49% high when viewing this
+ file. You should not see any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--pct-pct.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-pct.svg b/layout/reftests/svg/sizing/object--auto-auto--pct-pct.svg
new file mode 100644
index 0000000000..c96b04a738
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-pct.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" version="1.1" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--pct-pct.html</title>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-px--ref.html b/layout/reftests/svg/sizing/object--auto-auto--pct-px--ref.html
new file mode 100644
index 0000000000..af3fa39a7d
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-px--ref.html
@@ -0,0 +1,38 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--pct-px.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 0;
+ margin: 50px;
+ width: 49%;
+ height: 70px;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-px.html b/layout/reftests/svg/sizing/object--auto-auto--pct-px.html
new file mode 100644
index 0000000000..d711e1bda1
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-px.html
@@ -0,0 +1,42 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="49%" height="70px"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic width and
+ height of the embedded SVG. Since the intrinsic width is 49% and the
+ intrinsic height is 70px, you should see a blue rectangle 49% wide by 70px
+ high when viewing this file. You should not see any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--pct-px.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--pct-px.svg b/layout/reftests/svg/sizing/object--auto-auto--pct-px.svg
new file mode 100644
index 0000000000..41fe8bd1d7
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--pct-px.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" version="1.1" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--pct-px.html</title>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-0--ref.html b/layout/reftests/svg/sizing/object--auto-auto--px-0--ref.html
new file mode 100644
index 0000000000..19a3ac08a6
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-0--ref.html
@@ -0,0 +1,37 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--px-0.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ width: 70px;
+ height: 0;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-0.html b/layout/reftests/svg/sizing/object--auto-auto--px-0.html
new file mode 100644
index 0000000000..9bdd4ed4a1
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-0.html
@@ -0,0 +1,42 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="70px" height="0"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic width and
+ height of the embedded SVG. Since the intrinsic width is 70px and the
+ intrinsic height is zero, you should see a 1px blue border around a
+ rectangle 70px wide by 0px high when viewing this file. You should not see
+ any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+object {
+ padding: 0;
+ border: 1px solid blue;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--px-0.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-0.svg b/layout/reftests/svg/sizing/object--auto-auto--px-0.svg
new file mode 100644
index 0000000000..9e0c2b1cf7
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-0.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" version="1.1" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--px-0.html</title>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-pct--ref.html b/layout/reftests/svg/sizing/object--auto-auto--px-pct--ref.html
new file mode 100644
index 0000000000..7464351dd5
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-pct--ref.html
@@ -0,0 +1,38 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--px-pct.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 0;
+ margin: 50px;
+ width: 70px;
+ height: 49%;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-pct.html b/layout/reftests/svg/sizing/object--auto-auto--px-pct.html
new file mode 100644
index 0000000000..3d1591077e
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-pct.html
@@ -0,0 +1,42 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="70px" height="49%"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic width and
+ height of the embedded SVG. Since the intrinsic width is 70px and the
+ intrinsic height is 49%, you should see a blue rectangle 70px wide by 49%
+ high when viewing this file. You should not see any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--px-pct.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-pct.svg b/layout/reftests/svg/sizing/object--auto-auto--px-pct.svg
new file mode 100644
index 0000000000..b409562ac3
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-pct.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" version="1.1" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--px-pct.html</title>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-px--ref.html b/layout/reftests/svg/sizing/object--auto-auto--px-px--ref.html
new file mode 100644
index 0000000000..8f7b4ff769
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-px--ref.html
@@ -0,0 +1,38 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Reference for test object--auto-auto--px-px.html</title>
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ /* XXX Not sure why we get scrolling with 'div' but not 'object'. */
+ overflow: hidden;
+}
+
+div {
+ padding: 0;
+ border: 0;
+ margin: 50px;
+ width: 70px;
+ height: 70px;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-px.html b/layout/reftests/svg/sizing/object--auto-auto--px-px.html
new file mode 100644
index 0000000000..7cb3011b4a
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-px.html
@@ -0,0 +1,42 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="70px" height="70px"</title>
+
+ <!--
+ This testcase checks that the <object> element uses the intrinsic width and
+ height of the embedded SVG. Since the intrinsic width is 70px and the
+ intrinsic height is 70px, you should see a blue rectangle 70px wide by 70px
+ high when viewing this file. You should not see any red.
+ -->
+
+ <style type="text/css">
+
+html, body {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+}
+
+object {
+ padding: 0;
+ margin: 50px;
+ background: red;
+}
+
+ </style>
+ </head>
+ <body>
+ <object data="object--auto-auto--px-px.svg" type="image/svg+xml">
+ FAIL
+ </object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/object--auto-auto--px-px.svg b/layout/reftests/svg/sizing/object--auto-auto--px-px.svg
new file mode 100644
index 0000000000..6721898076
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--auto-auto--px-px.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" version="1.1" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>SVG embedded by reference by object--auto-auto--px-px.html</title>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/object--pct-pct--0-0.html b/layout/reftests/svg/sizing/object--pct-pct--0-0.html
new file mode 100644
index 0000000000..22b287df62
--- /dev/null
+++ b/layout/reftests/svg/sizing/object--pct-pct--0-0.html
@@ -0,0 +1,30 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+ <head>
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=288276 -->
+
+ <title>Test: the width/height of SVG embedded by reference must be overridden</title>
+
+ <style type="text/css">
+
+* {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background: red;
+}
+
+ </style>
+
+ </head>
+ <body>
+ <!-- embedded SVG has width="0" height="0" which should be overridden -->
+ <object type="image/svg+xml" data="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIwIiBoZWlnaHQ9IjAiPg0KICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJsaW1lIi8%2BDQo8L3N2Zz4%3D">FAILED TO LOAD</object>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/pass-empty.svg b/layout/reftests/svg/sizing/pass-empty.svg
new file mode 100644
index 0000000000..67be674dc3
--- /dev/null
+++ b/layout/reftests/svg/sizing/pass-empty.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>Reference SVG for comparisons</title>
+ <!-- empty -->
+</svg>
diff --git a/layout/reftests/svg/sizing/pass-pct-height-square.xhtml b/layout/reftests/svg/sizing/pass-pct-height-square.xhtml
new file mode 100644
index 0000000000..ac6a60d1b4
--- /dev/null
+++ b/layout/reftests/svg/sizing/pass-pct-height-square.xhtml
@@ -0,0 +1,26 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Reference file for comparisons</title>
+ <style type="text/css">
+
+* {
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+html, body {
+ height: 100%;
+}
+
+ </style>
+ </head>
+ <body>
+ <img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
+ style="height:49%;"/>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/pass-pct-pct.xhtml b/layout/reftests/svg/sizing/pass-pct-pct.xhtml
new file mode 100644
index 0000000000..e53d3e5fda
--- /dev/null
+++ b/layout/reftests/svg/sizing/pass-pct-pct.xhtml
@@ -0,0 +1,30 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Reference file for comparisons</title>
+ <style type="text/css">
+
+* {
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+html, body {
+ width: 100%;
+ height: 100%;
+}
+
+div {
+ width: 49%;
+ height: 49%;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body><div></div></body>
+</html>
diff --git a/layout/reftests/svg/sizing/pass-pct-px.xhtml b/layout/reftests/svg/sizing/pass-pct-px.xhtml
new file mode 100644
index 0000000000..e1f5b4f7ae
--- /dev/null
+++ b/layout/reftests/svg/sizing/pass-pct-px.xhtml
@@ -0,0 +1,30 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Reference file for comparisons</title>
+ <style type="text/css">
+
+* {
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+html, body {
+ width: 100%;
+ height: 100%;
+}
+
+div {
+ width: 49%;
+ height: 70px;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body><div></div></body>
+</html>
diff --git a/layout/reftests/svg/sizing/pass-pct-width-square.xhtml b/layout/reftests/svg/sizing/pass-pct-width-square.xhtml
new file mode 100644
index 0000000000..e257bde4aa
--- /dev/null
+++ b/layout/reftests/svg/sizing/pass-pct-width-square.xhtml
@@ -0,0 +1,22 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Reference file for comparisons</title>
+ <style type="text/css">
+
+* {
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+ </style>
+ </head>
+ <body>
+ <img src="data:image/gif;base64,R0lGODlhAQABAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD%2FAP%2F%2FAAAA%2F%2F8A%2FwD%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA%2FwAzAAAzMwAzZgAzmQAzzAAz%2FwBmAABmMwBmZgBmmQBmzABm%2FwCZAACZMwCZZgCZmQCZzACZ%2FwDMAADMMwDMZgDMmQDMzADM%2FwD%2FAAD%2FMwD%2FZgD%2FmQD%2FzAD%2F%2FzMAADMAMzMAZjMAmTMAzDMA%2FzMzADMzMzMzZjMzmTMzzDMz%2FzNmADNmMzNmZjNmmTNmzDNm%2FzOZADOZMzOZZjOZmTOZzDOZ%2FzPMADPMMzPMZjPMmTPMzDPM%2FzP%2FADP%2FMzP%2FZjP%2FmTP%2FzDP%2F%2F2YAAGYAM2YAZmYAmWYAzGYA%2F2YzAGYzM2YzZmYzmWYzzGYz%2F2ZmAGZmM2ZmZmZmmWZmzGZm%2F2aZAGaZM2aZZmaZmWaZzGaZ%2F2bMAGbMM2bMZmbMmWbMzGbM%2F2b%2FAGb%2FM2b%2FZmb%2FmWb%2FzGb%2F%2F5kAAJkAM5kAZpkAmZkAzJkA%2F5kzAJkzM5kzZpkzmZkzzJkz%2F5lmAJlmM5lmZplmmZlmzJlm%2F5mZAJmZM5mZZpmZmZmZzJmZ%2F5nMAJnMM5nMZpnMmZnMzJnM%2F5n%2FAJn%2FM5n%2FZpn%2FmZn%2FzJn%2F%2F8wAAMwAM8wAZswAmcwAzMwA%2F8wzAMwzM8wzZswzmcwzzMwz%2F8xmAMxmM8xmZsxmmcxmzMxm%2F8yZAMyZM8yZZsyZmcyZzMyZ%2F8zMAMzMM8zMZszMmczMzMzM%2F8z%2FAMz%2FM8z%2FZsz%2Fmcz%2FzMz%2F%2F%2F8AAP8AM%2F8AZv8Amf8AzP8A%2F%2F8zAP8zM%2F8zZv8zmf8zzP8z%2F%2F9mAP9mM%2F9mZv9mmf9mzP9m%2F%2F%2BZAP%2BZM%2F%2BZZv%2BZmf%2BZzP%2BZ%2F%2F%2FMAP%2FMM%2F%2FMZv%2FMmf%2FMzP%2FM%2F%2F%2F%2FAP%2F%2FM%2F%2F%2FZv%2F%2Fmf%2F%2FzP%2F%2F%2FywAAAAAAQABAAAIBAAZBAQAOw%3D%3D"
+ style="width:49%;"/>
+ </body>
+</html>
diff --git a/layout/reftests/svg/sizing/pass-px-pct.xhtml b/layout/reftests/svg/sizing/pass-px-pct.xhtml
new file mode 100644
index 0000000000..73f92e2adc
--- /dev/null
+++ b/layout/reftests/svg/sizing/pass-px-pct.xhtml
@@ -0,0 +1,30 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Reference file for comparisons</title>
+ <style type="text/css">
+
+* {
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+html, body {
+ width: 100%;
+ height: 100%;
+}
+
+div {
+ width: 70px;
+ height: 49%;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body><div></div></body>
+</html>
diff --git a/layout/reftests/svg/sizing/pass-px-px.xhtml b/layout/reftests/svg/sizing/pass-px-px.xhtml
new file mode 100644
index 0000000000..5e2f598d53
--- /dev/null
+++ b/layout/reftests/svg/sizing/pass-px-px.xhtml
@@ -0,0 +1,30 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Reference file for comparisons</title>
+ <style type="text/css">
+
+* {
+ padding: 0;
+ border: 0;
+ margin: 0;
+}
+
+html, body {
+ width: 100%;
+ height: 100%;
+}
+
+div {
+ width: 70px;
+ height: 70px;
+ background: blue;
+}
+
+ </style>
+ </head>
+ <body><div></div></body>
+</html>
diff --git a/layout/reftests/svg/sizing/pass.svg b/layout/reftests/svg/sizing/pass.svg
new file mode 100644
index 0000000000..c09c6601e8
--- /dev/null
+++ b/layout/reftests/svg/sizing/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/sizing/reftest.list b/layout/reftests/svg/sizing/reftest.list
new file mode 100644
index 0000000000..4437da4299
--- /dev/null
+++ b/layout/reftests/svg/sizing/reftest.list
@@ -0,0 +1,311 @@
+
+# This directory contains tests that test the sizing of the SVG viewport into
+# which SVG is rendered. It includes tests for standalone SVG, SVG embedded by
+# reference using the HTML <object> element, and SVG rendered inline within
+# XHTML.
+#
+# SVG's <svg> element is a "replaced element". The main specification texts
+# covering how the <svg> element is sized are:
+#
+# http://www.w3.org/TR/SVGMobile12/coords.html#InitialViewport
+# http://www.w3.org/TR/SVGMobile12/coords.html#IntrinsicSizing
+# http://www.w3.org/TR/CSS21/visudet.html
+
+!= scrollbars-01.svg scrollbars-01-anti-ref.svg
+!= scrollbars-02.svg scrollbars-01-anti-ref.svg
+
+# Standalone tests
+#
+# To get reasonable test coverage of the implementation of the replaced element
+# algorythm we test all permutations of the CSS 'width' and 'height' properties
+# having the values zero, auto, a px value or a percentage value, and of the
+# intrinsic width and height (the 'width' and 'height' attributes) having the
+# values zero, a px value or a percentage value. This gives us 4*4*3*3 == 144
+# tests. On top of that, there are 12 cases from the 144 permutations for which
+# the 'viewBox' attribute should have an affect (see below).
+#
+# In the file names for the standalone tests that follow, the first two fields
+# denote the type of value specified for the CSS 'width' and 'height'
+# properties, and the third and four fields denote the type of value used for
+# the intrinsic width and height (i.e. the 'width' and 'height' attributes).
+#
+# Note that the standalone SVG testcases can't test defaulting to 300x150 px
+# because SVG always has an intrinsic width and height. To get the size of an
+# SVG to default to 300x150 px the SVG will need to have a containing block
+# that depends on the SVG's size (e.g. a floating containing block). Again, see
+# below for those tests.
+
+== standalone--0-0--0-0.svg pass-empty.svg
+== standalone--0-0--0-pct.svg pass-empty.svg
+== standalone--0-0--0-px.svg pass-empty.svg
+== standalone--0-0--pct-0.svg pass-empty.svg
+== standalone--0-0--pct-pct.svg pass-empty.svg
+== standalone--0-0--pct-px.svg pass-empty.svg
+== standalone--0-0--px-0.svg pass-empty.svg
+== standalone--0-0--px-pct.svg pass-empty.svg
+== standalone--0-0--px-px.svg pass-empty.svg
+
+== standalone--0-auto--0-0.svg pass-empty.svg
+== standalone--0-auto--0-pct.svg pass-empty.svg
+== standalone--0-auto--0-px.svg pass-empty.svg
+== standalone--0-auto--pct-0.svg pass-empty.svg
+== standalone--0-auto--pct-pct.svg pass-empty.svg
+== standalone--0-auto--pct-px.svg pass-empty.svg
+== standalone--0-auto--px-0.svg pass-empty.svg
+== standalone--0-auto--px-pct.svg pass-empty.svg
+== standalone--0-auto--px-px.svg pass-empty.svg
+
+== standalone--0-pct--0-0.svg pass-empty.svg
+== standalone--0-pct--0-pct.svg pass-empty.svg
+== standalone--0-pct--0-px.svg pass-empty.svg
+== standalone--0-pct--pct-0.svg pass-empty.svg
+== standalone--0-pct--pct-pct.svg pass-empty.svg
+== standalone--0-pct--pct-px.svg pass-empty.svg
+== standalone--0-pct--px-0.svg pass-empty.svg
+== standalone--0-pct--px-pct.svg pass-empty.svg
+== standalone--0-pct--px-px.svg pass-empty.svg
+
+== standalone--0-px--0-0.svg pass-empty.svg
+== standalone--0-px--0-pct.svg pass-empty.svg
+== standalone--0-px--0-px.svg pass-empty.svg
+== standalone--0-px--pct-0.svg pass-empty.svg
+== standalone--0-px--pct-pct.svg pass-empty.svg
+== standalone--0-px--pct-px.svg pass-empty.svg
+== standalone--0-px--px-0.svg pass-empty.svg
+== standalone--0-px--px-pct.svg pass-empty.svg
+== standalone--0-px--px-px.svg pass-empty.svg
+
+== standalone--auto-0--0-0.svg pass-empty.svg
+== standalone--auto-0--0-pct.svg pass-empty.svg
+== standalone--auto-0--0-px.svg pass-empty.svg
+== standalone--auto-0--pct-0.svg pass-empty.svg
+== standalone--auto-0--pct-pct.svg pass-empty.svg
+== standalone--auto-0--pct-px.svg pass-empty.svg
+== standalone--auto-0--px-0.svg pass-empty.svg
+== standalone--auto-0--px-pct.svg pass-empty.svg
+== standalone--auto-0--px-px.svg pass-empty.svg
+
+== standalone--auto-auto--0-0.svg pass-empty.svg
+== standalone--auto-auto--0-pct.svg pass-empty.svg
+== standalone--auto-auto--0-px.svg pass-empty.svg
+== standalone--auto-auto--pct-0.svg pass-empty.svg
+fuzzy-if(d2d,0-1,0-400) == standalone--auto-auto--pct-pct.svg pass-pct-pct.xhtml
+== standalone--auto-auto--pct-px.svg pass-pct-px.xhtml
+== standalone--auto-auto--px-0.svg pass-empty.svg
+== standalone--auto-auto--px-pct.svg pass-px-pct.xhtml
+== standalone--auto-auto--px-px.svg pass-px-px.xhtml
+
+== standalone--auto-pct--0-0.svg pass-empty.svg
+== standalone--auto-pct--0-pct.svg pass-empty.svg
+== standalone--auto-pct--0-px.svg pass-empty.svg
+fuzzy-if(d2d,0-1,0-400) == standalone--auto-pct--pct-0.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--auto-pct--pct-pct.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--auto-pct--pct-px.svg pass-pct-pct.xhtml
+== standalone--auto-pct--px-0.svg pass-px-pct.xhtml
+== standalone--auto-pct--px-pct.svg pass-px-pct.xhtml
+fuzzy-if(d2d,0-1,0-1000) == standalone--auto-pct--px-px.svg pass-pct-height-square.xhtml # intrinsic ratio!
+
+== standalone--auto-px--0-0.svg pass-empty.svg
+== standalone--auto-px--0-pct.svg pass-empty.svg
+== standalone--auto-px--0-px.svg pass-empty.svg
+== standalone--auto-px--pct-0.svg pass-pct-px.xhtml
+== standalone--auto-px--pct-pct.svg pass-pct-px.xhtml
+== standalone--auto-px--pct-px.svg pass-pct-px.xhtml
+== standalone--auto-px--px-0.svg pass-px-px.xhtml
+== standalone--auto-px--px-pct.svg pass-px-px.xhtml
+== standalone--auto-px--px-px.svg pass-px-px.xhtml # intrinsic ratio!
+
+== standalone--pct-0--0-0.svg pass-empty.svg
+== standalone--pct-0--0-pct.svg pass-empty.svg
+== standalone--pct-0--0-px.svg pass-empty.svg
+== standalone--pct-0--pct-0.svg pass-empty.svg
+== standalone--pct-0--pct-pct.svg pass-empty.svg
+== standalone--pct-0--pct-px.svg pass-empty.svg
+== standalone--pct-0--px-0.svg pass-empty.svg
+== standalone--pct-0--px-pct.svg pass-empty.svg
+== standalone--pct-0--px-px.svg pass-empty.svg
+
+== standalone--pct-auto--0-0.svg pass-empty.svg
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-auto--0-pct.svg pass-pct-pct.xhtml
+== standalone--pct-auto--0-px.svg pass-pct-px.xhtml
+== standalone--pct-auto--pct-0.svg pass-empty.svg
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-auto--pct-pct.svg pass-pct-pct.xhtml
+== standalone--pct-auto--pct-px.svg pass-pct-px.xhtml
+== standalone--pct-auto--px-0.svg pass-empty.svg
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-auto--px-pct.svg pass-pct-pct.xhtml
+== standalone--pct-auto--px-px.svg pass-pct-width-square.xhtml # intrinsic ratio!
+
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--0-0.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--0-pct.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--0-px.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--pct-0.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--pct-pct.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--pct-px.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--px-0.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--px-pct.svg pass-pct-pct.xhtml
+fuzzy-if(d2d,0-1,0-400) == standalone--pct-pct--px-px.svg pass-pct-pct.xhtml
+
+== standalone--pct-px--0-0.svg pass-pct-px.xhtml
+== standalone--pct-px--0-pct.svg pass-pct-px.xhtml
+== standalone--pct-px--0-px.svg pass-pct-px.xhtml
+== standalone--pct-px--pct-0.svg pass-pct-px.xhtml
+== standalone--pct-px--pct-pct.svg pass-pct-px.xhtml
+== standalone--pct-px--pct-px.svg pass-pct-px.xhtml
+== standalone--pct-px--px-0.svg pass-pct-px.xhtml
+== standalone--pct-px--px-pct.svg pass-pct-px.xhtml
+== standalone--pct-px--px-px.svg pass-pct-px.xhtml
+
+== standalone--px-0--0-0.svg pass-empty.svg
+== standalone--px-0--0-pct.svg pass-empty.svg
+== standalone--px-0--0-px.svg pass-empty.svg
+== standalone--px-0--pct-0.svg pass-empty.svg
+== standalone--px-0--pct-pct.svg pass-empty.svg
+== standalone--px-0--pct-px.svg pass-empty.svg
+== standalone--px-0--px-0.svg pass-empty.svg
+== standalone--px-0--px-pct.svg pass-empty.svg
+== standalone--px-0--px-px.svg pass-empty.svg
+
+== standalone--px-auto--0-0.svg pass-empty.svg
+== standalone--px-auto--0-pct.svg pass-px-pct.xhtml
+== standalone--px-auto--0-px.svg pass-px-px.xhtml
+== standalone--px-auto--pct-0.svg pass-empty.svg
+== standalone--px-auto--pct-pct.svg pass-px-pct.xhtml
+== standalone--px-auto--pct-px.svg pass-px-px.xhtml
+== standalone--px-auto--px-0.svg pass-empty.svg
+== standalone--px-auto--px-pct.svg pass-px-pct.xhtml
+== standalone--px-auto--px-px.svg pass-px-px.xhtml # intrinsic ratio!
+
+== standalone--px-pct--0-0.svg pass-px-pct.xhtml
+== standalone--px-pct--0-pct.svg pass-px-pct.xhtml
+== standalone--px-pct--0-px.svg pass-px-pct.xhtml
+== standalone--px-pct--pct-0.svg pass-px-pct.xhtml
+== standalone--px-pct--pct-pct.svg pass-px-pct.xhtml
+== standalone--px-pct--pct-px.svg pass-px-pct.xhtml
+== standalone--px-pct--px-0.svg pass-px-pct.xhtml
+== standalone--px-pct--px-pct.svg pass-px-pct.xhtml
+== standalone--px-pct--px-px.svg pass-px-pct.xhtml
+
+== standalone--px-px--0-0.svg pass-px-px.xhtml
+== standalone--px-px--0-pct.svg pass-px-px.xhtml
+== standalone--px-px--0-px.svg pass-px-px.xhtml
+== standalone--px-px--pct-0.svg pass-px-px.xhtml
+== standalone--px-px--pct-pct.svg pass-px-px.xhtml
+== standalone--px-px--pct-px.svg pass-px-px.xhtml
+== standalone--px-px--px-0.svg pass-px-px.xhtml
+== standalone--px-px--px-pct.svg pass-px-px.xhtml
+== standalone--px-px--px-px.svg pass-px-px.xhtml
+
+
+# As mentioned above, the 'viewBox' attribute may play a part in the sizing of
+# the SVG viewport in 12 of the 144 standalone tests above. The 'viewBox'
+# attribute only affects the replaced element sizing algorithm (by providing an
+# intrinsic ratio) when the SVG 'width' and 'height' attributes don't provide
+# an intrinsic ratio but the algorithm says the intrinsic ratio should be used
+# if avaliable. In other words, this is when one of the CSS properties 'width'
+# or 'height' has the value 'auto' and the other has a non-zero value, while
+# one or both of the SVG 'width' and 'height' attributes has a percentage
+# value. For the standalone tests above that means the value of the 'viewBox'
+# attribute matters in the 12 cases that follow.
+#
+# XXX We could also check that 'viewBox' does NOT have an affect in the other
+# cases.
+#
+# XXX What about cases like standalone--auto-pct--0-px--viewBox.svg? Is the
+# intrinsic ratio zero and not used, or should we use the viewBox ratio?
+
+== standalone--auto-pct--pct-pct--viewBox.svg pass-pct-height-square.xhtml
+== standalone--auto-pct--pct-px--viewBox.svg pass-pct-height-square.xhtml
+== standalone--auto-pct--px-pct--viewBox.svg pass-pct-height-square.xhtml
+== standalone--auto-px--pct-pct--viewBox.svg pass-px-px.xhtml
+== standalone--auto-px--pct-px--viewBox.svg pass-px-px.xhtml
+== standalone--auto-px--px-pct--viewBox.svg pass-px-px.xhtml
+== standalone--pct-auto--pct-pct--viewBox.svg pass-pct-width-square.xhtml
+== standalone--pct-auto--pct-px--viewBox.svg pass-pct-width-square.xhtml
+== standalone--pct-auto--px-pct--viewBox.svg pass-pct-width-square.xhtml
+== standalone--px-auto--pct-pct--viewBox.svg pass-px-px.xhtml
+== standalone--px-auto--pct-px--viewBox.svg pass-px-px.xhtml
+== standalone--px-auto--px-pct--viewBox.svg pass-px-px.xhtml
+
+
+# Sanity tests. These tests check that our choice of percentage width (49%)
+# doesn't coincidently result in the same width as our choice of px width
+# (70px) or the fall back width (300 px), and that our choice of percentage
+# height (49%) doesn't coincidently result in the same height as our choice of
+# px height (70px) or the fall back height (150 px). This ensures that we won't
+# miss false positives for the tests:
+#
+# standalone--pct-xxx--px-xxx.svg
+# standalone--xxx-pct--xxx-px.svg
+# standalone--px-xxx--pct-xxx.svg
+# standalone--xxx-px--xxx-pct.svg
+#
+# if the user agent ignores the CSS property and uses the attribute instead.
+# This will happen if the content area width is 612 px or the content height is
+# 306 px. Hopefully it's unlikely testers will encounter this.
+
+!= standalone-sanity-width-pct.svg standalone-sanity-width-px.svg
+!= standalone-sanity-width-pct.svg standalone-sanity-width-300px.svg
+!= standalone-sanity-height-pct.svg standalone-sanity-height-px.svg
+!= standalone-sanity-height-pct.svg standalone-sanity-height-150px.svg
+
+
+# Embedded inline tests
+#
+# The standalone tests provide a reasonable workout for replaced element
+# algorithm sizing, but we also want to test that SVG embedded inline is
+# positioned correctly when the properties 'display', 'float' and 'position'
+# are set to different values.
+#
+# We could certainly expand on these tests, but they provide reasonable base
+# coverage.
+
+== inline--display-block--01.xhtml inline--display-block--01-ref.xhtml
+fuzzy-if(OSX,0-1,0-10) == inline--display-inline--01.xhtml inline--display-inline--01-ref.xhtml
+== inline--display-inline-block--01.xhtml inline--display-inline-block--01-ref.xhtml
+== inline--float-left--01.xhtml inline--float-left--01-ref.xhtml
+== inline--float-right--01.xhtml inline--float-right--01-ref.xhtml
+== inline--position-absolute--01.xhtml inline--position-absolute--01-ref.xhtml
+== inline--position-absolute--02.xhtml pass.svg
+== inline--position-relative--01.xhtml inline--position-relative--01-ref.xhtml
+
+
+# Embedded by reference tests
+#
+# One issue when it comes to documents embedded by reference is whether
+# non-'auto' values for the CSS 'width' and 'height' properties on the
+# _embedded_ document's root element should be used as intrinsic values by
+# replaced elements like HTML <object>. For the sake of simplicity we will
+# ignore this case for now, but it's certainly worth revisiting at some point
+# in the future.
+#
+# Since we have given the replaced element algorithm a reasonable workout in
+# the standalone tests, for the embedded by reference tests we will simply
+# check that the embedded SVG's intrinsic dimensions are used. The following
+# tests do not have any width or height on the <object> element so they should
+# be sized purely by the embedded SVG's intrinsic size.
+
+random-if(Android) == object--auto-auto--0-0.html pass-empty.svg # XXX add border
+random-if(Android) == object--auto-auto--0-pct.html object--auto-auto--0-pct--ref.html
+random-if(Android) == object--auto-auto--0-px.html object--auto-auto--0-px--ref.html
+random-if(Android) == object--auto-auto--pct-0.html object--auto-auto--pct-0--ref.html
+# The following four commented out tests fail post bug 428023:
+#== object--auto-auto--pct-pct.html object--auto-auto--pct-pct--ref.html
+#== object--auto-auto--pct-px.html object--auto-auto--pct-px--ref.html
+random-if(Android) == object--auto-auto--px-0.html object--auto-auto--px-0--ref.html
+#== object--auto-auto--px-pct.html object--auto-auto--px-pct--ref.html
+random-if(Android) == object--auto-auto--px-px.html object--auto-auto--px-px--ref.html
+#== object--pct-pct--0-0.html pass.svg
+
+
+# Assorted tests to check that dynamic changes work correctly
+#
+# Here we have an assortment of different tests to check that updates occur
+# correctly when changes are made that should result in a change in the size
+# or position of the SVG.
+
+== dynamic--inline-css-height.xhtml pass.svg
+== dynamic--inline-css-width.xhtml pass.svg
+skip == dynamic--inline-resize-window-height.xhtml pass.svg # XXX breaks the reftest run as the window height somehow is not restored
+skip == dynamic--inline-resize-window-width.xhtml pass.svg # Fails way too much
+random-if(Android) == dynamic--object-svg-unloaded.xhtml pass.svg
+# == dynamic--object--auto-auto--pct-px.html
diff --git a/layout/reftests/svg/sizing/scrollbars-01-anti-ref.svg b/layout/reftests/svg/sizing/scrollbars-01-anti-ref.svg
new file mode 100644
index 0000000000..a8d92e0847
--- /dev/null
+++ b/layout/reftests/svg/sizing/scrollbars-01-anti-ref.svg
@@ -0,0 +1,11 @@
+<!--
+ 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">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=771935 -->
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/scrollbars-01.svg b/layout/reftests/svg/sizing/scrollbars-01.svg
new file mode 100644
index 0000000000..4433307db4
--- /dev/null
+++ b/layout/reftests/svg/sizing/scrollbars-01.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" version="1.1" width="101%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=771935 -->
+
+ <title>Test that we're given scrollbars if wider than the browser's content area</title>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/scrollbars-02.svg b/layout/reftests/svg/sizing/scrollbars-02.svg
new file mode 100644
index 0000000000..9f9bc4af4e
--- /dev/null
+++ b/layout/reftests/svg/sizing/scrollbars-02.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" version="1.1" height="101%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=771935 -->
+
+ <title>Test that we're given scrollbars if wider than the browser's content area</title>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--0-0.svg b/layout/reftests/svg/sizing/standalone--0-0--0-0.svg
new file mode 100644
index 0000000000..06ee1b22b8
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--0-pct.svg b/layout/reftests/svg/sizing/standalone--0-0--0-pct.svg
new file mode 100644
index 0000000000..e5a9a9f777
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--0-px.svg b/layout/reftests/svg/sizing/standalone--0-0--0-px.svg
new file mode 100644
index 0000000000..5fa9391ad6
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="0" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--pct-0.svg b/layout/reftests/svg/sizing/standalone--0-0--pct-0.svg
new file mode 100644
index 0000000000..a017d7d66a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--pct-pct.svg b/layout/reftests/svg/sizing/standalone--0-0--pct-pct.svg
new file mode 100644
index 0000000000..8f50583adf
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--pct-px.svg b/layout/reftests/svg/sizing/standalone--0-0--pct-px.svg
new file mode 100644
index 0000000000..5ceba989bf
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="49%" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--px-0.svg b/layout/reftests/svg/sizing/standalone--0-0--px-0.svg
new file mode 100644
index 0000000000..3bcf767095
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="70" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--px-pct.svg b/layout/reftests/svg/sizing/standalone--0-0--px-pct.svg
new file mode 100644
index 0000000000..c414d1301a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="70" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-0--px-px.svg b/layout/reftests/svg/sizing/standalone--0-0--px-px.svg
new file mode 100644
index 0000000000..8bb0391948
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-0--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:0;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:0; width="70" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' and 'height' properties
+ to zero prevents the SVG from being displayed. You should not see any red
+ when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--0-0.svg b/layout/reftests/svg/sizing/standalone--0-auto--0-0.svg
new file mode 100644
index 0000000000..a7f9833d75
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--0-pct.svg b/layout/reftests/svg/sizing/standalone--0-auto--0-pct.svg
new file mode 100644
index 0000000000..206b4111cf
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--0-px.svg b/layout/reftests/svg/sizing/standalone--0-auto--0-px.svg
new file mode 100644
index 0000000000..e130c8ffc1
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="0" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--pct-0.svg b/layout/reftests/svg/sizing/standalone--0-auto--pct-0.svg
new file mode 100644
index 0000000000..25f4e4dd9e
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--pct-pct.svg b/layout/reftests/svg/sizing/standalone--0-auto--pct-pct.svg
new file mode 100644
index 0000000000..c9bfd7ac3f
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--pct-px.svg b/layout/reftests/svg/sizing/standalone--0-auto--pct-px.svg
new file mode 100644
index 0000000000..c86f758553
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="49%" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--px-0.svg b/layout/reftests/svg/sizing/standalone--0-auto--px-0.svg
new file mode 100644
index 0000000000..38fca0bd7f
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="70" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--px-pct.svg b/layout/reftests/svg/sizing/standalone--0-auto--px-pct.svg
new file mode 100644
index 0000000000..7fc50a5b6a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="70" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-auto--px-px.svg b/layout/reftests/svg/sizing/standalone--0-auto--px-px.svg
new file mode 100644
index 0000000000..a7d132473d
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-auto--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:auto;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:auto; width="70" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--0-0.svg b/layout/reftests/svg/sizing/standalone--0-pct--0-0.svg
new file mode 100644
index 0000000000..9938ee6892
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--0-pct.svg b/layout/reftests/svg/sizing/standalone--0-pct--0-pct.svg
new file mode 100644
index 0000000000..8917bf10fe
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="0" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="0" height="10%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--0-px.svg b/layout/reftests/svg/sizing/standalone--0-pct--0-px.svg
new file mode 100644
index 0000000000..5d1ccdc873
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="0" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="0" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--pct-0.svg b/layout/reftests/svg/sizing/standalone--0-pct--pct-0.svg
new file mode 100644
index 0000000000..8df3fa2c79
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="10%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="10%" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--pct-pct.svg b/layout/reftests/svg/sizing/standalone--0-pct--pct-pct.svg
new file mode 100644
index 0000000000..22c6a8f817
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:90%;" width="10%" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="10%" height="10%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--pct-px.svg b/layout/reftests/svg/sizing/standalone--0-pct--pct-px.svg
new file mode 100644
index 0000000000..99e317c310
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="10%" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="10%" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--px-0.svg b/layout/reftests/svg/sizing/standalone--0-pct--px-0.svg
new file mode 100644
index 0000000000..98e1a83803
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="10" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="10" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--px-pct.svg b/layout/reftests/svg/sizing/standalone--0-pct--px-pct.svg
new file mode 100644
index 0000000000..cb06033245
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="10" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="10" height="10%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-pct--px-px.svg b/layout/reftests/svg/sizing/standalone--0-pct--px-px.svg
new file mode 100644
index 0000000000..80e9c1ac88
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-pct--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:49%;" width="10" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:49%; width="10" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--0-0.svg b/layout/reftests/svg/sizing/standalone--0-px--0-0.svg
new file mode 100644
index 0000000000..6ee5a3b425
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--0-pct.svg b/layout/reftests/svg/sizing/standalone--0-px--0-pct.svg
new file mode 100644
index 0000000000..9b62bac9dd
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--0-px.svg b/layout/reftests/svg/sizing/standalone--0-px--0-px.svg
new file mode 100644
index 0000000000..a324130290
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="0" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="0" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--pct-0.svg b/layout/reftests/svg/sizing/standalone--0-px--pct-0.svg
new file mode 100644
index 0000000000..c9179e12ed
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--pct-pct.svg b/layout/reftests/svg/sizing/standalone--0-px--pct-pct.svg
new file mode 100644
index 0000000000..c4d82009cb
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--pct-px.svg b/layout/reftests/svg/sizing/standalone--0-px--pct-px.svg
new file mode 100644
index 0000000000..df2055df87
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="49%" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="49%" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--px-0.svg b/layout/reftests/svg/sizing/standalone--0-px--px-0.svg
new file mode 100644
index 0000000000..920cf6ef27
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="10" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="10" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--px-pct.svg b/layout/reftests/svg/sizing/standalone--0-px--px-pct.svg
new file mode 100644
index 0000000000..bf9200e159
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="10" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="10" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--0-px--px-px.svg b/layout/reftests/svg/sizing/standalone--0-px--px-px.svg
new file mode 100644
index 0000000000..7a62c3f633
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--0-px--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:0; height:70px;" width="10" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:0; height:70px; width="10" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'width' property to zero prevents
+ the SVG from being displayed. You should not see any red when viewing this
+ file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--0-0.svg b/layout/reftests/svg/sizing/standalone--auto-0--0-0.svg
new file mode 100644
index 0000000000..4dd222ddc1
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--0-pct.svg b/layout/reftests/svg/sizing/standalone--auto-0--0-pct.svg
new file mode 100644
index 0000000000..c564b9fd0d
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--0-px.svg b/layout/reftests/svg/sizing/standalone--auto-0--0-px.svg
new file mode 100644
index 0000000000..44defae6b6
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="0" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="0" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--pct-0.svg b/layout/reftests/svg/sizing/standalone--auto-0--pct-0.svg
new file mode 100644
index 0000000000..649b8224cc
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--pct-pct.svg b/layout/reftests/svg/sizing/standalone--auto-0--pct-pct.svg
new file mode 100644
index 0000000000..8c9b139b7b
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--pct-px.svg b/layout/reftests/svg/sizing/standalone--auto-0--pct-px.svg
new file mode 100644
index 0000000000..f62c14757d
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="49%" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="49%" height="10"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--px-0.svg b/layout/reftests/svg/sizing/standalone--auto-0--px-0.svg
new file mode 100644
index 0000000000..5e38222fca
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="70" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--px-pct.svg b/layout/reftests/svg/sizing/standalone--auto-0--px-pct.svg
new file mode 100644
index 0000000000..cb77527312
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="70" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-0--px-px.svg b/layout/reftests/svg/sizing/standalone--auto-0--px-px.svg
new file mode 100644
index 0000000000..f4b0539ba9
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-0--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:0;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:0; width="70" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--0-0.svg b/layout/reftests/svg/sizing/standalone--auto-auto--0-0.svg
new file mode 100644
index 0000000000..4156c11b41
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--0-0.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="0" height="0"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. Setting the
+ 'width' and 'height' attributes to zero should prevent the SVG from being
+ displayed. You should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--0-pct.svg b/layout/reftests/svg/sizing/standalone--auto-auto--0-pct.svg
new file mode 100644
index 0000000000..b72fafff85
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--0-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="0" height="49%"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. Setting the
+ 'width' attributes to zero should prevent the SVG from being displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--0-px.svg b/layout/reftests/svg/sizing/standalone--auto-auto--0-px.svg
new file mode 100644
index 0000000000..284d422bad
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--0-px.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="0" height="70"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. Setting the
+ 'width' attributes to zero should prevent the SVG from being displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--pct-0.svg b/layout/reftests/svg/sizing/standalone--auto-auto--pct-0.svg
new file mode 100644
index 0000000000..fb93cccc8a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--pct-0.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="49%" height="0"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. Setting the
+ 'height' attributes to zero should prevent the SVG from being displayed.
+ You should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--pct-pct.svg b/layout/reftests/svg/sizing/standalone--auto-auto--pct-pct.svg
new file mode 100644
index 0000000000..4692dfc6fa
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="49%" height="49%"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. You should see
+ a blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--pct-px.svg b/layout/reftests/svg/sizing/standalone--auto-auto--pct-px.svg
new file mode 100644
index 0000000000..be7d7736c5
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="49%" height="70"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. You should see
+ a blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--px-0.svg b/layout/reftests/svg/sizing/standalone--auto-auto--px-0.svg
new file mode 100644
index 0000000000..1ee6488d68
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--px-0.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="70" height="0"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. Setting the
+ 'height' attributes to zero should prevent the SVG from being displayed.
+ You should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--px-pct.svg b/layout/reftests/svg/sizing/standalone--auto-auto--px-pct.svg
new file mode 100644
index 0000000000..97efb10be5
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="70" height="49%"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. You should see
+ a blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-auto--px-px.svg b/layout/reftests/svg/sizing/standalone--auto-auto--px-px.svg
new file mode 100644
index 0000000000..20c2717b55
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-auto--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:auto;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:auto; width="70" height="70"</title>
+
+ <desc>
+ This test checks that the 'width' and 'height' attributes are used when the
+ CSS 'width' and 'height' properties are both set to 'auto'. You should see
+ a blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--0-0.svg b/layout/reftests/svg/sizing/standalone--auto-pct--0-0.svg
new file mode 100644
index 0000000000..8b76885e1c
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--0-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. Since the
+ 'width' attribute is set to zero, nothing should be displayed. You should
+ not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--0-pct.svg b/layout/reftests/svg/sizing/standalone--auto-pct--0-pct.svg
new file mode 100644
index 0000000000..6409627b4c
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--0-pct.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="0" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="0" height="10%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. Since the
+ 'width' attribute is set to zero, nothing should be displayed. You should
+ not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--0-px.svg b/layout/reftests/svg/sizing/standalone--auto-pct--0-px.svg
new file mode 100644
index 0000000000..0e1edda2ed
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--0-px.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="0" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="0" height="10"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. Since the
+ 'width' attribute is set to zero, nothing should be displayed. You should
+ not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--pct-0.svg b/layout/reftests/svg/sizing/standalone--auto-pct--pct-0.svg
new file mode 100644
index 0000000000..85c961c788
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--pct-0.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--pct-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--auto-pct--pct-pct--viewBox.svg
new file mode 100644
index 0000000000..c7262a5ebd
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--pct-pct--viewBox.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" version="1.1"
+ style="width:auto; height:49%;" width="20%" height="10%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="20%" height="10%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'width' property is set to 'auto', the
+ 'height' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides 49% the height of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--pct-pct.svg b/layout/reftests/svg/sizing/standalone--auto-pct--pct-pct.svg
new file mode 100644
index 0000000000..4c3e98c00e
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--pct-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="49%" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="49%" height="10%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--pct-px--viewBox.svg b/layout/reftests/svg/sizing/standalone--auto-pct--pct-px--viewBox.svg
new file mode 100644
index 0000000000..caf4a17d91
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--pct-px--viewBox.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" version="1.1"
+ style="width:auto; height:49%;" width="10%" height="10"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="10%" height="10" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'width' property is set to 'auto', the
+ 'height' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides 49% the height of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--pct-px.svg b/layout/reftests/svg/sizing/standalone--auto-pct--pct-px.svg
new file mode 100644
index 0000000000..d6c789f7e1
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--pct-px.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="49%" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="49%" height="10"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--px-0.svg b/layout/reftests/svg/sizing/standalone--auto-pct--px-0.svg
new file mode 100644
index 0000000000..c2fd1e603b
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--px-0.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="70" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--px-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--auto-pct--px-pct--viewBox.svg
new file mode 100644
index 0000000000..f2a789684a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--px-pct--viewBox.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" version="1.1"
+ style="width:auto; height:49%;" width="70" height="10%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="70" height="10%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'width' property is set to 'auto', the
+ 'height' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides 49% the height of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--px-pct.svg b/layout/reftests/svg/sizing/standalone--auto-pct--px-pct.svg
new file mode 100644
index 0000000000..4c601494a9
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--px-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="70" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="70" height="10%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-pct--px-px.svg b/layout/reftests/svg/sizing/standalone--auto-pct--px-px.svg
new file mode 100644
index 0000000000..ffe7fd570d
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-pct--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:49%;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:49%; width="70" height="70"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio (1:1) will be used since the
+ CSS 'width' property is set to auto. You should see a blue square with
+ sides 49% the height of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--0-0.svg b/layout/reftests/svg/sizing/standalone--auto-px--0-0.svg
new file mode 100644
index 0000000000..df1800ec28
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--0-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. Since the
+ 'width' attribute is set to zero, nothing should be displayed. You should
+ not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--0-pct.svg b/layout/reftests/svg/sizing/standalone--auto-px--0-pct.svg
new file mode 100644
index 0000000000..ffb2400a62
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--0-pct.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. Since the
+ 'width' attribute is set to zero, nothing should be displayed. You should
+ not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--0-px.svg b/layout/reftests/svg/sizing/standalone--auto-px--0-px.svg
new file mode 100644
index 0000000000..72809a1305
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--0-px.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="0" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="0" height="10"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. Since the
+ 'width' attribute is set to zero, nothing should be displayed. You should
+ not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--pct-0.svg b/layout/reftests/svg/sizing/standalone--auto-px--pct-0.svg
new file mode 100644
index 0000000000..efdab07b21
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--pct-0.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--pct-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--auto-px--pct-pct--viewBox.svg
new file mode 100644
index 0000000000..f98e2b9d68
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--pct-pct--viewBox.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" version="1.1"
+ style="width:auto; height:70px;" width="10%" height="49%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="10%" height="49%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'width' property is set to 'auto', the
+ 'height' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--pct-pct.svg b/layout/reftests/svg/sizing/standalone--auto-px--pct-pct.svg
new file mode 100644
index 0000000000..c5783ca175
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--pct-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--pct-px--viewBox.svg b/layout/reftests/svg/sizing/standalone--auto-px--pct-px--viewBox.svg
new file mode 100644
index 0000000000..1327012dca
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--pct-px--viewBox.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" version="1.1"
+ style="width:auto; height:70px;" width="49%" height="10"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="49%" height="10" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'width' property is set to 'auto', the
+ 'height' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--pct-px.svg b/layout/reftests/svg/sizing/standalone--auto-px--pct-px.svg
new file mode 100644
index 0000000000..91c62bb28c
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--pct-px.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="49%" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="49%" height="10"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--px-0.svg b/layout/reftests/svg/sizing/standalone--auto-px--px-0.svg
new file mode 100644
index 0000000000..32c113b429
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--px-0.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="70" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--px-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--auto-px--px-pct--viewBox.svg
new file mode 100644
index 0000000000..32151187a9
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--px-pct--viewBox.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" version="1.1"
+ style="width:auto; height:70px;" width="10" height="49%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="10" height="49%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'width' property is set to 'auto', the
+ 'height' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--px-pct.svg b/layout/reftests/svg/sizing/standalone--auto-px--px-pct.svg
new file mode 100644
index 0000000000..fe35b2b1a0
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--px-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="70" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic width will be taken as the used
+ width when the CSS 'width' property is set to 'auto', the 'height' property
+ is set to some other value, and there is no intrinsic ratio. You should see
+ a blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--auto-px--px-px.svg b/layout/reftests/svg/sizing/standalone--auto-px--px-px.svg
new file mode 100644
index 0000000000..f7cfc6f9e4
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--auto-px--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:auto; height:70px;" width="1" height="1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:auto; height:70px; width="1" height="1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio (1:1) will be used since the
+ CSS 'width' property is set to auto. You should see a blue square with
+ sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--0-0.svg b/layout/reftests/svg/sizing/standalone--pct-0--0-0.svg
new file mode 100644
index 0000000000..788019e256
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--0-pct.svg b/layout/reftests/svg/sizing/standalone--pct-0--0-pct.svg
new file mode 100644
index 0000000000..b9734786bc
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--0-px.svg b/layout/reftests/svg/sizing/standalone--pct-0--0-px.svg
new file mode 100644
index 0000000000..f092b9a038
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="0" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--pct-0.svg b/layout/reftests/svg/sizing/standalone--pct-0--pct-0.svg
new file mode 100644
index 0000000000..bc29ce6a3e
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--pct-pct.svg b/layout/reftests/svg/sizing/standalone--pct-0--pct-pct.svg
new file mode 100644
index 0000000000..0cc62c5049
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--pct-px.svg b/layout/reftests/svg/sizing/standalone--pct-0--pct-px.svg
new file mode 100644
index 0000000000..c65ed72dca
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="49%" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--px-0.svg b/layout/reftests/svg/sizing/standalone--pct-0--px-0.svg
new file mode 100644
index 0000000000..2fb91a78d7
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="70" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--px-pct.svg b/layout/reftests/svg/sizing/standalone--pct-0--px-pct.svg
new file mode 100644
index 0000000000..32d8c31738
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="70" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-0--px-px.svg b/layout/reftests/svg/sizing/standalone--pct-0--px-px.svg
new file mode 100644
index 0000000000..99d685c106
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-0--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:0;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:0; width="70" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--0-0.svg b/layout/reftests/svg/sizing/standalone--pct-auto--0-0.svg
new file mode 100644
index 0000000000..1615ea6d37
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--0-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. Since
+ the 'height' attribute is set to zero, nothing should be displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--0-pct.svg b/layout/reftests/svg/sizing/standalone--pct-auto--0-pct.svg
new file mode 100644
index 0000000000..46b14f432c
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--0-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--0-px.svg b/layout/reftests/svg/sizing/standalone--pct-auto--0-px.svg
new file mode 100644
index 0000000000..44e82d75ad
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--0-px.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="0" height="70"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--pct-0.svg b/layout/reftests/svg/sizing/standalone--pct-auto--pct-0.svg
new file mode 100644
index 0000000000..bc9917af28
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--pct-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="10%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="10%" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. Since
+ the 'height' attribute is set to zero, nothing should be displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--pct-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--pct-auto--pct-pct--viewBox.svg
new file mode 100644
index 0000000000..f29e6fca75
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--pct-pct--viewBox.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" version="1.1"
+ style="width:49%; height:auto;" width="10%" height="20%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="10%" height="20%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'height' property is set to 'auto', the
+ 'width' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides 49% the height of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--pct-pct.svg b/layout/reftests/svg/sizing/standalone--pct-auto--pct-pct.svg
new file mode 100644
index 0000000000..6c0dae659d
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--pct-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="10%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="10%" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--pct-px--viewBox.svg b/layout/reftests/svg/sizing/standalone--pct-auto--pct-px--viewBox.svg
new file mode 100644
index 0000000000..6622bd6f75
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--pct-px--viewBox.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" version="1.1"
+ style="width:49%; height:auto;" width="10%" height="70"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="10%" height="70" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'height' property is set to 'auto', the
+ 'width' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides 49% the height of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--pct-px.svg b/layout/reftests/svg/sizing/standalone--pct-auto--pct-px.svg
new file mode 100644
index 0000000000..c3bacfdff0
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--pct-px.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="10%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="10%" height="70"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--px-0.svg b/layout/reftests/svg/sizing/standalone--pct-auto--px-0.svg
new file mode 100644
index 0000000000..058d60b0cd
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--px-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="70" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. Since
+ the 'height' attribute is set to zero, nothing should be displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--px-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--pct-auto--px-pct--viewBox.svg
new file mode 100644
index 0000000000..9e5d41bf8a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--px-pct--viewBox.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" version="1.1"
+ style="width:49%; height:auto;" width="70" height="20%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="70" height="20%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'height' property is set to 'auto', the
+ 'width' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides 49% the height of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--px-pct.svg b/layout/reftests/svg/sizing/standalone--pct-auto--px-pct.svg
new file mode 100644
index 0000000000..141fa273ff
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--px-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="70" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-auto--px-px.svg b/layout/reftests/svg/sizing/standalone--pct-auto--px-px.svg
new file mode 100644
index 0000000000..ef19a9be11
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-auto--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:auto;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:auto; width="70" height="70"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio (1:1) will be used since the
+ CSS 'height' property is set to auto. You should see a blue square with
+ sides 49% the width of the content area when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--0-0.svg b/layout/reftests/svg/sizing/standalone--pct-pct--0-0.svg
new file mode 100644
index 0000000000..d13cb402eb
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="0" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--0-pct.svg b/layout/reftests/svg/sizing/standalone--pct-pct--0-pct.svg
new file mode 100644
index 0000000000..42f674f1c7
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="0" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="0" height="10%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--0-px.svg b/layout/reftests/svg/sizing/standalone--pct-pct--0-px.svg
new file mode 100644
index 0000000000..31c2d0f917
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="0" height="70"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--pct-0.svg b/layout/reftests/svg/sizing/standalone--pct-pct--pct-0.svg
new file mode 100644
index 0000000000..6ebadb5fed
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="10%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="10%" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--pct-pct.svg b/layout/reftests/svg/sizing/standalone--pct-pct--pct-pct.svg
new file mode 100644
index 0000000000..85ff4a96bd
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="10%" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="10%" height="10%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--pct-px.svg b/layout/reftests/svg/sizing/standalone--pct-pct--pct-px.svg
new file mode 100644
index 0000000000..7c5c13d7a8
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="10%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="10%" height="70"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--px-0.svg b/layout/reftests/svg/sizing/standalone--pct-pct--px-0.svg
new file mode 100644
index 0000000000..08b549457d
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="70" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--px-pct.svg b/layout/reftests/svg/sizing/standalone--pct-pct--px-pct.svg
new file mode 100644
index 0000000000..9c7cff9dac
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="70" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="70" height="10%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-pct--px-px.svg b/layout/reftests/svg/sizing/standalone--pct-pct--px-px.svg
new file mode 100644
index 0000000000..131719ec99
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-pct--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:49%;" width="70" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:49%; width="70" height="70"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--0-0.svg b/layout/reftests/svg/sizing/standalone--pct-px--0-0.svg
new file mode 100644
index 0000000000..7de487cc27
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="0" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--0-pct.svg b/layout/reftests/svg/sizing/standalone--pct-px--0-pct.svg
new file mode 100644
index 0000000000..82e8c58ebe
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="0" height="49%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--0-px.svg b/layout/reftests/svg/sizing/standalone--pct-px--0-px.svg
new file mode 100644
index 0000000000..165613e31a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="0" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="0" height="10"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--pct-0.svg b/layout/reftests/svg/sizing/standalone--pct-px--pct-0.svg
new file mode 100644
index 0000000000..e194b61893
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="10%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="10%" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--pct-pct.svg b/layout/reftests/svg/sizing/standalone--pct-px--pct-pct.svg
new file mode 100644
index 0000000000..47a36ddbd9
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="10%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="10%" height="49%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--pct-px.svg b/layout/reftests/svg/sizing/standalone--pct-px--pct-px.svg
new file mode 100644
index 0000000000..0c90cf5fbc
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="10%" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="10%" height="10"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--px-0.svg b/layout/reftests/svg/sizing/standalone--pct-px--px-0.svg
new file mode 100644
index 0000000000..892cd41ed3
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="70" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="70" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--px-pct.svg b/layout/reftests/svg/sizing/standalone--pct-px--px-pct.svg
new file mode 100644
index 0000000000..bb95c9b6f0
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="70" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="70" height="49%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--pct-px--px-px.svg b/layout/reftests/svg/sizing/standalone--pct-px--px-px.svg
new file mode 100644
index 0000000000..c846ffda9c
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--pct-px--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:49%; height:70px;" width="70" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:49%; height:70px; width="70" height="10"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 49% wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--0-0.svg b/layout/reftests/svg/sizing/standalone--px-0--0-0.svg
new file mode 100644
index 0000000000..16f26042ab
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--0-pct.svg b/layout/reftests/svg/sizing/standalone--px-0--0-pct.svg
new file mode 100644
index 0000000000..ba8566af7a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--0-px.svg b/layout/reftests/svg/sizing/standalone--px-0--0-px.svg
new file mode 100644
index 0000000000..c227eb9887
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="0" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--pct-0.svg b/layout/reftests/svg/sizing/standalone--px-0--pct-0.svg
new file mode 100644
index 0000000000..af2e327bc5
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--pct-pct.svg b/layout/reftests/svg/sizing/standalone--px-0--pct-pct.svg
new file mode 100644
index 0000000000..014341caa9
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--pct-px.svg b/layout/reftests/svg/sizing/standalone--px-0--pct-px.svg
new file mode 100644
index 0000000000..89d5a4725b
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="49%" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--px-0.svg b/layout/reftests/svg/sizing/standalone--px-0--px-0.svg
new file mode 100644
index 0000000000..d9cded74b0
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="10" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="10" height="0"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--px-pct.svg b/layout/reftests/svg/sizing/standalone--px-0--px-pct.svg
new file mode 100644
index 0000000000..ae3f2e83a3
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="10" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="10" height="49%"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-0--px-px.svg b/layout/reftests/svg/sizing/standalone--px-0--px-px.svg
new file mode 100644
index 0000000000..9fd20fe474
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-0--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:0;" width="10" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:0; width="10" height="70"</title>
+
+ <desc>
+ This testcase checks that setting the CSS 'height' property to zero
+ prevents the SVG from being displayed. You should not see any red when
+ viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--0-0.svg b/layout/reftests/svg/sizing/standalone--px-auto--0-0.svg
new file mode 100644
index 0000000000..a5dceb2643
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--0-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="0" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. Since
+ the 'height' attribute is set to zero, nothing should be displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--0-pct.svg b/layout/reftests/svg/sizing/standalone--px-auto--0-pct.svg
new file mode 100644
index 0000000000..7fe4ee8275
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--0-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="0" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--0-px.svg b/layout/reftests/svg/sizing/standalone--px-auto--0-px.svg
new file mode 100644
index 0000000000..06b4bd45ba
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--0-px.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="0" height="70"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--pct-0.svg b/layout/reftests/svg/sizing/standalone--px-auto--pct-0.svg
new file mode 100644
index 0000000000..23db638fb4
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--pct-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="49%" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. Since
+ the 'height' attribute is set to zero, nothing should be displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--pct-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--px-auto--pct-pct--viewBox.svg
new file mode 100644
index 0000000000..3551c67b8a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--pct-pct--viewBox.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" version="1.1"
+ style="width:70px; height:auto;" width="20%" height="49%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="20%" height="49%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'height' property is set to 'auto', the
+ 'width' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--pct-pct.svg b/layout/reftests/svg/sizing/standalone--px-auto--pct-pct.svg
new file mode 100644
index 0000000000..f823a264fc
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--pct-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="49%" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--pct-px--viewBox.svg b/layout/reftests/svg/sizing/standalone--px-auto--pct-px--viewBox.svg
new file mode 100644
index 0000000000..d311a1681e
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--pct-px--viewBox.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" version="1.1"
+ style="width:70px; height:auto;" width="49%" height="10"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="49%" height="10" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'height' property is set to 'auto', the
+ 'width' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--pct-px.svg b/layout/reftests/svg/sizing/standalone--px-auto--pct-px.svg
new file mode 100644
index 0000000000..881a1f29c0
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--pct-px.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="49%" height="70"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--px-0.svg b/layout/reftests/svg/sizing/standalone--px-auto--px-0.svg
new file mode 100644
index 0000000000..8e62aff883
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--px-0.svg
@@ -0,0 +1,22 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="10" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="10" height="0"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. Since
+ the 'height' attribute is set to zero, nothing should be displayed. You
+ should not see any red when viewing this file.
+ </desc>
+
+ <rect width="1000" height="1000" fill="red"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--px-pct--viewBox.svg b/layout/reftests/svg/sizing/standalone--px-auto--px-pct--viewBox.svg
new file mode 100644
index 0000000000..79d6e39e70
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--px-pct--viewBox.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" version="1.1"
+ style="width:70px; height:auto;" width="10" height="49%"
+ viewBox="0 0 1 1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="10" height="49%" viewBox="0 0 1 1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio will be taken from the
+ 'viewBox' attribute when the CSS 'height' property is set to 'auto', the
+ 'width' property is set to some other value, and the 'width' and 'height'
+ attributes do not provide an intrinsic ratio. You should see a blue square
+ with sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--px-pct.svg b/layout/reftests/svg/sizing/standalone--px-auto--px-pct.svg
new file mode 100644
index 0000000000..af42e2f270
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--px-pct.svg
@@ -0,0 +1,21 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="10" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="10" height="49%"</title>
+
+ <desc>
+ This testcase checks that the intrinsic height will be taken as the used
+ height when the CSS 'height' property is set to 'auto', the 'width'
+ property is set to some other value, and there is no intrinsic ratio. You
+ should see a blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-auto--px-px.svg b/layout/reftests/svg/sizing/standalone--px-auto--px-px.svg
new file mode 100644
index 0000000000..ce7872b456
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-auto--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:auto;" width="1" height="1">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:auto; width="1" height="1"</title>
+
+ <desc>
+ This testcase checks that the intrinsic ratio (1:1) will be used since the
+ CSS 'height' property is set to auto. You should see a blue square with
+ sides of length 70px when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--0-0.svg b/layout/reftests/svg/sizing/standalone--px-pct--0-0.svg
new file mode 100644
index 0000000000..66c7159c52
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="0" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--0-pct.svg b/layout/reftests/svg/sizing/standalone--px-pct--0-pct.svg
new file mode 100644
index 0000000000..43b2fe4f3a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="0" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="0" height="10%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--0-px.svg b/layout/reftests/svg/sizing/standalone--px-pct--0-px.svg
new file mode 100644
index 0000000000..caa951ca20
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="0" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="0" height="70"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--pct-0.svg b/layout/reftests/svg/sizing/standalone--px-pct--pct-0.svg
new file mode 100644
index 0000000000..5dd6e8cf4f
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="49%" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--pct-pct.svg b/layout/reftests/svg/sizing/standalone--px-pct--pct-pct.svg
new file mode 100644
index 0000000000..bca83300e1
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="49%" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="49%" height="10%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--pct-px.svg b/layout/reftests/svg/sizing/standalone--px-pct--pct-px.svg
new file mode 100644
index 0000000000..7e5036407c
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="49%" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="49%" height="70"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--px-0.svg b/layout/reftests/svg/sizing/standalone--px-pct--px-0.svg
new file mode 100644
index 0000000000..b81a35d96d
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="10" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="10" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--px-pct.svg b/layout/reftests/svg/sizing/standalone--px-pct--px-pct.svg
new file mode 100644
index 0000000000..9a0cabbf11
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="10" height="10%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="10" height="10%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-pct--px-px.svg b/layout/reftests/svg/sizing/standalone--px-pct--px-px.svg
new file mode 100644
index 0000000000..85f4bc946a
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-pct--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:49%;" width="10" height="70">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:49%; width="10" height="70"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 49% high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--0-0.svg b/layout/reftests/svg/sizing/standalone--px-px--0-0.svg
new file mode 100644
index 0000000000..5cd0d5cd2b
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--0-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="0" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="0" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--0-pct.svg b/layout/reftests/svg/sizing/standalone--px-px--0-pct.svg
new file mode 100644
index 0000000000..f9c54e45af
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--0-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="0" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="0" height="49%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--0-px.svg b/layout/reftests/svg/sizing/standalone--px-px--0-px.svg
new file mode 100644
index 0000000000..1c802d12e2
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--0-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="0" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="0" height="10"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--pct-0.svg b/layout/reftests/svg/sizing/standalone--px-px--pct-0.svg
new file mode 100644
index 0000000000..c311b88edd
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--pct-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="49%" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="49%" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--pct-pct.svg b/layout/reftests/svg/sizing/standalone--px-px--pct-pct.svg
new file mode 100644
index 0000000000..3f89fe4e13
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--pct-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="49%" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="49%" height="49%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--pct-px.svg b/layout/reftests/svg/sizing/standalone--px-px--pct-px.svg
new file mode 100644
index 0000000000..567bff9538
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--pct-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="49%" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="49%" height="10"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--px-0.svg b/layout/reftests/svg/sizing/standalone--px-px--px-0.svg
new file mode 100644
index 0000000000..d33e353918
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--px-0.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="10" height="0">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="10" height="0"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--px-pct.svg b/layout/reftests/svg/sizing/standalone--px-px--px-pct.svg
new file mode 100644
index 0000000000..94d3d6e9de
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--px-pct.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="10" height="49%">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="10" height="49%"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone--px-px--px-px.svg b/layout/reftests/svg/sizing/standalone--px-px--px-px.svg
new file mode 100644
index 0000000000..fbd9142af8
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone--px-px--px-px.svg
@@ -0,0 +1,20 @@
+<!--
+ 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"
+ style="width:70px; height:70px;" width="10" height="10">
+
+ <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
+
+ <title>Test: width:70px; height:70px; width="10" height="10"</title>
+
+ <desc>
+ This test checks that the CSS 'width' and 'height' properties take
+ precedence over the SVG 'width' and 'height' attributes. You should see a
+ blue rectangle 70px wide and 70px high when viewing this file.
+ </desc>
+
+ <rect width="100%" height="100%" fill="blue"/>
+
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone-sanity-height-150px.svg b/layout/reftests/svg/sizing/standalone-sanity-height-150px.svg
new file mode 100644
index 0000000000..b460f4b808
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone-sanity-height-150px.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>Sanity check percentage width</title>
+ <rect width="100%" height="150" fill="blue"/>
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone-sanity-height-pct.svg b/layout/reftests/svg/sizing/standalone-sanity-height-pct.svg
new file mode 100644
index 0000000000..113613fa36
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone-sanity-height-pct.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>Sanity check percentage width</title>
+ <rect width="100%" height="49%" fill="blue"/>
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone-sanity-height-px.svg b/layout/reftests/svg/sizing/standalone-sanity-height-px.svg
new file mode 100644
index 0000000000..01c72df5a8
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone-sanity-height-px.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>Sanity check percentage width</title>
+ <rect width="100%" height="70" fill="blue"/>
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone-sanity-width-300px.svg b/layout/reftests/svg/sizing/standalone-sanity-width-300px.svg
new file mode 100644
index 0000000000..318bf38af2
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone-sanity-width-300px.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>Sanity check percentage width</title>
+ <rect width="300" height="100%" fill="blue"/>
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone-sanity-width-pct.svg b/layout/reftests/svg/sizing/standalone-sanity-width-pct.svg
new file mode 100644
index 0000000000..050cad0943
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone-sanity-width-pct.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>Sanity check percentage width</title>
+ <rect width="49%" height="100%" fill="blue"/>
+</svg>
diff --git a/layout/reftests/svg/sizing/standalone-sanity-width-px.svg b/layout/reftests/svg/sizing/standalone-sanity-width-px.svg
new file mode 100644
index 0000000000..2abcc29dd6
--- /dev/null
+++ b/layout/reftests/svg/sizing/standalone-sanity-width-px.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>Sanity check percentage width</title>
+ <rect width="70" height="100%" fill="blue"/>
+</svg>