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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/multicol/hit-test-end-of-column-with-line-height.html

Issue 1419813004: Remove the "horizontal-bt" value from -webkit-writing-mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add static_assert to ensure TransformedWritingMode matches to WritingMode Created 5 years, 1 month 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <div id="target" style=" 2 <div id="target" style="
3 outline: dashed lightblue; 3 outline: dashed lightblue;
4 -webkit-columns: 2; 4 -webkit-columns: 2;
5 -webkit-column-gap: 0; 5 -webkit-column-gap: 0;
6 columns: 2; 6 columns: 2;
7 column-gap: 0; 7 column-gap: 0;
8 column-fill: auto; 8 column-fill: auto;
9 width: 400px; 9 -webkit-logical-width: 400px;
10 height: 80px; 10 -webkit-logical-height: 80px;
11 font: 20px Ahem; 11 font: 20px Ahem;
12 line-height: 2; 12 line-height: 2;
13 ">Lorem ipsum dolor sit amet</div> 13 ">Lorem ipsum dolor sit amet</div>
14 <pre id="console"></pre> 14 <pre id="console"></pre>
15 <script> 15 <script>
16 if (window.testRunner) 16 if (window.testRunner)
17 testRunner.dumpAsText(); 17 testRunner.dumpAsText();
18 18
19 function log(message) 19 function log(message)
20 { 20 {
21 document.getElementById("console").appendChild(document.createTextNode(m essage + "\n")); 21 document.getElementById("console").appendChild(document.createTextNode(m essage + "\n"));
22 } 22 }
23 23
24 // Clicking below the last line in the first column should not select anythi ng from the first 24 // Clicking below the last line in the first column should not select anythi ng from the first
25 // line on the second column. 25 // line on the second column.
26 var target = document.getElementById("target"); 26 var target = document.getElementById("target");
27 var hitOffset = document.caretRangeFromPoint(target.offsetLeft + 190, target .offsetTop + 77).startOffset; 27 var hitOffset = document.caretRangeFromPoint(target.offsetLeft + 190, target .offsetTop + 77).startOffset;
28 log(hitOffset === 11 ? "PASS" : "FAIL: hit offset " + hitOffset + "."); 28 log(hitOffset === 11 ? "PASS" : "FAIL: hit offset " + hitOffset + ".");
29 29
30 // Clicking above the first line in the second column should not snap to the beginning of the line. 30 // Clicking above the first line in the second column should not snap to the beginning of the line.
31 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 250, target.off setTop + 2).startOffset; 31 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 250, target.off setTop + 2).startOffset;
32 log(hitOffset === 14 ? "PASS" : "FAIL: hit offset " + hitOffset + "."); 32 log(hitOffset === 14 ? "PASS" : "FAIL: hit offset " + hitOffset + ".");
33 33
34 // Now test with a flipped lines writing mode. 34 // Now test with a flipped lines writing mode.
35 target.style.webkitWritingMode = "horizontal-bt"; 35 target.style.webkitWritingMode = "vertical-rl";
36 36
37 // Clicking above the last line in the first column should not select anythi ng from the first 37 // Clicking above the last line in the first column should not select anythi ng from the first
38 // line on the second column. 38 // line on the second column.
39 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 190, target.off setTop + 3).startOffset; 39 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 80, target.offs etTop + 193).startOffset;
40 log(hitOffset === 11 ? "PASS" : "FAIL: hit offset " + hitOffset + "."); 40 log(hitOffset === 11 ? "PASS" : "FAIL: hit offset " + hitOffset + ".");
41 41
42 // Clicking below the first line in the second column should not snap to the beginning of the line. 42 // Clicking below the first line in the second column should not snap to the beginning of the line.
43 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 250, target.off setTop + 78).startOffset; 43 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 77, target.offs etTop + 250).startOffset;
44 log(hitOffset === 14 ? "PASS" : "FAIL: hit offset " + hitOffset + "."); 44 log(hitOffset === 14 ? "PASS" : "FAIL: hit offset " + hitOffset + ".");
45 </script> 45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698