chromium/third_party/blink/manual_tests/css3-cursor-fallback-quirks.html

<html>
<head><title>Quirks custom cursor tests</title></head>
<body>
<p><a href="http://bugs.webkit.org/show_bug.cgi?id=8991">Bug .991</a>: REGRESSION: missing or broken CSS custom cursors are displayed as a missing image icon.</p>
<p>Move the cursor over the blue box - it should not turn into a missing image icon, and should turn into an I-beam over text.</p>

<div style="width:100px;height:50px;background-color:lightblue; cursor:url(nonexistent.png), auto;"><span style="cursor:url(nonexistent.png), auto;">some text</span></div>
<div style="width:100px;height:50px;background-color:lightblue; cursor:url(nonexistent.png);"></div>

<hr>
<p><a href="http://bugs.webkit.org/show_bug.cgi?id=6001">Bug 6001</a>: WebKit does not handle fallback custom cursors</p>
<p><a href="http://bugs.webkit.org/show_bug.cgi?id=9013">Bug 9013</a>: Let correct CSS custom cursor declarations parse</p>
<p>In each of the blue boxes below, the cursor should become a help cursor (question mark).</p>
<table><tr>
 <td><div style="width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff), text;"></div></td> <!-- Valid, no fallback needed -->
 <td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff);'></div></td> <!-- Invalid, but allowed by WinIE -->
 <td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(nonexistent.png), help;'></div></td>
 <td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(nonexistent.png), url(custom-cursors.html), url(unknown-scheme:custom-cursors.html), url(resources/helpCursor.tiff), text;'></div></td>
 <td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(nonexistent.png), url("resources/helpCursor.tiff"), text;'></div></td>
</tr>
</table>
<p>In each of the blue boxes below, the cursor should remain the default cursor, since all cursor definitions are invalid in quirks mode.</p>
<table><tr>
<td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff) 1 1 text;'></div></td> <!-- CSS3 hot spot - invalid, should have comma after hotspot coords -->
</tr>
</table>
<p>In each of the blue boxes below, the cursor should show the text cursor, since they contain invalid hotspots.</p>
<table><tr>
<td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff) 1, text;'></div></td> <!-- CSS3 hot spot - ignored in IE -->
 <td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff) 1 2 3, text;'></div></td> <!-- CSS3 hot spot - ignored in IE -->
</tr>
</table>

<p>In each of the blue boxes below, the cursor should show the help, since they contain valid hotspots.</p>
<table><tr>
<td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff) 1 2;'></div></td> <!-- CSS3 hot spot - ignored in IE -->
<td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff) 1 2, text;'></div></td> <!-- CSS3 hot spot - ignored in IE -->
</tr>
</table>

<p></p>
<p><span style='background-color:gray; cursor:url(nonexistent.png), url("resources/helpCursor.tiff");'>Should show an I-beam cursor.</span></p> <!-- An invalid declaration, even by WinIE standards -->
<p>The following testcases test inheritance of the cursor property. The first one should have the help cursor for both divs (normal inheritance). The second one should have help cursor for big div, text cursor for small div (inner div has cursor property, should not inherit). The next has invalid css syntax in the inner div, so it should inherit from the parent. The last two testcases have correct syntax and there is no inheritance in this case.</p>
<table>
<tr><td>
<div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff), text;'><div style="width:50px;height:50px;background-color:gray;"></div></div>
</td><td>
<div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff), text;'><div style="width:50px;height:50px;background-color:gray;cursor:text"></div></div>
</td><td>
<div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff), text;'><div style="width:50px;height:50px;background-color:gray;cursor:foobar"></div></div>
</td><td>
<div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff), text;'><div style="width:50px;height:50px;background-color:gray;cursor:url(resources/helpCursor.tiff) 1 2, text"></div></div>
</td><td>
<div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff), text;'><div style="width:50px;height:50px;background-color:gray;cursor:url(nonexistant.png), text"></div></div>
</td></tr>
</table>
<p>In each of the blue boxes below, the hotspot is out-of-range. In quirks mode we do not support hotspots at all, so we show the fallback cursor(text).</p>
<table><tr>
 <td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff) -1 -1, text;'></div></td> <!-- CSS3 hot spot out-of-range -->
 <td><div style='width:100px;height:100px;background-color:lightblue; cursor:url(resources/helpCursor.tiff) 100 100, text;'></div></td> <!-- CSS3 hot spot out-of-range -->
</tr>
</table>
</body>
</html>