OLD | NEW |
| 1 <!-- Based on fast/repaint/padding-border-keeping-border-box-and-content-box.htm
l --> |
1 <!DOCTYPE HTML> | 2 <!DOCTYPE HTML> |
2 <script src="resources/text-based-repaint.js"></script> | 3 <script src="resources/paint-invalidation-test.js"></script> |
3 <script> | 4 <script> |
4 function repaintTest() | 5 window.expectedPaintInvalidationObjects = [ |
| 6 "LayoutBlockFlow (positioned) DIV id='target'", |
| 7 ]; |
| 8 function paintInvalidationTest() |
5 { | 9 { |
6 // Though neither border box nor content box changes, should full repaint | 10 // Though neither border box nor content box changes, should full repaint |
7 // because the border width changes. | 11 // because the border width changes. |
8 var target = document.getElementById('target'); | 12 var target = document.getElementById('target'); |
9 target.style.padding = '20px'; | 13 target.style.padding = '20px'; |
10 target.style.borderWidth = '20px'; | 14 target.style.borderWidth = '20px'; |
11 } | 15 } |
12 window.onload = runRepaintTest; | 16 window.onload = runPaintInvalidationTest; |
13 </script> | 17 </script> |
14 <style> | 18 <style> |
15 body { | 19 body { |
16 margin: 0; | 20 margin: 0; |
17 } | 21 } |
18 div { | 22 div { |
19 width: 100px; | 23 width: 100px; |
20 height: 100px; | 24 height: 100px; |
21 padding: 40px; | 25 padding: 40px; |
22 position: absolute; | 26 position: absolute; |
23 background-color: green; | 27 background-color: green; |
24 border-color: blue; | 28 border-color: blue; |
25 border-style: solid; | 29 border-style: solid; |
26 border-width: 0; | 30 border-width: 0; |
27 } | 31 } |
28 </style> | 32 </style> |
29 <div id="target"></div> | 33 <div id="target"></div> |
OLD | NEW |