OLD | NEW |
1 <!-- Based on compositing/overflow/updating-scrolling-container-and-content.html
--> | 1 <!-- Based on compositing/overflow/updating-scrolling-container-and-content.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 window.expectedPaintInvalidationObjects = [ | |
6 "LayoutText #text", | |
7 "InlineTextBox 'CONTENT'", | |
8 "LayoutText #text", | |
9 "InlineTextBox 'CONTENT'", | |
10 "LayoutText #text", | |
11 "InlineTextBox 'CONTENT'", | |
12 "LayoutText #text", | |
13 "InlineTextBox 'CONTENT'", | |
14 "LayoutText #text", | |
15 "InlineTextBox 'CONTENT'", | |
16 "LayoutText #text", | |
17 "InlineTextBox 'CONTENT'", | |
18 "LayoutText #text", | |
19 "InlineTextBox 'CONTENT'", | |
20 "LayoutText #text", | |
21 "InlineTextBox 'CONTENT'", | |
22 "LayoutText #text", | |
23 "InlineTextBox 'CONTENT'", | |
24 "LayoutText #text", | |
25 "InlineTextBox 'CONTENT'", | |
26 "LayoutText #text", | |
27 "InlineTextBox 'CONTENT'", | |
28 "LayoutText #text", | |
29 "InlineTextBox 'CONTENT'", | |
30 "LayoutText #text", | |
31 "InlineTextBox 'CONTENT'", | |
32 ]; | |
33 function paintInvalidationTest() { | 5 function paintInvalidationTest() { |
34 document.getElementById('container').style.color = "green"; | 6 document.getElementById('container').style.color = "green"; |
35 } | 7 } |
36 onload = function() { | 8 onload = function() { |
37 document.getElementById('container').scrollTop = 50; | 9 document.getElementById('container').scrollTop = 50; |
38 runPaintInvalidationTest(); | 10 runPaintInvalidationTest(); |
39 }; | 11 }; |
40 </script> | 12 </script> |
41 <style> | 13 <style> |
42 #container { | 14 #container { |
43 overflow: scroll; | 15 overflow: scroll; |
44 width: 200px; | 16 width: 200px; |
45 height: 200px; | 17 height: 200px; |
46 } | 18 } |
47 </style> | 19 </style> |
48 <div style="height: 100px"> | 20 <div style="height: 100px"> |
49 Tests invalidation of scrolling container and contents on change of style which
affects also the contents. | 21 Tests invalidation of scrolling container and contents on change of style which
affects also the contents. |
50 Passes if the content text is green, and the whole content layer (if composited
scrolling) is invalidated. | 22 Passes if the content text is green, and the whole content layer (if composited
scrolling) is invalidated. |
51 </div> | 23 </div> |
52 <div id="container"> | 24 <div id="container"> |
53 CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>C
ONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT | 25 CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>C
ONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT<br>CONTENT |
54 </div> | 26 </div> |
OLD | NEW |