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