| OLD | NEW |
| (Empty) |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../resources/helper.js"></script> | |
| 5 <style> | |
| 6 body { font: 20px/1 monospace; margin: 20px; } | |
| 7 #region { -webkit-flow-from: undefined; width: 100px; height: 100px;
border: 10px solid blue; } | |
| 8 </style> | |
| 9 </head> | |
| 10 <body> | |
| 11 <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> | |
| 12 <p>The blue border box is a region without flowed content.</p> | |
| 13 <p>To test manually, move the mouse in the top left corner of the region
and try to select the region content.</p> | |
| 14 <p>You should not see any selected text: <span id="result"></span></p> | |
| 15 <div id="region"></div> | |
| 16 <script> | |
| 17 if (window.testRunner) { | |
| 18 window.testRunner.dumpAsText(); | |
| 19 var selection = window.getSelection(); | |
| 20 | |
| 21 var region = document.getElementById("region"); | |
| 22 var startPositionX = region.offsetLeft + 10; | |
| 23 var startPositionY = region.offsetTop + 10; | |
| 24 var endPositionX = startPositionX + 100; | |
| 25 var endPositionY = startPositionY + 100; | |
| 26 | |
| 27 selectContentByRange(startPositionX, startPositionY, endPosition
X, endPositionY); | |
| 28 | |
| 29 document.getElementById("result").innerHTML = (selection.toStrin
g().length == 0) ? "PASS" : "FAIL"; | |
| 30 } | |
| 31 </script> | |
| 32 </body> | |
| 33 </html> | |
| OLD | NEW |