| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/ahem.js"></script> | 2 <script src="../../resources/ahem.js"></script> |
| 3 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 3 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
| 4 <script src="resources/selection.js"></script> |
| 4 <script> | 5 <script> |
| 5 // Selects two lines and expects a newline to be represented. | 6 // Selects two lines and expects a newline to be represented. |
| 6 function repaintTest() { | 7 function repaintTest() { |
| 7 if (window.internals) | 8 selectRange(container, 0, container, 1); |
| 8 window.internals.setSelectionPaintingWithoutSelectionGapsEnabled(true); | |
| 9 var range = document.createRange(); | |
| 10 range.setStart(container, 0); | |
| 11 range.setEnd(container, 1); | |
| 12 window.getSelection().addRange(range); | |
| 13 }; | 9 }; |
| 14 window.onload = runRepaintTest; | 10 window.onload = runRepaintTest; |
| 15 </script> | 11 </script> |
| 16 <style> | 12 <style> |
| 17 div { | 13 div { |
| 18 font-family: Ahem; | 14 font-family: Ahem; |
| 19 width: 2em; | 15 width: 2em; |
| 20 } | 16 } |
| 21 </style> | 17 </style> |
| 22 <div id="container"> | 18 <div id="container"> |
| 23 xx y | 19 xx y |
| 24 </div> | 20 </div> |
| OLD | NEW |