OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style>body { margin:8px; }</style> |
| 3 <div style="columns:1; width:10px; height:200px; column-fill:auto;"> |
| 4 <div id="elm" style="margin-left:-20px; margin-top:-25px; width:4000px; heig
ht:40px;"></div> |
| 5 </div> |
| 6 <script src="../../resources/testharness.js"></script> |
| 7 <script src="../../resources/testharnessreport.js"></script> |
| 8 <script> |
| 9 test(() => { |
| 10 var elm = document.getElementById("elm"); |
| 11 var rects = elm.getClientRects(); |
| 12 assert_equals(rects.length, 1); |
| 13 var rect = rects[0]; |
| 14 // #elm is offset -20px,-25px relatively to its multicol container, due |
| 15 // to negative margins. BODY is offset 8px,8px due to its margin. So the |
| 16 // absolute offset will be (-20px+8px),(-25px+8px) = -12px,-17px. The |
| 17 // width and height will be the unclipped bounding box of #elm. |
| 18 assert_equals(rect.left, -12); |
| 19 assert_equals(rect.top, -17); |
| 20 assert_equals(rect.width, 4000); |
| 21 assert_equals(rect.height, 40); |
| 22 }, "getClientRects should include overflow"); |
| 23 </script> |
OLD | NEW |