inline-with-float-003.html (1529B)
1 <!DOCTYPE html> 2 <link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org"> 3 <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1113185"> 4 <style> 5 .ib { 6 display: inline-block; 7 width: 100%; 8 vertical-align: top; 9 } 10 body { margin: 0; } 11 </style> 12 <div style="columns:5; gap:0; column-fill:auto; width:100px; height:100px; orphans:1; widows:1;"> 13 <div style="height:170px;"></div> 14 <span style="position:relative;"> 15 <div id="ib1" class="ib" style="height:30px;"></div> 16 <div id="ib2" class="ib" style="height:20px;"></div> 17 <div id="floater" style="position:relative; float:left; width:100%; height:200px;"></div> 18 <div id="ib3" class="ib" style="height:80px;"></div> 19 </span> 20 </div> 21 <script src="/resources/testharness.js"></script> 22 <script src="/resources/testharnessreport.js"></script> 23 <script> 24 test(()=> { 25 assert_equals(document.elementFromPoint(20, 70), ib1); 26 }, "Hit first inline-block"); 27 test(()=> { 28 assert_equals(document.elementFromPoint(40, 0), ib2); 29 }, "Hit second inline-block"); 30 test(()=> { 31 assert_equals(document.elementFromPoint(40, 20), floater); 32 }, "Hit first float fragment"); 33 test(()=> { 34 assert_equals(document.elementFromPoint(60, 0), floater); 35 }, "Hit second float fragment"); 36 test(()=> { 37 assert_equals(document.elementFromPoint(80, 0), floater); 38 }, "Hit third float fragment"); 39 test(()=> { 40 assert_equals(document.elementFromPoint(80, 20), ib3); 41 }, "Hit third inline-block"); 42 </script>