| OLD | NEW |
| 1 <!doctype HTML> | 1 <!doctype HTML> |
| 2 <script src="resources/text-based-repaint.js"></script> | 2 <script src="resources/text-based-repaint.js"></script> |
| 3 <div contenteditable id="root" class="editing"></div> | 3 <div contenteditable id="root" class="editing"></div> |
| 4 <style> | 4 <style> |
| 5 * { | 5 * { |
| 6 font-family: Courier New; | 6 font-family: Courier New; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 <script> | 9 <script> |
| 10 onload = function() { | 10 onload = function() { |
| 11 // The innerText must be set explicitly, and not with an editing command. | 11 // The innerText must be set explicitly, and not with an editing command. |
| 12 root.innerText = "1"; | 12 root.innerText = "1"; |
| 13 root.focus(); |
| 13 window.getSelection().collapse(root.firstChild, 1); | 14 window.getSelection().collapse(root.firstChild, 1); |
| 14 | 15 |
| 15 runRepaintAndPixelTest(); | 16 runRepaintAndPixelTest(); |
| 16 }; | 17 }; |
| 17 | 18 |
| 18 function repaintTest() { | 19 function repaintTest() { |
| 19 document.execCommand('delete'); | 20 document.execCommand('delete'); |
| 20 } | 21 } |
| 21 </script> | 22 </script> |
| OLD | NEW |