OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <div id="multicol" style="position:relative; columns:2; column-fill:auto; line-h
eight:20px; orphans:1; widows:1; background:yellow;"> |
| 3 <div style="width:4em;"> |
| 4 <div style="height:20px; background:hotpink;"></div> |
| 5 <div style="height:15px;"> |
| 6 <div id="child1">line</div> |
| 7 <div id="child2">line</div> |
| 8 <div id="child3">line</div> |
| 9 <div id="child4">line</div> |
| 10 <div id="child5">line</div> |
| 11 </div> |
| 12 </div> |
| 13 </div> |
| 14 <script src="../resources/testharness.js"></script> |
| 15 <script src="../resources/testharnessreport.js"></script> |
| 16 <script> |
| 17 test(() => { |
| 18 var multicol = document.getElementById("multicol"); |
| 19 var child1 = document.getElementById("child1"); |
| 20 var child2 = document.getElementById("child2"); |
| 21 var child3 = document.getElementById("child3"); |
| 22 var child4 = document.getElementById("child4"); |
| 23 var child5 = document.getElementById("child5"); |
| 24 |
| 25 assert_equals(child1.offsetTop, 20); |
| 26 assert_equals(child2.offsetTop, 40); |
| 27 assert_equals(child3.offsetTop, 0); |
| 28 assert_equals(child4.offsetTop, 20); |
| 29 assert_equals(child5.offsetTop, 40); |
| 30 |
| 31 multicol.style.height = "90px"; |
| 32 assert_equals(child3.offsetTop, 60); |
| 33 assert_equals(child4.offsetTop, 0); |
| 34 assert_equals(child5.offsetTop, 20); |
| 35 |
| 36 multicol.style.height = "80px"; |
| 37 assert_equals(child3.offsetTop, 60); |
| 38 assert_equals(child4.offsetTop, 0); |
| 39 assert_equals(child5.offsetTop, 20); |
| 40 |
| 41 multicol.style.height = "110px"; |
| 42 assert_equals(child3.offsetTop, 60); |
| 43 assert_equals(child4.offsetTop, 80); |
| 44 assert_equals(child5.offsetTop, 0); |
| 45 |
| 46 multicol.style.height = "200px"; |
| 47 assert_equals(child3.offsetTop, 60); |
| 48 assert_equals(child4.offsetTop, 80); |
| 49 assert_equals(child5.offsetTop, 100); |
| 50 |
| 51 multicol.style.height = "100px"; |
| 52 assert_equals(child3.offsetTop, 60); |
| 53 assert_equals(child4.offsetTop, 80); |
| 54 assert_equals(child5.offsetTop, 0); |
| 55 |
| 56 }, "Overflow should also be fragmented."); |
| 57 </script> |
OLD | NEW |