| <!-- Based on fast/repaint/box-sizing-padding-keeping-size.html --> |
| <!DOCTYPE HTML> |
| <script src="resources/paint-invalidation-test.js"></script> |
| <script> |
| function paintInvalidationTest() |
| { |
| document.getElementById('target1').className = 'content-box'; |
| document.getElementById('target2').className = 'border-box'; |
| } |
| window.onload = runPaintInvalidationTest; |
| </script> |
| <style> |
| body { |
| margin: 0; |
| } |
| div { |
| position: absolute; |
| background-color: green; |
| } |
| .border-box { |
| width: 100px; |
| height: 100px; |
| box-sizing: border-box; |
| } |
| .content-box { |
| width: 60px; |
| height: 60px; |
| box-sizing: content-box; |
| padding: 20px; |
| } |
| </style> |
| <div id="target1" class="border-box" style="top: 0px"></div> |
| <div id="target2" class="content-box" style="top: 200px"></div> |