OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/check-layout.js"></script> |
| 3 <p>Change from position:static to position:absolute when the parent is a shrink-
to-fit container. |
| 4 The parent needs to recalculate its intrinsic size when this happens.</p> |
| 5 <p>There should be a black <em>square</em> below.</p> |
| 6 <div id="container" style="float:left; border:20px solid black;" data-expected-w
idth="40" data-expected-height="40"> |
| 7 <div id="test" style="width:100px; height:100px;"></div> |
| 8 </div> |
| 9 <p id="result" style="clear:both;"></p> |
| 10 <script> |
| 11 var test = document.getElementById("test"); |
| 12 test.offsetTop; |
| 13 test.style.position = "absolute"; |
| 14 checkLayout("#container", document.getElementById("result")); |
| 15 </script> |
OLD | NEW |