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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html

Issue 2517383002: Use the font height as caret height instead of the line height (Closed)
Patch Set: fix rebase fail Created 4 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
(Empty)
1 <html>
2 <head>
3 <style>
4 div {
5 border: 2px solid red;
6 padding: 12px;
7 line-height: 1.66666667;
8 width: 70px;
9 }
10 </style>
11 <script src="../../resources/testharness.js"></script>
12 <script src="../../resources/testharnessreport.js"></script>
13 </head>
14 <body>
15 <div contenteditable id="editor">
16 The caret
17 <span id="line2"> height should be the same for each line.</span>
18 </div>
19 <script>
20 test(function () {
21 var editor = document.getElementById('editor');
22 editor.focus();
23
24 var caretHeight1 = window.internals.absoluteCaretBounds().height;
25 var sel = window.getSelection();
26 sel.collapse(line2, 0);
27 var caretHeight2 = window.internals.absoluteCaretBounds().height;
28
29 assert_equals(caretHeight1, caretHeight2, 'The caret height is the same for ea ch line.');
30 }, 'Compare the caret height');
31 </script>
32 </body>
33 </html>
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698