| OLD | NEW |
| 1 <!-- Based on fast/repaint/percent-size-image-resize-container.html --> |
| 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 if (window.testRunner) |
| 6 testRunner.dumpAsText(); |
| 7 |
| 8 window.expectedPaintInvalidationObjects = [ |
| 9 "LayoutBlockFlow (positioned) DIV", |
| 10 "LayoutImage (positioned) IMG", |
| 11 ]; |
| 12 function paintInvalidationTest() { |
| 5 var div = document.getElementsByTagName('div')[0]; | 13 var div = document.getElementsByTagName('div')[0]; |
| 6 div.style.width = '100px'; | 14 div.style.width = '100px'; |
| 7 div.style.height = '200px'; | 15 div.style.height = '200px'; |
| 8 } | 16 } |
| 9 onload = runRepaintTest; | 17 onload = runPaintInvalidationTest; |
| 10 </script> | 18 </script> |
| 11 <style> | 19 <style> |
| 12 div { | 20 div { |
| 13 position: absolute; | 21 position: absolute; |
| 14 top: 50px; | 22 top: 50px; |
| 15 left: 0px; | 23 left: 0px; |
| 16 width: 150px; | 24 width: 150px; |
| 17 height: 150px; | 25 height: 150px; |
| 18 } | 26 } |
| 19 img { | 27 img { |
| 20 position: absolute; | 28 position: absolute; |
| 21 width: 100%; | 29 width: 100%; |
| 22 height: 100%; | 30 height: 100%; |
| 23 } | 31 } |
| 24 </style> | 32 </style> |
| 25 The percent-sized image should be fully repainted on container's resize. Passes
if there is a whole apple after resize. | 33 The percent-sized image should be fully repainted on container's resize. Passes
if there is a whole apple after resize. |
| 26 <div> | 34 <div> |
| 27 <img src="resources/apple.jpg"> | 35 <img src="../../../fast/repaint/resources/apple.jpg"> |
| 28 </div> | 36 </div> |
| OLD | NEW |