Bug 1457353 - P2: Simple reftests. r?xidorn
To show the feature working.
MozReview-Commit-ID: SR7Z1tMaal
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