blob: 5b1e36d1da07118f977c93b370e7937508f4475c [file] [log] [blame]
<?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.testRunner)
window.testRunner.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.testRunner)
testRunner.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>