Add new renderer for SVGRectElement.
[WebKit.git] / LayoutTests / svg / custom / pointer-events-on-rounded-rect.xhtml
1 <html xmlns='http://www.w3.org/1999/xhtml'>
2 <body style="margin: 0px; padding: 0px">
3
4 <svg xmlns="http://www.w3.org/2000/svg" style="position:absolute;">
5 <defs>
6
7 <style type="text/css"><![CDATA[
8 rect#roundedRect {
9     fill: none;
10     stroke: green;
11     stroke-width: 20px;
12     stroke-linejoin: bevel;
13 }
14 rect:hover {
15     stroke: red;
16 }
17 ]]></style>
18 </defs>
19
20 <rect id="fallback" x="30" y="30" width="420" height="320" fill="yellow" onclick="passed()"/>
21 <rect id="roundedRect" x="40" y="40" rx="30" ry="30" width="400" height="300" pointer-events="visibleStroke" onclick="failed()"/>
22 <text id="text" x="30" y="370"></text>
23
24 <script type="text/ecmascript">
25     <![CDATA[
26
27 var fallback = document.getElementById("fallback");
28 var roundedRect = document.getElementById("roundedRect");
29 var text = document.getElementById("text");
30
31     fallback.addEventListener("mousedown", passed, false);
32     roundedRect.addEventListener("mousedown", failed, false);
33
34 function stop() {
35     fallback.removeEventListener("mousedown", failed, false);
36     roundedRect.removeEventListener("mousedown", passed, false);
37
38     if (window.layoutTestController)
39     layoutTestController.notifyDone();
40 }
41
42 function failed() {
43     text.textContent = 'FAILED: strokeRect had pointer';
44     stop();
45 }
46
47 function passed() {
48    text.textContent = 'PASSED: fallbackRect had pointer';
49    stop();
50 }
51
52 if (window.layoutTestController) {
53    layoutTestController.waitUntilDone();
54    layoutTestController.dumpAsText();
55 }
56
57 if (window.eventSender) {
58     eventSender.mouseMoveTo(31, 31);
59     eventSender.mouseDown();
60 }
61 ]]>
62 </script>
63
64 </svg>
65 </body>
66 </html>