| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 ::selection { background-color: red; } | 5 ::selection { background-color: red; } |
| 6 pre { | 6 pre { |
| 7 font-size: 110%; | 7 font-size: 110%; |
| 8 } | 8 } |
| 9 body { | 9 body { |
| 10 font: 82% arial,sans-serif; | 10 font: 82% arial,sans-serif; |
| 11 } | 11 } |
| 12 </style> | 12 </style> |
| 13 <script src="../../repaint/resources/repaint.js" type="text/javascript"></script
> | 13 <script src="../../../resources/run-after-display.js" type="text/javascript"></s
cript> |
| 14 <script> | 14 <script> |
| 15 if (window.testRunner) { |
| 16 testRunner.waitUntilDone(); |
| 17 testRunner.dumpAsTextWithPixelResults(); |
| 18 } |
| 15 function repaintTest() { | 19 function repaintTest() { |
| 16 » window.getSelection().removeAllRanges(); | 20 window.getSelection().removeAllRanges(); |
| 21 if (window.testRunner) |
| 22 testRunner.notifyDone(); |
| 17 } | 23 } |
| 18 </script> | 24 </script> |
| 19 </head> | 25 </head> |
| 20 <body onload="runRepaintTest()"> | 26 <body onload="runAfterDisplay(repaintTest)"> |
| 21 <table style="position: absolute; top: 1.5px;"> | 27 <table style="position: absolute; top: 1.5px;"> |
| 22 <tr> | 28 <tr> |
| 23 » <td> | 29 <td> |
| 24 <pre id="pre">There should be no selection artifacts below. | 30 <pre id="pre">There should be no selection artifacts below. |
| 25 </pre> | 31 </pre> |
| 26 </td> | 32 </td> |
| 27 </tr> | 33 </tr> |
| 28 </table> | 34 </table> |
| 29 <script type="text/javascript"> | 35 <script type="text/javascript"> |
| 30 var text = document.getElementById("pre").firstChild; | 36 var text = document.getElementById("pre").firstChild; |
| 31 window.getSelection().setBaseAndExtent(text, 0, text, text.length); | 37 window.getSelection().setBaseAndExtent(text, 0, text, text.length); |
| 32 document.body.offsetTop; | 38 document.body.offsetTop; |
| 33 </script> | 39 </script> |
| 34 </body> | 40 </body> |
| OLD | NEW |