OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <style> |
| 3 body { |
| 4 margin: 0; |
| 5 } |
| 6 #container { |
| 7 position: absolute; |
| 8 height: 154px; |
| 9 width: 20px; |
| 10 background-color: blue; |
| 11 } |
| 12 #test { |
| 13 position: absolute; |
| 14 top: 0px; |
| 15 bottom: 0px; |
| 16 left: 0px; |
| 17 right: 0px; |
| 18 } |
| 19 .contents { |
| 20 background-color: green; |
| 21 height: 100%; |
| 22 width: 10px; |
| 23 } |
| 24 </style> |
| 25 <script src="../../../resources/check-layout.js"></script> |
| 26 <script> |
| 27 |
| 28 function runTest() |
| 29 { |
| 30 var test = document.getElementById('test'); |
| 31 document.body.offsetTop; |
| 32 test.style['top'] = '20px'; |
| 33 test.style['bottom'] = '20px'; |
| 34 window.checkLayout(".contents"); |
| 35 } |
| 36 window.onload = runTest; |
| 37 </script> |
| 38 <div id="container"> |
| 39 <div id="test"> |
| 40 <div class="contents" data-expected-height=114></div> |
| 41 </div> |
| 42 </div> |
| 43 Tests positioned movement layout when its height has changed and a descendant de
pends on its height. |
OLD | NEW |