OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 body |
| 4 { |
| 5 margin: 0; |
| 6 padding: 0; |
| 7 } |
| 8 .div |
| 9 { |
| 10 width: 100px; |
| 11 height: 50px; |
| 12 } |
| 13 #float |
| 14 { |
| 15 float: left; |
| 16 } |
| 17 #inline |
| 18 { |
| 19 display: inline-block; |
| 20 background-color:green; |
| 21 } |
| 22 #positioned |
| 23 { |
| 24 position: absolute; |
| 25 background-color: red; |
| 26 z-index: -1; |
| 27 } |
| 28 </style> |
| 29 <div id="positioned" class="div"></div> |
| 30 <div id="float" class="div"></div> |
| 31 <div id="test"> |
| 32 <div id="inline" class="div"></div> |
| 33 </div> |
| 34 <script src="../../../resources/testharness.js"></script> |
| 35 <script src="../../../resources/testharnessreport.js"></script> |
| 36 <script> |
| 37 document.body.offsetTop; |
| 38 float.style["margin-top"] = "-50px"; |
| 39 test(() => { |
| 40 assert_equals(document.getElementById("inline").offsetLeft, 0); |
| 41 }, "crbug.com/711938: Sibling elements notice when a float no longer overlap
s due to margin top changing."); |
| 42 </script> |
OLD | NEW |