Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | <!-- |
michael@0 | 2 | Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 4 | --> |
michael@0 | 5 | <svg class="reftest-wait" xmlns="http://www.w3.org/2000/svg" onload="startTest()"> |
michael@0 | 6 | <defs> |
michael@0 | 7 | <filter id="f" filterUnits="objectBoundingBox" primitiveUnits="objectBoundingBox" |
michael@0 | 8 | x="0" y="0" width="1" height="1"> |
michael@0 | 9 | <feFlood flood-color="#ff0000" flood-opacity="0.5" result="flood"/> |
michael@0 | 10 | <feComposite id="comp" width="1" height="1" in="flood" operator="over" in2="SourceGraphic"/> |
michael@0 | 11 | </filter> |
michael@0 | 12 | </defs> |
michael@0 | 13 | |
michael@0 | 14 | <rect width="100" height="100" fill="lime" filter="url(#f)"/> |
michael@0 | 15 | |
michael@0 | 16 | <script> |
michael@0 | 17 | function startTest() { |
michael@0 | 18 | document.addEventListener("MozReftestInvalidate", doTest, false); |
michael@0 | 19 | setTimeout(doTest, 4000); // fallback for running outside reftest |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | function doTest() { |
michael@0 | 23 | document.getElementById("comp").setAttribute("color-interpolation-filters", "sRGB"); |
michael@0 | 24 | document.documentElement.removeAttribute('class'); |
michael@0 | 25 | } |
michael@0 | 26 | </script> |
michael@0 | 27 | </svg> |