| OLD | NEW |
| 1 <script src="resources/text-based-repaint.js" type="text/javascript"></script> | 1 <script src="resources/text-based-repaint.js" type="text/javascript"></script> |
| 2 <script type="text/javascript"> | 2 <script type="text/javascript"> |
| 3 function repaintTest() { | 3 function repaintTest() { |
| 4 document.execCommand("InsertParagraph"); | 4 document.execCommand("InsertParagraph"); |
| 5 } | 5 } |
| 6 </script> | 6 </script> |
| 7 <body onload="runRepaintAndPixelTest();"> | 7 <body onload="runRepaintAndPixelTest();"> |
| 8 <p>This tests for a repaint bug. The old caret position should be invalidated w
hen a paragraph separator is inserted.</p> | 8 <p>This tests for a repaint bug. The old caret position should be invalidated w
hen a paragraph separator is inserted.</p> |
| 9 <div contenteditable="true"> | 9 <div contenteditable="true"> |
| 10 <div><br></div> | 10 <div><br></div> |
| 11 <div id="div"><br></div> | 11 <div id="div"><br></div> |
| 12 </div> | 12 </div> |
| 13 <script> | 13 <script> |
| 14 var div = document.getElementById("div"); | 14 var div = document.getElementById("div"); |
| 15 var sel = window.getSelection(); | 15 var sel = window.getSelection(); |
| 16 | 16 div.parentNode.focus(); |
| 17 sel.collapse(div, 0); | 17 sel.collapse(div, 0); |
| 18 </script> | 18 </script> |
| 19 </body> | 19 </body> |
| OLD | NEW |