OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/run-after-display.js"></script> |
| 3 <script> |
| 4 if (window.testRunner) |
| 5 testRunner.waitUntilDone(); |
| 6 |
| 7 window.onload = function() { |
| 8 // Wait for a frame, then mutate the filter. |
| 9 runAfterDisplay(function() { |
| 10 var pointLight = document.getElementById('light'); |
| 11 pointLight.setAttribute('x', '0.5'); |
| 12 pointLight.setAttribute('y', '0.5'); |
| 13 pointLight.setAttribute('z', '10'); |
| 14 // Change primitive units after having updated light position. |
| 15 document.querySelector('filter').setAttribute('primitiveUnits', 'objectBound
ingBox'); |
| 16 if (window.testRunner) |
| 17 runAfterDisplay(function() { testRunner.notifyDone(); }); |
| 18 }); |
| 19 }; |
| 20 </script> |
| 21 <svg> |
| 22 <filter id="f" x="0" y="0" width="1" height="1"> |
| 23 <feDiffuseLighting lighting-color="green"> |
| 24 <fePointLight id="light" x="0" y="0" z="-50"/> |
| 25 </feDiffuseLighting> |
| 26 </filter> |
| 27 <rect width="100" height="100" fill="red" filter="url(#f)"/> |
| 28 </svg> |
OLD | NEW |