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 assert_equals(rect.left, -12); | |
15 assert_equals(rect.top, -17); | |
16 assert_equals(rect.right, 3988); | |
eae
2017/03/18 20:23:25
A comment explaining the values would be helpful.
mstensho (USE GERRIT)
2017/03/20 09:38:22
Done.
Also switched to using width/height instead
| |
17 assert_equals(rect.bottom, 23); | |
18 }, "getClientRects should include overflow"); | |
19 </script> | |
OLD | NEW |