| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd"> |
| <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" onload="pageLoaded()"> |
| <script> |
| if (window.layoutTestController) |
| window.layoutTestController.waitUntilDone(); |
| |
| function myfunc() { |
| var myRect = document.getElementById("rect"); |
| myRect.setAttributeNS(null, 'fill', "url(#gradient1)"); |
| var myStop = document.getElementById("OF"); |
| myStop.setAttributeNS(null, 'stop-color', 'green'); |
| if (window.layoutTestController) |
| layoutTestController.notifyDone(); |
| } |
| |
| function clickNow() { |
| if (window.eventSender) { |
| eventSender.mouseMoveTo(20, 10); |
| eventSender.mouseDown(); |
| eventSender.mouseUp(); |
| } |
| } |
| |
| function pageLoaded() { |
| if (window.eventSender) |
| clickNow(); |
| else |
| myfunc(); |
| } |
| </script> |
| <defs> |
| <radialGradient id="gradient1" cx="45%" cy="48%" r="200" fx="50%" fy="52%" spreadMethod="reflect" gradientUnits="userSpaceOnUse"> |
| <stop offset="0.0" stop-color="green"/> |
| <stop id="OF" offset="1" stop-color="red"/> |
| </radialGradient> |
| </defs> |
| <rect id="rect" x="0" y="0" width="100" height="100" fill="red" onclick="myfunc()"/> |
| </svg> |
| |