| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 #container { |
| 4 background-color: lime; |
| 5 } |
| 6 |
| 7 img, canvas { |
| 8 max-height: 100%; |
| 9 } |
| 10 </style> |
| 11 |
| 12 <p> |
| 13 Tests that a replaced child with percentage max-height should keep the aspect |
| 14 ratio when the size of its container changes. |
| 15 </p> |
| 16 |
| 17 <div id="container"> |
| 18 <img src="resources/square-blue-100x100.png" data-expected-width="50" |
| 19 data-expected-height="50"> |
| 20 <canvas width="400" height="400" data-expected-width="50" |
| 21 data-expected-height="50"></canvas> |
| 22 </div> |
| 23 |
| 24 <script src="../../resources/check-layout.js"></script> |
| 25 |
| 26 <script> |
| 27 function runTest() { |
| 28 document.body.offsetTop; |
| 29 var container = document.getElementById('container'); |
| 30 container.style.height = "50px"; |
| 31 document.body.offsetTop; |
| 32 checkLayout("#container"); |
| 33 } |
| 34 window.onload = runTest; |
| 35 </script> |
| OLD | NEW |