Bug 1335876 - Part 3. Reftest. r=jwatt
authorcku <cku@mozilla.com>
Fri, 03 Feb 2017 00:57:10 +0800
changeset 485430 9a7bfd0dd402bce661339f59fd22e95d9962ffc7
parent 485429 b6bc87b2a558fcdb7fe229a0548e5a0de907e4af
child 485431 241efbf6fcc9fbca82cba7c57838726aa2c64c62
push id45733
push useraklotz@mozilla.com
push dateThu, 16 Feb 2017 17:45:58 +0000
reviewersjwatt
bugs1335876
milestone54.0a1
Bug 1335876 - Part 3. Reftest. r=jwatt MozReview-Commit-ID: HMrMTTxgga4
layout/reftests/transform/pass.svg
layout/reftests/transform/reftest.list
layout/reftests/transform/transform-box-svg-3a.svg
new file mode 100644
--- /dev/null
+++ b/layout/reftests/transform/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>
--- a/layout/reftests/transform/reftest.list
+++ b/layout/reftests/transform/reftest.list
@@ -124,16 +124,17 @@ fuzzy-if(skiaContent,2,5) == stresstest-
 == table-2a.html table-2-ref.html
 == table-2b.html table-2-ref.html
 # Bug 722463
 == inline-1a.html inline-1-ref.html
 pref(svg.transform-box.enabled,true) == transform-box-svg-1a.svg transform-box-svg-1-ref.svg
 pref(svg.transform-box.enabled,true) == transform-box-svg-1b.svg transform-box-svg-1-ref.svg
 pref(svg.transform-box.enabled,true) == transform-box-svg-2a.svg transform-box-svg-2-ref.svg
 pref(svg.transform-box.enabled,true) == transform-box-svg-2b.svg transform-box-svg-2-ref.svg
+pref(svg.transform-box.enabled,true) == transform-box-svg-3a.svg pass.svg
 == transform-origin-svg-1a.svg transform-origin-svg-1-ref.svg
 == transform-origin-svg-1b.svg transform-origin-svg-1-ref.svg
 == transform-origin-svg-2a.svg transform-origin-svg-2-ref.svg
 == transform-origin-svg-2b.svg transform-origin-svg-2-ref.svg
 # Bug 1122526
 == animate-layer-scale-inherit-1.html animate-layer-scale-inherit-1-ref.html
 == animate-layer-scale-inherit-2.html animate-layer-scale-inherit-2-ref.html
 random-if(webrender) == animate-layer-scale-inherit-3.html animate-layer-scale-inherit-1-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/transform/transform-box-svg-3a.svg
@@ -0,0 +1,64 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="none">
+  <style>
+    /* <![CDATA[ */
+    .ref {
+      fill: red;
+    }
+    .test {
+      fill: lime;
+    }
+    /* ]]> */
+  </style>
+  <rect width="100%" height="100%" fill="lime"/>
+  <!-- all rect.test rects should be covered by the corresponded rest.ref rect-->
+  <!-- 1st row: transform-box only. -->
+  <rect class="ref"
+        x="11" y="11" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: view-box"
+        x="10" y="10" width="10" height="10"/>
+  <rect class="ref"
+        x="26" y="11" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: fill-box"
+        x="25" y="10" width="10" height="10"/>
+  <rect class="ref"
+        x="41" y="11" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: border-box"
+        x="40" y="10" width="10" height="10"/>
+
+  <!-- 2nd row: transform-box plus transform-origin. -->
+  <rect class="ref"
+        x="11" y="26" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: view-box; tansform-origin: 40% 60%"
+        x="10" y="25" width="10" height="10"/>
+  <rect class="ref"
+        x="26" y="26" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: fill-box; tansform-origin: 20px 10px"
+        x="25" y="25" width="10" height="10"/>
+  <rect class="ref"
+        x="41" y="26" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: border-box; tansform-origin: 40% 60%"
+        x="40" y="25" width="10" height="10"/>
+
+  <!-- 2nd row: transform-box, transform-origin and transform. -->
+  <rect class="ref"
+        x="11" y="46" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: fill-box; tansform-origin: 0% 0%; transform: scale(2);"
+        x="10" y="45" width="5" height="5"/>
+  <rect class="ref"
+        x="26" y="46" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: fill-box; transform-origin: 50% 50%; transform:rotate(45deg);"
+        x="24" y="44" width="12" height="12"/>
+  <rect class="ref"
+        x="41" y="46" width="8" height="8"/>
+  <rect class="test"
+        style="transform-box: border-box; tansform-origin: 100% 100%; transform: scale(1);"
+        x="40" y="45" width="10" height="10"/>
+</svg>
\ No newline at end of file