OLD | NEW |
---|---|
(Empty) | |
1 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3 .org/1999/xlink"> | |
2 <g> | |
3 <g> | |
4 <rect id="cursorWithXYOnSVGOnly" style="cursor:url(#cursorWithXY), a uto" x="50" y="50" width="100" height="100" fill="green" /> | |
5 <rect id="cursorWithXYOnSVGAndCSS" style="cursor:url(#cursorWithXY) 30 40, auto" x="200" y="50" width="100" height="100" fill="green" /> | |
6 <rect id="cursorWithXYInCSSOnly" style="cursor:url(#cursorWithNoXY) 30 40, auto" x="350" y="50" width="100" height="100" fill="green" /> | |
7 <rect id="cursorWithNoXY" style="cursor:url(#cursorWithNoXY), auto" x="500" y="50" width="100" height="100" fill="green" /> | |
8 <text id="result1" x="50" y="200">Not run.</text> | |
9 <text id="result2" x="50" y="220">Not run.</text> | |
10 <text id="result3" x="50" y="220">Not run.</text> | |
11 <text id="result4" x="50" y="220">Not run.</text> | |
12 </g> | |
13 </g> | |
14 <cursor id="cursorWithNoXY" xlink:href="file:///icon1.ico" /> | |
15 <cursor id="cursorWithXY" xlink:href="file:///icon1.ico" x="10" y="20" /> | |
16 <script> | |
17 // Setting the hotspot of a cursor element in CSS should override the ho tspot | |
18 // set in the SVG. However, if no SVG hotspot is specified, it should de fault | |
19 // to 0 0. | |
20 | |
21 if (window.testRunner) | |
22 testRunner.dumpAsText(); | |
23 | |
24 var cursorWithXYOnSVGOnly = document.getElementById("cursorWithXYOnSVGOn ly"); | |
25 var cursorWithXYOnSVGAndCSS = document.getElementById("cursorWithXYOnSVG AndCSS"); | |
26 var cursorWithXYInCSSOnly = document.getElementById("cursorWithXYInCSSOn ly"); | |
27 var cursorWithNoXY = document.getElementById("cursorWithNoXY"); | |
28 var result1 = document.getElementById("result1").firstChild; | |
29 var result2 = document.getElementById("result2").firstChild; | |
30 var result3 = document.getElementById("result3").firstChild; | |
31 var result4 = document.getElementById("result4").firstChild; | |
32 | |
33 if (getComputedStyle(cursorWithXYOnSVGOnly).cursor == "url(\"file:///ico n1.ico\") 10 20, auto") | |
Timothy Loh
2016/05/30 01:38:34
probably worthwhile to have a test or two where yo
sashab
2016/05/31 04:22:37
Oops lol I meant to be testing that the whole time
| |
34 result1.data = "PASS"; | |
35 else | |
36 result1.data = "FAIL - " + getComputedStyle(cursorWithXYOnSVGOnly).c ursor; | |
37 | |
38 if (getComputedStyle(cursorWithXYOnSVGAndCSS).cursor == "url(\"file:///i con1.ico\") 30 40, auto") | |
39 result2.data = "PASS"; | |
40 else | |
41 result2.data = "FAIL - " + getComputedStyle(cursorWithXYOnSVGAndCSS) .cursor; | |
42 | |
43 if (getComputedStyle(cursorWithXYInCSSOnly).cursor == "url(\"file:///ico n1.ico\") 30 40, auto") | |
44 result3.data = "PASS"; | |
45 else | |
46 result3.data = "FAIL - " + getComputedStyle(cursorWithXYInCSSOnly).c ursor; | |
47 | |
48 if (getComputedStyle(cursorWithNoXY).cursor == "url(\"file:///icon1.ico\ ") 0 0, auto") | |
49 result4.data = "PASS"; | |
50 else | |
51 result4.data = "FAIL - " + getComputedStyle(cursorWithNoXY).cursor; | |
52 </script> | |
53 </svg> | |
OLD | NEW |