OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <link href="resources/flexbox.css" rel="stylesheet"> | 2 <link href="resources/flexbox.css" rel="stylesheet"> |
3 <script src="../../resources/testharness.js"></script> | 3 <script src="../../resources/testharness.js"></script> |
4 <script src="../../resources/testharnessreport.js"></script> | 4 <script src="../../resources/testharnessreport.js"></script> |
5 <script src="../../resources/check-layout-th.js"></script> | 5 <script src="../../resources/check-layout-th.js"></script> |
6 <body onload="checkLayout('.flexbox')"> | 6 <style> |
7 <div id=log></div> | 7 #container { |
| 8 height: 300px; |
| 9 outline: 2px solid black; |
| 10 } |
8 | 11 |
9 <!-- This isn't "correct" per the spec, but it is an interim fix | 12 .inner |
10 to avoid bad results. | 13 { |
11 See https://crbug.com/580196 | 14 width: 400px; |
12 --> | 15 flex: 1; |
13 <div class="flexbox column" style="height: 0px;" data-expected-height="0"> | 16 background-color: green; |
14 <div data-expected-height="0" style="display: flex;">Some text</div> | 17 } |
| 18 </style> |
| 19 <script> |
| 20 function change() { |
| 21 var container = document.getElementById('container'); |
| 22 container.offsetHeight; |
| 23 container.style.height = '80px'; |
| 24 checkLayout('#container'); |
| 25 } |
| 26 </script> |
| 27 <body onload="change()"> |
| 28 <p>Green rectangle should be entirely within the black rectangle</p> |
| 29 <div id="log"></div> |
| 30 <div id="container"> |
| 31 <div class="flexbox column" style="height: 100%;"> |
| 32 <div class="flexbox flex-one"> |
| 33 <div class="flexbox column"> |
| 34 <div class="flexbox column flex-one"> |
| 35 <div class="inner" data-expected-height="80"> |
| 36 </div> |
| 37 </div> |
| 38 </div> |
| 39 </div> |
| 40 </div> |
15 </div> | 41 </div> |
OLD | NEW |