| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | |
| 3 <script> | 2 <script> |
| 4 if (window.internals) | 3 onload = function() { |
| 5 internals.settings.setPreferCompositingToLCDTextEnabled(true); | |
| 6 function repaintTest() { | |
| 7 document.getElementById('content').style.backgroundColor = 'green'; | |
| 8 var container = document.getElementById('container'); | 4 var container = document.getElementById('container'); |
| 9 container.scrollLeft = 2000; | 5 container.scrollLeft = 2000; |
| 10 container.scrollTop = 2000; | 6 container.scrollTop = 2000; |
| 11 } | 7 } |
| 12 window.onload = runRepaintTest; | 8 window.onload = runRepaintTest; |
| 13 </script> | 9 </script> |
| 14 <style> | 10 <style> |
| 15 #container { | 11 #container { |
| 16 width: 500px; | 12 width: 500px; |
| 17 height: 500px; | 13 height: 500px; |
| 18 overflow: scroll; | 14 overflow: scroll; |
| 19 } | 15 } |
| 20 #content { | 16 #content { |
| 21 width: 5000px; | 17 width: 5000px; |
| 22 height: 5000px; | 18 height: 5000px; |
| 23 background-color: red; | 19 background-color: green; |
| 24 } | 20 } |
| 25 </style> | 21 </style> |
| 26 <div id="container"> | 22 <div id="container"> |
| 27 <div id="content"> | 23 <div id="content"> |
| 28 Tests invalidation of scrolling layer. Passes if the repaint rect is not clipp
ed, | 24 Tests invalidation of scrolling layer. Passes if the repaint rect is not clipp
ed, |
| 29 and there is no red when the scrolling container is scrolled.<br> | 25 and there is no red when the scrolling container is scrolled.<br> |
| 30 Note for manual testing: must run with --enable-prefer-compositing-to-lcd-text | 26 Note for manual testing: must run with --enable-prefer-compositing-to-lcd-text |
| 31 on non-high-dpi machines to enable composited scrolling. | 27 on non-high-dpi machines to enable composited scrolling. |
| 32 </div> | 28 </div> |
| 33 </div> | 29 </div> |
| OLD | NEW |