Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: LayoutTests/fast/multicol/vertical-rl/break-properties.html

Issue 764503002: Make fast/multicol/break-properties independent of the size of <body>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html style="-webkit-writing-mode:horizontal-tb"> 1 <!DOCTYPE html>
2 <head>
3 <style> 2 <style>
3 body { margin: 5px; }
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 <body style="-webkit-writing-mode:vertical-rl;">
9 <body style="-webkit-writing-mode:vertical-rl; width:800px;"> 9 <div style="width: 100px; height: 325px; -webkit-columns:6; -webkit-column-gap:5 px; columns:6; column-gap:5px; column-fill:auto;">
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> 10 <div class="taller box"></div>
12 <div class="taller box"></div> 11 <div class="taller box"></div>
13 <div id="break-before" class="shorter box" style="-webkit-column-break-befor e: always;"></div> 12 <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> 13 <div class="shorter box" style="-webkit-column-break-after: always;"></div>
15 <div id="after-break" class="shorter box"></div> 14 <div id="after-break" class="shorter box"></div>
16 <div id="no-break" class="shorter box" style="-webkit-column-break-inside: a void;"></div> 15 <div id="no-break" class="shorter box" style="-webkit-column-break-inside: a void;"></div>
17 </div> 16 </div>
18 <pre id="console"></pre> 17 <pre id="console"></pre>
19 <script> 18 <script>
20 if (window.testRunner) 19 if (window.testRunner)
21 testRunner.dumpAsText(); 20 testRunner.dumpAsText();
22 21
23 function log(message) 22 function log(message)
24 { 23 {
25 document.getElementById("console").appendChild(document.createTextNode(m essage + "\n")); 24 document.getElementById("console").appendChild(document.createTextNode(m essage + "\n"));
26 } 25 }
27 26
28 function testBoxPosition(id, expectedLeft, expectedTop) 27 function testBoxColumn(id, expectedColumn) {
29 {
30 var rect = document.getElementById(id).getBoundingClientRect(); 28 var rect = document.getElementById(id).getBoundingClientRect();
31 if (Math.round(rect.left) === expectedLeft && Math.round(rect.top) === e xpectedTop) 29 var actualPosition = Math.round(rect.top);
32 log("PASS: '" + id + "' is at (" + expectedLeft + ", " + expectedTop + ")"); 30 var expectedPosition = (expectedColumn - 1) * 50 + expectedColumn * 5;
31
32 if (actualPosition == expectedPosition)
33 log("PASS: '" + id + "' is in column " + expectedColumn);
33 else 34 else
34 log("FAIL: '" + id + "' is at (" + Math.round(rect.left) + ", " + Ma th.round(rect.top) + ") instead of (" + expectedLeft + " ," + expectedTop + ")") ; 35 log("FAIL: '" + id + "' is at position " + actualPosition + " instea d of " + expectedPosition);
35 } 36 }
36 37
37 testBoxPosition("break-before", 748, 220); 38 testBoxColumn("break-before", 3);
38 testBoxPosition("after-break", 748, 431); 39 testBoxColumn("after-break", 5);
40 testBoxColumn("no-break", 6);
39 </script> 41 </script>
42 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698