OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 #parent { |
| 4 height: 100px; |
| 5 } |
| 6 #container { |
| 7 display: inline-block; |
| 8 height: 100%; |
| 9 } |
| 10 img { |
| 11 display: block; |
| 12 min-height: 100%; |
| 13 width: auto; |
| 14 height: auto; |
| 15 } |
| 16 </style> |
| 17 |
| 18 <p> |
| 19 Tests that resizing inline-block container element |
| 20 when img with width: auto and height: auto resizes |
| 21 </p> |
| 22 |
| 23 <div style="height:100px"> |
| 24 <div id="parent"> |
| 25 <div id="container" data-expected-width="25" data-expected-height="50"> |
| 26 <img src='data:image/svg+xml;utf8,<svg height="2px" width="1px" xmlns="htt
p://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1
"></svg>'></img> |
| 27 </div> |
| 28 </div> |
| 29 </div> |
| 30 |
| 31 <script src="../../resources/check-layout.js"></script> |
| 32 |
| 33 <script> |
| 34 function runTest() { |
| 35 document.body.offsetTop; |
| 36 var parent = document.getElementById('parent'); |
| 37 parent.style.height = "50px"; |
| 38 document.body.offsetTop; |
| 39 checkLayout("#container"); |
| 40 } |
| 41 window.onload = runTest; |
| 42 </script> |
OLD | NEW |