OLD | NEW |
| 1 <!-- Based on compositing/overflow/scrolling-without-painting.html --> |
1 <!DOCTYPE html> | 2 <!DOCTYPE html> |
2 | 3 |
3 <!-- | 4 <!-- |
4 This test checks that accelerated scrolling layers can be scrolled without | 5 This test checks that accelerated scrolling layers can be scrolled without |
5 repainting their contents. See https://bugs.webkit.org/show_bug.cgi?id=96087. | 6 repainting their contents. See https://bugs.webkit.org/show_bug.cgi?id=96087. |
6 --> | 7 --> |
7 | 8 |
8 <html> | 9 <html> |
9 <head> | 10 <head> |
10 <style type="text/css"> | 11 <style type="text/css"> |
11 #scroller { | 12 #scroller { |
12 overflow: scroll; | 13 overflow: scroll; |
13 -webkit-overflow-scrolling: touch; | 14 -webkit-overflow-scrolling: touch; |
14 width: 200px; | 15 width: 200px; |
15 height: 200px; | 16 height: 200px; |
16 border: solid thin blue; | 17 border: solid thin blue; |
17 } | 18 } |
18 | 19 |
19 #content { | 20 #content { |
20 height: 1000px; | 21 height: 1000px; |
21 margin-top: 25px; | 22 margin-top: 25px; |
22 } | 23 } |
23 </style> | 24 </style> |
24 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 25 <script src="resources/paint-invalidation-test.js"></script> |
25 <script type="text/javascript"> | 26 <script type="text/javascript"> |
26 if (window.internals) | 27 if (window.internals) |
27 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); | 28 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
28 | 29 |
29 function repaintTest() { | 30 window.expectedPaintInvalidationObjects = [ |
| 31 ]; |
| 32 function paintInvalidationTest() { |
30 // Scroll down. This should not cause any more repaints to the | 33 // Scroll down. This should not cause any more repaints to the |
31 // scrolling contents. | 34 // scrolling contents. |
32 document.getElementById('scroller').scrollTop = 25; | 35 document.getElementById('scroller').scrollTop = 25; |
33 } | 36 } |
34 | 37 |
35 runRepaintTest(); | 38 runPaintInvalidationTest(); |
36 </script> | 39 </script> |
37 </head> | 40 </head> |
38 <body> | 41 <body> |
39 <div id="scroller"> | 42 <div id="scroller"> |
40 <div id="content"></div> | 43 <div id="content"></div> |
41 </div> | 44 </div> |
42 </body> | 45 </body> |
43 </html> | 46 </html> |
OLD | NEW |