summaryrefslogtreecommitdiffstats
path: root/layout/reftests/backgrounds/vector/empty
diff options
context:
space:
mode:
Diffstat (limited to 'layout/reftests/backgrounds/vector/empty')
-rw-r--r--layout/reftests/backgrounds/vector/empty/intrinsic-ratio-no-dimensions.svg10
-rw-r--r--layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-height.svg11
-rw-r--r--layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-width.svg11
-rw-r--r--layout/reftests/backgrounds/vector/empty/nonpercent-width-omitted-height-extreme-viewbox.svg11
-rw-r--r--layout/reftests/backgrounds/vector/empty/omitted-width-nonpercent-height-extreme-viewbox.svg11
-rw-r--r--layout/reftests/backgrounds/vector/empty/ref-tall-empty.html24
-rw-r--r--layout/reftests/backgrounds/vector/empty/ref-tall-lime.html28
-rw-r--r--layout/reftests/backgrounds/vector/empty/ref-wide-empty.html21
-rw-r--r--layout/reftests/backgrounds/vector/empty/ref-wide-lime.html28
-rw-r--r--layout/reftests/backgrounds/vector/empty/reftest-stylo.list27
-rw-r--r--layout/reftests/backgrounds/vector/empty/reftest.list26
-rw-r--r--layout/reftests/backgrounds/vector/empty/tall--contain--height.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/tall--contain--width.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/tall--cover--height.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/tall--cover--width.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/wide--contain--height.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/wide--contain--width.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/wide--cover--height.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/wide--cover--width.html35
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-height-ratio-5px-auto.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-5px.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-auto.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-height-ratio-contain.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-height-ratio-cover.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-5px-auto.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-5px.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-auto.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-contain.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-cover.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-width-ratio-5px-auto.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-5px.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-auto.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-width-ratio-contain.html34
-rw-r--r--layout/reftests/backgrounds/vector/empty/zero-width-ratio-cover.html34
34 files changed, 998 insertions, 0 deletions
diff --git a/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-no-dimensions.svg b/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-no-dimensions.svg
new file mode 100644
index 000000000..e116d8f1f
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-no-dimensions.svg
@@ -0,0 +1,10 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 8 0"
+ preserveAspectRatio="none">
+ <title>Image with zero-width ratio, no dimensions</title>
+ <rect y="0" width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-height.svg b/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-height.svg
new file mode 100644
index 000000000..e691e3f91
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-height.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"
+ width="8px"
+ viewBox="0 0 8 0"
+ preserveAspectRatio="none">
+ <title>Image with zero-height ratio, width</title>
+ <rect y="0" width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-width.svg b/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-width.svg
new file mode 100644
index 000000000..df3653167
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/intrinsic-ratio-zero-width.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"
+ width="8px"
+ viewBox="0 0 0 8"
+ preserveAspectRatio="none">
+ <title>Image with zero-width ratio, width</title>
+ <rect y="0" width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/layout/reftests/backgrounds/vector/empty/nonpercent-width-omitted-height-extreme-viewbox.svg b/layout/reftests/backgrounds/vector/empty/nonpercent-width-omitted-height-extreme-viewbox.svg
new file mode 100644
index 000000000..052ed2ab3
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/nonpercent-width-omitted-height-extreme-viewbox.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"
+ width="8px"
+ viewBox="0 0 2147483647 1"
+ preserveAspectRatio="none">
+ <title>Image with non-percent width, omitted height, extreme viewbox</title>
+ <rect y="0" width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/layout/reftests/backgrounds/vector/empty/omitted-width-nonpercent-height-extreme-viewbox.svg b/layout/reftests/backgrounds/vector/empty/omitted-width-nonpercent-height-extreme-viewbox.svg
new file mode 100644
index 000000000..9e9b0b431
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/omitted-width-nonpercent-height-extreme-viewbox.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"
+ height="8px"
+ viewBox="0 0 1 2147483647"
+ preserveAspectRatio="none">
+ <title>Image with omitted width, non-percent height, extreme viewbox</title>
+ <rect y="0" width="100%" height="100%" fill="lime"/>
+</svg>
diff --git a/layout/reftests/backgrounds/vector/empty/ref-tall-empty.html b/layout/reftests/backgrounds/vector/empty/ref-tall-empty.html
new file mode 100644
index 000000000..37e411f08
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/ref-tall-empty.html
@@ -0,0 +1,24 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>tall reference, empty</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+ </style>
+</head>
+<body>
+<div id="outer"></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/ref-tall-lime.html b/layout/reftests/backgrounds/vector/empty/ref-tall-lime.html
new file mode 100644
index 000000000..d0f18bfcf
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/ref-tall-lime.html
@@ -0,0 +1,28 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>tall reference, lime fill</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background: lime;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/ref-wide-empty.html b/layout/reftests/backgrounds/vector/empty/ref-wide-empty.html
new file mode 100644
index 000000000..16ad53315
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/ref-wide-empty.html
@@ -0,0 +1,21 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>wide reference, empty</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <style type="text/css">
+div
+{
+ width: 768px; height: 256px;
+ border: 1px solid black;
+}
+ </style>
+</head>
+<body>
+<div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/ref-wide-lime.html b/layout/reftests/backgrounds/vector/empty/ref-wide-lime.html
new file mode 100644
index 000000000..7ae51768a
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/ref-wide-lime.html
@@ -0,0 +1,28 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>wide reference, empty</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <style type="text/css">
+div
+{
+ width: 768px; height: 256px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background: lime;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/reftest-stylo.list b/layout/reftests/backgrounds/vector/empty/reftest-stylo.list
new file mode 100644
index 000000000..a690d7e1e
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/reftest-stylo.list
@@ -0,0 +1,27 @@
+# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing
+== tall--contain--height.html tall--contain--height.html
+== tall--contain--width.html tall--contain--width.html
+== wide--contain--height.html wide--contain--height.html
+== wide--contain--width.html wide--contain--width.html
+
+# These tests fail because of integer overflow; see bug 894555.
+== tall--cover--height.html tall--cover--height.html
+== tall--cover--width.html tall--cover--width.html
+== wide--cover--height.html wide--cover--height.html
+== wide--cover--width.html wide--cover--width.html
+
+== zero-height-ratio-contain.html zero-height-ratio-contain.html
+== zero-height-ratio-cover.html zero-height-ratio-cover.html
+== zero-height-ratio-auto-auto.html zero-height-ratio-auto-auto.html
+== zero-height-ratio-auto-5px.html zero-height-ratio-auto-5px.html
+== zero-height-ratio-5px-auto.html zero-height-ratio-5px-auto.html
+== zero-width-ratio-contain.html zero-width-ratio-contain.html
+== zero-width-ratio-cover.html zero-width-ratio-cover.html
+== zero-width-ratio-auto-auto.html zero-width-ratio-auto-auto.html
+== zero-width-ratio-auto-5px.html zero-width-ratio-auto-5px.html
+== zero-width-ratio-5px-auto.html zero-width-ratio-5px-auto.html
+== zero-ratio-no-dimensions-contain.html zero-ratio-no-dimensions-contain.html
+== zero-ratio-no-dimensions-cover.html zero-ratio-no-dimensions-cover.html
+== zero-ratio-no-dimensions-auto-5px.html zero-ratio-no-dimensions-auto-5px.html
+== zero-ratio-no-dimensions-5px-auto.html zero-ratio-no-dimensions-5px-auto.html
+== zero-ratio-no-dimensions-auto-auto.html zero-ratio-no-dimensions-auto-auto.html
diff --git a/layout/reftests/backgrounds/vector/empty/reftest.list b/layout/reftests/backgrounds/vector/empty/reftest.list
new file mode 100644
index 000000000..d83e5c1da
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/reftest.list
@@ -0,0 +1,26 @@
+== tall--contain--height.html ref-tall-empty.html
+== tall--contain--width.html ref-tall-empty.html
+== wide--contain--height.html ref-wide-empty.html
+== wide--contain--width.html ref-wide-empty.html
+
+# These tests fail because of integer overflow; see bug 894555.
+fails == tall--cover--height.html ref-tall-lime.html
+fails == tall--cover--width.html ref-tall-lime.html
+fails == wide--cover--height.html ref-wide-lime.html
+fails == wide--cover--width.html ref-wide-lime.html
+
+== zero-height-ratio-contain.html ref-tall-empty.html
+== zero-height-ratio-cover.html ref-tall-empty.html
+== zero-height-ratio-auto-auto.html ref-tall-empty.html
+== zero-height-ratio-auto-5px.html ref-tall-empty.html
+== zero-height-ratio-5px-auto.html ref-tall-empty.html
+== zero-width-ratio-contain.html ref-tall-empty.html
+== zero-width-ratio-cover.html ref-tall-empty.html
+== zero-width-ratio-auto-auto.html ref-tall-empty.html
+== zero-width-ratio-auto-5px.html ref-tall-empty.html
+== zero-width-ratio-5px-auto.html ref-tall-empty.html
+== zero-ratio-no-dimensions-contain.html ref-tall-empty.html
+== zero-ratio-no-dimensions-cover.html ref-tall-empty.html
+== zero-ratio-no-dimensions-auto-5px.html ref-tall-empty.html
+== zero-ratio-no-dimensions-5px-auto.html ref-tall-empty.html
+== zero-ratio-no-dimensions-auto-auto.html ref-tall-empty.html
diff --git a/layout/reftests/backgrounds/vector/empty/tall--contain--height.html b/layout/reftests/backgrounds/vector/empty/tall--contain--height.html
new file mode 100644
index 000000000..8c0d38a30
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/tall--contain--height.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>tall background-size: contain; for nonpercent-width-omitted-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(nonpercent-width-omitted-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/tall--contain--width.html b/layout/reftests/backgrounds/vector/empty/tall--contain--width.html
new file mode 100644
index 000000000..2fe4ac8d8
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/tall--contain--width.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>tall background-size: contain; for omitted-width-nonpercent-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(omitted-width-nonpercent-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/tall--cover--height.html b/layout/reftests/backgrounds/vector/empty/tall--cover--height.html
new file mode 100644
index 000000000..be40ed2e8
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/tall--cover--height.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>tall background-size: cover; for nonpercent-width-omitted-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(nonpercent-width-omitted-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/tall--cover--width.html b/layout/reftests/backgrounds/vector/empty/tall--cover--width.html
new file mode 100644
index 000000000..e4fea72c9
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/tall--cover--width.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>tall background-size: cover; for omitted-width-nonpercent-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(omitted-width-nonpercent-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/wide--contain--height.html b/layout/reftests/backgrounds/vector/empty/wide--contain--height.html
new file mode 100644
index 000000000..e81082f10
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/wide--contain--height.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>wide background-size: contain; for nonpercent-width-omitted-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 768px; height: 256px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(nonpercent-width-omitted-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/wide--contain--width.html b/layout/reftests/backgrounds/vector/empty/wide--contain--width.html
new file mode 100644
index 000000000..2b88a018c
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/wide--contain--width.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>wide background-size: contain; for omitted-width-nonpercent-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 768px; height: 256px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(omitted-width-nonpercent-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/wide--cover--height.html b/layout/reftests/backgrounds/vector/empty/wide--cover--height.html
new file mode 100644
index 000000000..7b6c323e4
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/wide--cover--height.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>wide background-size: cover; for nonpercent-width-omitted-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 768px; height: 256px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(nonpercent-width-omitted-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/wide--cover--width.html b/layout/reftests/backgrounds/vector/empty/wide--cover--width.html
new file mode 100644
index 000000000..beb516db3
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/wide--cover--width.html
@@ -0,0 +1,35 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>wide background-size: cover; for omitted-width-nonpercent-height-extreme-viewbox.svg</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 768px; height: 256px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(omitted-width-nonpercent-height-extreme-viewbox.svg);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-height-ratio-5px-auto.html b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-5px-auto.html
new file mode 100644
index 000000000..059a075fd
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-5px-auto.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero height ratio, 5px auto</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-height.svg);
+ background-repeat: no-repeat;
+ background-size: 5px auto;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-5px.html b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-5px.html
new file mode 100644
index 000000000..99a0b070c
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-5px.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero height ratio, auto 5px</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-height.svg);
+ background-repeat: no-repeat;
+ background-size: auto 5px;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-auto.html b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-auto.html
new file mode 100644
index 000000000..82d34bfee
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-auto-auto.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero height ratio, auto auto</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-height.svg);
+ background-repeat: no-repeat;
+ background-size: auto auto;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-height-ratio-contain.html b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-contain.html
new file mode 100644
index 000000000..caf6c57d6
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-contain.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero height ratio, contain</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-height.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-height-ratio-cover.html b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-cover.html
new file mode 100644
index 000000000..a34dd6164
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-height-ratio-cover.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero height ratio, cover</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-height.svg);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-5px-auto.html b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-5px-auto.html
new file mode 100644
index 000000000..2581e299b
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-5px-auto.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero ratio, no dimensions, 5px auto</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-no-dimensions.svg);
+ background-repeat: no-repeat;
+ background-size: 5px auto;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-5px.html b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-5px.html
new file mode 100644
index 000000000..4198c9d06
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-5px.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero ratio, no dimensions, auto 5px</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-no-dimensions.svg);
+ background-repeat: no-repeat;
+ background-size: auto 5px;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-auto.html b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-auto.html
new file mode 100644
index 000000000..85c20fd1e
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-auto-auto.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero ratio, no dimensions, auto auto</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-no-dimensions.svg);
+ background-repeat: no-repeat;
+ background-size: auto auto;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-contain.html b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-contain.html
new file mode 100644
index 000000000..fa62a2531
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-contain.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero ratio, no dimensions, contain</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-no-dimensions.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-cover.html b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-cover.html
new file mode 100644
index 000000000..771269e2c
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-ratio-no-dimensions-cover.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero ratio, no dimensions, cover</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-no-dimensions.svg);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-width-ratio-5px-auto.html b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-5px-auto.html
new file mode 100644
index 000000000..675e75b39
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-5px-auto.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero height ratio, 5px auto</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-width.svg);
+ background-repeat: no-repeat;
+ background-size: 5px auto;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-5px.html b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-5px.html
new file mode 100644
index 000000000..c16d11df7
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-5px.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero height ratio, auto 5px</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-width.svg);
+ background-repeat: no-repeat;
+ background-size: auto 5px;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-auto.html b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-auto.html
new file mode 100644
index 000000000..78a7327ab
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-auto-auto.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero width ratio, auto auto</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-width.svg);
+ background-repeat: no-repeat;
+ background-size: auto auto;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-width-ratio-contain.html b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-contain.html
new file mode 100644
index 000000000..560498377
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-contain.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero width ratio, contain</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-width.svg);
+ background-repeat: no-repeat;
+ background-size: contain;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>
diff --git a/layout/reftests/backgrounds/vector/empty/zero-width-ratio-cover.html b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-cover.html
new file mode 100644
index 000000000..a1e6c52f4
--- /dev/null
+++ b/layout/reftests/backgrounds/vector/empty/zero-width-ratio-cover.html
@@ -0,0 +1,34 @@
+<!--
+ Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+ <title>zero width ratio, cover</title>
+ <link rel="author" title="Jeff Walden" href="http://whereswalden.com/" />
+ <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-size" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#IntrinsicSizing" />
+ <link rel="help" href="http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute" />
+ <meta name="flags" content="svg" />
+ <style type="text/css">
+div
+{
+ width: 256px; height: 768px;
+}
+#outer
+{
+ border: 1px solid black;
+}
+#inner
+{
+ background-image: url(intrinsic-ratio-zero-width.svg);
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+ </style>
+</head>
+<body>
+<div id="outer"><div id="inner"></div></div>
+</body>
+</html>