Bug 1457353 - P2: Simple reftests. r?xidorn draft
authorDan Glastonbury <dan.glastonbury@gmail.com>
Fri, 27 Apr 2018 15:14:30 +1000
changeset 801959 de28d59fb78739152e0baa3fcfa6ce5905fc7cc7
parent 801958 158c6c1d5ed0622cd8896ccc5b47afac2c383f26
child 801960 8b8f31b64ccdff368e3860cec234dce9b2186541
push id111791
push userbmo:dglastonbury@mozilla.com
push dateThu, 31 May 2018 04:33:20 +0000
reviewersxidorn
bugs1457353
milestone62.0a1
Bug 1457353 - P2: Simple reftests. r?xidorn To show the feature working. MozReview-Commit-ID: SR7Z1tMaal
layout/reftests/svg/currentColor-override-flood.svg
layout/reftests/svg/currentColor-override-lighting-ref.svg
layout/reftests/svg/currentColor-override-lighting.svg
layout/reftests/svg/currentColor-override-stop.svg
layout/reftests/svg/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/currentColor-override-flood.svg
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <defs>
+    <filter id="floodFilter" filterUnits="userSpaceOnUse" style="color:red; flood-color:currentColor">
+      <feFlood x="0" y="0" width="100%" height="100%" style="color:lime;"
+               flood-color="inherit" flood-opacity="1"
+               />
+    </filter>
+  </defs>
+  <use style="filter: url(#floodFilter);"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/currentColor-override-lighting-ref.svg
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <!-- the light source is a fePointLight element -->
+  <filter id="lightMe1">
+    <feDiffuseLighting
+        in="SourceGraphic"
+        result="light"
+        lighting-color="lime">
+      <fePointLight x="0" y="0" z="100" />
+    </feDiffuseLighting>
+
+    <feComposite in="SourceGraphic" in2="light" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"/>
+  </filter>
+  <rect width="100%" height="100%" fill="white" filter="url(#lightMe1)" />
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/currentColor-override-lighting.svg
@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <!-- the light source is a fePointLight element -->
+  <filter id="lightMe1" style="color: red" lighting-color="currentColor">
+    <feDiffuseLighting
+        in="SourceGraphic"
+        result="light"
+        style="color: lime;"
+        lighting-color="inherit">
+      <fePointLight x="0" y="0" z="100" />
+    </feDiffuseLighting>
+
+    <feComposite in="SourceGraphic" in2="light" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"/>
+  </filter>
+  <rect width="100%" height="100%" fill="white" filter="url(#lightMe1)" />
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/currentColor-override-stop.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+  <defs>
+    <linearGradient id="gradient" color="red" stop-color="currentColor">
+      <stop offset="0" style="color:lime;" stop-color="inherit" />
+      <stop offset="1" stop-color="lime" />
+    </linearGradient>
+  </defs>
+  <rect width="100%" height="100%" fill="url(#gradient)" />
+</svg>
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -542,8 +542,13 @@ fuzzy-if(skiaContent,1,100) == tspan-xy-
 == viewBox-invalid-01.svg pass.svg
 == viewBox-invalid-02.svg pass.svg
 == viewBox-valid-01.svg pass.svg
 == viewBox-valid-02.xhtml pass.svg
 == viewport-percent-graphic-user-01.svg pass.svg
 == winding-01.svg pass.svg
 
 == zero-stroke-01.svg pass.svg
+
+# currentColor override by color attribute
+== currentColor-override-flood.svg pass.svg
+== currentColor-override-lighting.svg currentColor-override-lighting-ref.svg
+== currentColor-override-stop.svg pass.svg
\ No newline at end of file