8 border:
1px solid black;
9 -webkit-writing-mode: vertical-rl;
12 <script src=
"../../resources/js-test.js"></script>
15 <div id=
"textDiv" contenteditable=
"true">Some text.
<p></p></div>
16 <div id=
"description"></div>
17 <div id=
"console"></div>
19 description('Testcase for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=104794">104794</a>: Unable to place the caret at the end of the first line, when followed by a block, in the vertical writing mode.\nTo manually verify the issue, try clicking on the empty region of the first vertical line. The caret should be drawn at the end of the text.');
21 if (window
.internals
) {
22 var testDiv
= document
.getElementById('textDiv');
23 eventSender
.mouseMoveTo(testDiv
.offsetLeft
+ testDiv
.offsetWidth
- 5, testDiv
.offsetTop
);
24 eventSender
.mouseDown();
25 eventSender
.mouseUp();
26 caretRectAtStart
= internals
.absoluteCaretBounds();
28 eventSender
.mouseMoveTo(testDiv
.offsetLeft
+ testDiv
.offsetWidth
- 5, testDiv
.offsetTop
+ testDiv
.offsetHeight
- 5);
29 eventSender
.mouseDown();
30 eventSender
.mouseUp();
31 caretRectAtEnd
= internals
.absoluteCaretBounds();
33 shouldBe("caretRectAtEnd.left", "caretRectAtStart.left");
34 shouldBe("caretRectAtEnd.width", "caretRectAtStart.width");
35 shouldBe("caretRectAtEnd.height", "caretRectAtStart.height");