Chromium Code Reviews| 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 <script> | 3 <script> |
| 4 if (window.internals) | 4 if (window.internals) { |
| 5 internals.settings.setPreferCompositingToLCDTextEnabled(true); | 5 internals.settings.setPreferCompositingToLCDTextEnabled(true); |
| 6 // It's too slow to check under-invalidation. | |
| 7 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = false; | |
| 8 } | |
| 6 function repaintTest() { | 9 function repaintTest() { |
| 7 document.getElementById('content').style.backgroundColor = 'green'; | 10 document.getElementById('content').style.backgroundColor = 'green'; |
| 8 var container = document.getElementById('container'); | 11 var container = document.getElementById('container'); |
| 9 container.scrollLeft = 2000; | 12 container.scrollLeft = 2000; |
| 10 container.scrollTop = 2000; | 13 container.scrollTop = 2000; |
| 11 } | 14 } |
| 12 window.onload = runRepaintAndPixelTest; | 15 window.onload = runRepaintAndPixelTest; |
| 13 </script> | 16 </script> |
| 14 <style> | 17 <style> |
| 15 #container { | 18 #container { |
| 16 width: 500px; | 19 width: 500px; |
| 17 height: 500px; | 20 height: 500px; |
| 18 overflow: scroll; | 21 overflow: scroll; |
| 19 } | 22 } |
| 20 #content { | 23 #content { |
| 21 width: 5000px; | 24 width: 5000px; |
|
chrishtr
2016/11/01 23:25:06
I'd prefer you just reduce the sizes of the elemen
Xianzhu
2016/11/01 23:56:41
Done.
| |
| 22 height: 5000px; | 25 height: 5000px; |
| 23 background-color: red; | 26 background-color: red; |
| 24 } | 27 } |
| 25 </style> | 28 </style> |
| 26 <div id="container"> | 29 <div id="container"> |
| 27 <div id="content"> | 30 <div id="content"> |
| 28 Tests invalidation of scrolling layer. Passes if the repaint rect is not clipp ed, | 31 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> | 32 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 | 33 Note for manual testing: must run with --enable-prefer-compositing-to-lcd-text |
| 31 on non-high-dpi machines to enable composited scrolling. | 34 on non-high-dpi machines to enable composited scrolling. |
| 32 </div> | 35 </div> |
| 33 </div> | 36 </div> |
| OLD | NEW |