OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <style> | |
5 body { font: 20px/1 monospace; margin: 20px; } | |
6 #region { -webkit-flow-from: undefined; width: 100px; height: 100px;
border: 10px solid blue; } | |
7 </style> | |
8 </head> | |
9 <body> | |
10 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=107752"> [C
SS Regions] Selecting text inside an empty region causes selection outside the r
egion area</a>.</p> | |
11 <p>The blue border box is a region without flowed content.</p> | |
12 <p>To test manually, move the mouse in the top left corner of the region
and try to select the region content.</p> | |
13 <p>You should not see any selected text: <span id="result"></span></p> | |
14 <div id="region"></div> | |
15 <script> | |
16 if (window.testRunner) { | |
17 window.testRunner.dumpAsText(); | |
18 var selection = window.getSelection(); | |
19 | |
20 var region = document.getElementById("region"); | |
21 var startPositionX = region.offsetLeft + 10; | |
22 var startPositionY = region.offsetTop + 10; | |
23 var endPositionX = startPositionX + 100; | |
24 var endPositionY = startPositionY + 100; | |
25 | |
26 eventSender.mouseMoveTo(startPositionX, startPositionY); | |
27 eventSender.mouseDown(); | |
28 eventSender.mouseMoveTo(endPositionX, endPositionY); | |
29 eventSender.mouseUp(); | |
30 | |
31 document.getElementById("result").innerHTML = (selection.toStrin
g().length == 0) ? "PASS" : "FAIL"; | |
32 } | |
33 </script> | |
34 </body> | |
35 </html> | |
OLD | NEW |