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 position: absolute; |
| 21 background-color: green; |
| 22 top: 0px; |
| 23 bottom: 0px; |
| 24 left: 0px; |
| 25 right: 0px; |
| 26 } |
| 27 </style> |
| 28 <script src="../../../resources/check-layout.js"></script> |
| 29 <script> |
| 30 |
| 31 function runTest() |
| 32 { |
| 33 var test = document.getElementById('test'); |
| 34 document.body.offsetTop; |
| 35 test.style['top'] = '20px'; |
| 36 test.style['bottom'] = '20px'; |
| 37 window.checkLayout(".contents"); |
| 38 } |
| 39 window.onload = runTest; |
| 40 </script> |
| 41 <div id="container"> |
| 42 <div id="test"> |
| 43 <div class="contents" data-expected-height=114></div> |
| 44 </div> |
| 45 </div> |
| 46 Tests positioned movement layout when its height has changed and a descendant de
pends on its height. |
OLD | NEW |