blob: 03988d5a05e62b8d48a60d851e443c8e1307bbf1 [file] [log] [blame]
<head>
<script>
function runTest() {
if (!testRunner)
return;
testRunner.waitUntilDone();
window.setTimeout(afterDelay, 20);
}
function afterDelay() {
edit = document.getElementById("edit");
edit.focus();
window.scrollTo(0, 0);
textInputController.doCommand("moveBackward:");
testRunner.notifyDone();
}
</script>
</head>
<body onload="runTest();" style="padding: 0; margin:0">
<div id="edit" contentEditable="true" style="border: 1px solid red; width:300px; margin-left: 798px; padding:0; height:">This tests for a bug (https://bugs.webkit.org/show_bug.cgi?id=25228) where SelectionController::absoluteCaretBounds was returning an inflated caret. It would manifest itself during revealSelection calls. Before the change we would reveal one pixel too much because of the inflation. To run manually, place the caret just after the first character, scroll to 0, 0 and hit the back arrow. The caret should be right up against the edge of the window and the window should still be at scroll 0, 0. If we change the way selections are revealed the results for this test might change and it may no longer test for the bug.</div>
<div style="width:2000px;">
</body>