blob: 606be6c13b0f27e92bb61aaea6ba985bcc15fe4f [file] [log] [blame]
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<clipPath id="myclip" clipPathUnits="userSpaceOnUse">
<path transform="scale(.5)" d="M 0 0 l 200 0 l 0 200 l -200 0 Z"/>
</clipPath>
</defs>
<script>
if (window.layoutTestController)
layoutTestController.waitUntilDone();
window.setTimeout("clickNow()", 0);
function clickNow() {
if (window.eventSender) {
eventSender.mouseMoveTo(150, 50);
eventSender.mouseDown();
eventSender.mouseUp();
}
if (window.layoutTestController) {
layoutTestController.notifyDone();
}
}
function mouseHandler(evt)
{
document.getElementsByTagName("g")[0].setAttribute("clip-path", "url(#myclip)");
}
</script>
<g onclick="mouseHandler()" clip-path="url(#noclip)">
<rect x="0" y="0" width="200" height="200" fill="red"/>
<rect x="0" y="0" width="100" height="100" fill="green"/>
</g>
</svg>