OLD | NEW |
1 <html style="-webkit-writing-mode:horizontal-tb"> | 1 <html style="-webkit-writing-mode:horizontal-tb"> |
2 <head> | 2 <head> |
3 <style> | 3 <style> |
4 div.box { -webkit-box-sizing: border; border: solid blue; } | 4 div.box { -webkit-box-sizing: border; border: solid blue; } |
5 div.shorter { width: 54px; } | 5 div.shorter { width: 54px; } |
6 div.taller { width: 72px; } | 6 div.taller { width: 72px; } |
7 </style> | 7 </style> |
8 </head> | 8 </head> |
9 <body style="-webkit-writing-mode:vertical-rl; width:800px;"> | 9 <body style="-webkit-writing-mode:vertical-rl; width:800px;"> |
10 <div style="width: 100px; height: 630px; -webkit-column-gap: 5px; -webkit-column
s: 6;"> | 10 <div style="width: 100px; height: 630px; -webkit-columns:6; -webkit-column-gap:5
px; columns:6; column-gap:5px; column-fill:auto;"> |
11 <div class="taller box"></div> | 11 <div class="taller box"></div> |
12 <div class="taller box"></div> | 12 <div class="taller box"></div> |
13 <div id="break-before" class="shorter box" style="-webkit-column-break-befor
e: always;"></div> | 13 <div id="break-before" class="shorter box" style="-webkit-column-break-befor
e: always;"></div> |
14 <div class="shorter box" style="-webkit-column-break-after: always;"></div> | 14 <div class="shorter box" style="-webkit-column-break-after: always;"></div> |
15 <div id="after-break" class="shorter box"></div> | 15 <div id="after-break" class="shorter box"></div> |
16 <div id="no-break" class="shorter box" style="-webkit-column-break-inside: a
void;"></div> | 16 <div id="no-break" class="shorter box" style="-webkit-column-break-inside: a
void;"></div> |
17 </div> | 17 </div> |
18 <pre id="console"></pre> | 18 <pre id="console"></pre> |
19 <script> | 19 <script> |
20 if (window.testRunner) | 20 if (window.testRunner) |
21 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
22 | 22 |
23 function log(message) | 23 function log(message) |
24 { | 24 { |
25 document.getElementById("console").appendChild(document.createTextNode(m
essage + "\n")); | 25 document.getElementById("console").appendChild(document.createTextNode(m
essage + "\n")); |
26 } | 26 } |
27 | 27 |
28 function testBoxPosition(id, expectedLeft, expectedTop) | 28 function testBoxPosition(id, expectedLeft, expectedTop) |
29 { | 29 { |
30 var rect = document.getElementById(id).getBoundingClientRect(); | 30 var rect = document.getElementById(id).getBoundingClientRect(); |
31 if (Math.round(rect.left) === expectedLeft && Math.round(rect.top) === e
xpectedTop) | 31 if (Math.round(rect.left) === expectedLeft && Math.round(rect.top) === e
xpectedTop) |
32 log("PASS: '" + id + "' is at (" + expectedLeft + ", " + expectedTop
+ ")"); | 32 log("PASS: '" + id + "' is at (" + expectedLeft + ", " + expectedTop
+ ")"); |
33 else | 33 else |
34 log("FAIL: '" + id + "' is at (" + Math.round(rect.left) + ", " + Ma
th.round(rect.top) + ") instead of (" + expectedLeft + " ," + expectedTop + ")")
; | 34 log("FAIL: '" + id + "' is at (" + Math.round(rect.left) + ", " + Ma
th.round(rect.top) + ") instead of (" + expectedLeft + " ," + expectedTop + ")")
; |
35 } | 35 } |
36 | 36 |
37 testBoxPosition("break-before", 748, 220); | 37 testBoxPosition("break-before", 748, 220); |
38 testBoxPosition("after-break", 748, 431); | 38 testBoxPosition("after-break", 748, 431); |
39 </script> | 39 </script> |
OLD | NEW |