Bug 1457353 - P2: Simple reftests. r=xidorn
authorDan Glastonbury <dan.glastonbury@gmail.com>
Fri, 27 Apr 2018 15:14:30 +1000
changeset 420630 9ca706d68d3f936d3880bb14b2d6a780882dd875
parent 420629 f82bde34ccde67f3ed2246e992552f8ee0eb8a83
child 420631 76b492ce782870d2371708b2187eb9506530b4af
push id103846
push userapavel@mozilla.com
push dateThu, 31 May 2018 10:08:04 +0000
treeherdermozilla-inbound@0336998b51de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1457353
milestone62.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 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