OLD | NEW |
1 <!-- Based on fast/repaint/padding-keeping-visual-size.html --> | 1 <!-- Based on fast/repaint/padding-keeping-visual-size.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 "LayoutBlockFlow (positioned) DIV id='target2' class='outer'", | |
7 "LayoutBlockFlow DIV class='inner'", | |
8 ]; | |
9 function paintInvalidationTest() | 5 function paintInvalidationTest() |
10 { | 6 { |
11 // No visual change. Optimally, there should be no repaint. | 7 // No visual change. Optimally, there should be no repaint. |
12 var target1 = document.getElementById('target1'); | 8 var target1 = document.getElementById('target1'); |
13 target1.style.padding = '20px'; | 9 target1.style.padding = '20px'; |
14 target1.style.width = '60px'; | 10 target1.style.width = '60px'; |
15 target1.style.height = '60px'; | 11 target1.style.height = '60px'; |
16 | 12 |
17 // Content will shrink. Should repaint at least the content. | 13 // Content will shrink. Should repaint at least the content. |
18 var target2 = document.getElementById('target2'); | 14 var target2 = document.getElementById('target2'); |
(...skipping 17 matching lines...) Expand all Loading... |
36 top: 200px; | 32 top: 200px; |
37 } | 33 } |
38 .inner { | 34 .inner { |
39 width: 100%; | 35 width: 100%; |
40 height: 100%; | 36 height: 100%; |
41 background-color: yellow; | 37 background-color: yellow; |
42 } | 38 } |
43 </style> | 39 </style> |
44 <div id="target1" class="outer"></div> | 40 <div id="target1" class="outer"></div> |
45 <div id="target2" class="outer"><div class="inner"></div></div> | 41 <div id="target2" class="outer"><div class="inner"></div></div> |
OLD | NEW |