Bug 933057 (Part 2) - Add tests for scaling explicitly sized svg:image elements in inline SVGs. r=dholbert
authorSeth Fowler <seth@mozilla.com>
Fri, 08 Nov 2013 15:14:58 -0800
changeset 154254 edbf63c3afe2e206691b2a68e8d8279332a1f839
parent 154253 8255ebcdfe7e1b92d9f0a883598825dc3914151d
child 154255 791fe13b7966b10e82b267f5d13b8b5e15438c57
push id25634
push usercbook@mozilla.com
push dateMon, 11 Nov 2013 07:54:04 +0000
treeherdermozilla-central@86afe33114e7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs933057
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 933057 (Part 2) - Add tests for scaling explicitly sized svg:image elements in inline SVGs. r=dholbert
layout/reftests/svg/image/image-svg-inline-zoom-in-01c.html
layout/reftests/svg/image/image-svg-inline-zoom-in-01d.html
layout/reftests/svg/image/image-svg-inline-zoom-out-01c.html
layout/reftests/svg/image/image-svg-inline-zoom-out-01d.html
layout/reftests/svg/image/lime100x100.svg
layout/reftests/svg/image/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/image/image-svg-inline-zoom-in-01c.html
@@ -0,0 +1,18 @@
+<html reftest-zoom="1.5">
+  <!-- Test to make sure svg:image is painted correctly when its containing SVG
+       is included inline in a zoomed webpage. -->
+  <body style="background: lime">
+    <!-- 100x100 red div -->
+    <div style="background: red;
+                margin-left: 30px; margin-top: 30px;
+                width: 100px; height: 100px;">
+      <svg xmlns="http://www.w3.org/2000/svg"
+           xmlns:xlink="http://www.w3.org/1999/xlink"
+           style="shape-rendering: crispEdges">
+        <!-- SVG with an intrinsic size of 100px x 100px; percentage size on
+             image element. -->
+        <image xlink:href="lime100x100.svg" width="100%" height="100%"/>
+      </svg>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/image/image-svg-inline-zoom-in-01d.html
@@ -0,0 +1,18 @@
+<html reftest-zoom="1.5">
+  <!-- Test to make sure svg:image is painted correctly when its containing SVG
+       is included inline in a zoomed webpage. -->
+  <body style="background: lime">
+    <!-- 100x100 red div -->
+    <div style="background: red;
+                margin-left: 30px; margin-top: 30px;
+                width: 100px; height: 100px;">
+      <svg xmlns="http://www.w3.org/2000/svg"
+           xmlns:xlink="http://www.w3.org/1999/xlink"
+           style="shape-rendering: crispEdges">
+        <!-- SVG with an intrinsic size of 100px x 100px; explicit size on
+             image element. -->
+        <image xlink:href="lime100x100.svg" width="100px" height="100px"/>
+      </svg>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/image/image-svg-inline-zoom-out-01c.html
@@ -0,0 +1,17 @@
+<html reftest-zoom="0.5">
+  <!-- Test to make sure svg:image is painted correctly when its containing SVG
+       is included inline in a zoomed webpage. -->
+  <body style="background: lime">
+    <!-- 100x100 red div -->
+    <div style="background: red;
+                margin-left: 30px; margin-top: 30px;
+                width: 100px; height: 100px;">
+      <svg xmlns="http://www.w3.org/2000/svg"
+           xmlns:xlink="http://www.w3.org/1999/xlink">
+        <!-- SVG with an intrinsic size of 100px x 100px; percentage size on
+             image element. -->
+        <image xlink:href="lime100x100.svg" width="100%" height="100%"/>
+      </svg>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/image/image-svg-inline-zoom-out-01d.html
@@ -0,0 +1,17 @@
+<html reftest-zoom="0.5">
+  <!-- Test to make sure svg:image is painted correctly when its containing SVG
+       is included inline in a zoomed webpage. -->
+  <body style="background: lime">
+    <!-- 100x100 red div -->
+    <div style="background: red;
+                margin-left: 30px; margin-top: 30px;
+                width: 100px; height: 100px;">
+      <svg xmlns="http://www.w3.org/2000/svg"
+           xmlns:xlink="http://www.w3.org/1999/xlink">
+        <!-- SVG with an intrinsic size of 100px x 100px; explicit size on
+             image element. -->
+        <image xlink:href="lime100x100.svg" width="100px" height="100px"/>
+      </svg>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/image/lime100x100.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="100px" height="100px">
+  <rect width="100px" height="100px" style="fill: lime"/>
+</svg>
--- a/layout/reftests/svg/image/reftest.list
+++ b/layout/reftests/svg/image/reftest.list
@@ -8,18 +8,22 @@ fuzzy-if(Android,4,34) == image-opacity-
 == image-rotate-01.svg                        image-rotate-01-ref.svg
 == image-rotate-02a.svg                       image-rotate-02-ref.svg
 == image-rotate-02b.svg                       image-rotate-02-ref.svg
 == image-scaling-01.svg                       ../pass.svg
 == image-scaling-02.svg                       ../pass.svg
 == image-svg-inline-01.html                   ../pass.svg
 == image-svg-inline-zoom-in-01a.html          ../pass.svg
 == image-svg-inline-zoom-in-01b.html          ../pass.svg
+== image-svg-inline-zoom-in-01c.html          ../pass.svg
+== image-svg-inline-zoom-in-01d.html          ../pass.svg
 == image-svg-inline-zoom-out-01a.html         ../pass.svg
 == image-svg-inline-zoom-out-01b.html         ../pass.svg
+== image-svg-inline-zoom-out-01c.html         ../pass.svg
+== image-svg-inline-zoom-out-01d.html         ../pass.svg
 == image-svg-inline-sprite-zoom-in-01a.html   image-svg-inline-sprite-zoom-in-01-ref.html
 == image-svg-inline-sprite-zoom-in-01b.html   image-svg-inline-sprite-zoom-in-01-ref.html
 == image-svg-inline-sprite-zoom-out-01a.html  image-svg-inline-sprite-zoom-out-01-ref.html
 == image-svg-inline-sprite-zoom-out-01b.html  image-svg-inline-sprite-zoom-out-01-ref.html
 == image-translate-01.svg                     image-translate-01-ref.svg
 == image-x-01.svg                             image-x-01-ref.svg
 == image-xy-01.svg                            image-xy-01-ref.svg
 == image-y-01.svg                             image-y-01-ref.svg