OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <p>There should be a green square below. No red.</p> |
| 3 <div style="float:left; position:relative; background:red;"> |
| 4 <div id="abspos" style="position:absolute; top:0; right:0; bottom:0; left:0;
background:green;"></div> |
| 5 <div style="width:150px; max-height:150px; overflow:auto;"> |
| 6 <div id="child" style="width:100px; height:100px;"></div> |
| 7 </div> |
| 8 </div> |
| 9 <div style="clear:both;"></div> |
| 10 <script src="../../resources/testharness.js"></script> |
| 11 <script src="../../resources/testharnessreport.js"></script> |
| 12 <script> |
| 13 test(() => { |
| 14 var abspos = document.getElementById("abspos"); |
| 15 var child = document.getElementById("child"); |
| 16 assert_equals(abspos.offsetWidth, 150); |
| 17 assert_equals(abspos.offsetHeight, 100); |
| 18 document.body.offsetLeft; |
| 19 child.style.height = "400px"; |
| 20 assert_equals(abspos.offsetWidth, 150); |
| 21 assert_equals(abspos.offsetHeight, 150); |
| 22 }, "Add content to an overflow:auto container, so that scrollbars appear"); |
| 23 </script> |
OLD | NEW |