Commit f7bdce18 authored by yoichio's avatar yoichio Committed by Commit bot

[Editing][CodeHealth] Convert editing/selection to utilize w3c test harness part 1.

This patch converts following tests to utilize
w3c test harness with |assert_selection()| to ease of maintenance for improving
code health('=>' means move/renaming):
LayoutTests/editing/selection/4947387.html =>
  LayoutTests/editing/selection/modify_move/move-by-paragraph.html

LayoutTests/editing/selection/after-line-wrap.html =>
  LayoutTests/editing/selection/modify_move/move-forward-after-line-break.html

LayoutTests/editing/selection/click-left-of-rtl-wrapping-text.html =>
 LayoutTests/editing/selection/mouse/click-left-of-rtl-wrapping-text.html

This is preparation to remove default styles on contenteditable containers.
See crbug.com/427135.

BUG=427135,679977

Review-Url: https://codereview.chromium.org/2525273002
Cr-Commit-Position: refs/heads/master@{#442837}
parent 449c0265
<p>This tests moveTo{Beginning, End}OfLineAndModifySelection. It should operate on line boundaries and not paragraph boundaries. To run it manually, click inside the first line of the editable region below and do Command+Shift+Left/Right Arrow, the selection should extend to the start/end of the line, not the start/end of the paragraph. Also, moveTo{Beginning, End}OfParagraphAndModifySelection should work.</p>
<div id="div" contenteditable="true" style="width: 200px;">The quick brown fox jumped over the lazy brown dog.</div>
<script>
if (window.testRunner) {
window.testRunner.dumpEditingCallbacks();
var div = document.getElementById("div");
var text = div.firstChild;
var sel = window.getSelection();
sel.collapse(text, text.length);
testRunner.execCommand("MoveToBeginningOfLineAndModifySelection");
sel.collapse(text, 0);
testRunner.execCommand("MoveToEndOfLineAndModifySelection");
sel.collapse(text, text.length);
testRunner.execCommand("MoveToBeginningOfParagraphAndModifySelection");
sel.collapse(text, 0);
testRunner.execCommand("MoveToEndOfParagraphAndModifySelection");
}
</script>
<html>
<head>
<script>
function editingTest() {
moveSelectionForwardByLineCommand();
extendSelectionForwardByCharacterCommand();
extendSelectionForwardByCharacterCommand();
extendSelectionForwardByCharacterCommand();
}
</script>
<script src=../editing.js language="JavaScript" type="text/JavaScript"></script>
</head>
<body>
<p><b>Make sure that your window is small enough</b> so that 'don't select this line' and 'try to select just this line' appear on two different lines. The two phrases are actually in the same paragraph, there are just lots of spaces in between them.</p>
<p>This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=6632">REGRESSION: Selection includes spaces that it shouldn't</a>. The test makes sure that a word that is right after a line wrap can be selected successfully.</p>
</p>
<div id="test" contenteditable style="margin: 1em; border: 1px solid black; word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
don't select me &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>try to select just this text</i>
</div>
<script>runEditingTest()</script>
</body>
</html>
<!DOCTYPE html>
<html charset="utf-8">
<body>
<p>This tests clicking on the left of RTL text puts the caret at the end of the line.</p>
<pre id="console"></pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var tests = [
{content: "&#1498; &#1500;&#1499;", expected: [2, 4]},
{content: "&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;", expected: [3, 8, 11]},
{content: "&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;", width: "5ex",
expected: [3, 7, 11, 15, 18]},
];
function failed(message) {
console.innerHTML += 'FAIL: ' + message + '\n';
}
function passed(message) {
console.innerHTML += 'PASS: ' + message + '\n';
}
function runTest(container, test) {
container.style.width = '100%';
container.innerHTML = test.content;
// Starting from 5px, slowly increase the width until each word fits in one line.
var heightOfLine = container.offsetHeight;
var width = 5;
do {
container.style.width = width + 'px';
width++;
} while (container.offsetHeight > heightOfLine * test.expected.length);
container.style.width = (width + 1) + 'px';
var x = 0;
var y = heightOfLine / 2;
var yIncrement = container.offsetHeight / test.expected.length;
var lines = ['st', 'nd', 'rd', 'th'];
if (!window.eventSender)
return;
for (var i = 0; i < test.expected.length; i++) {
eventSender.mouseMoveTo(container.offsetLeft + x, container.offsetTop + y);
eventSender.mouseDown();
eventSender.leapForward(100);
eventSender.mouseUp();
eventSender.leapForward(1000);
var line = (i + 1) + lines[Math.min(i, lines.length - 1)];
var action = 'clicking on the left of the ' + line + ' line of ' + test.content;
if (!window.getSelection().isCollapsed)
return failed(action + ' put selection instead of caret');
var range = window.getSelection().getRangeAt(0);
if (range.startContainer != container.firstChild)
return failed(action + ' put the caret at a wrong container');
action += ' put the caret at ' + range.startOffset;
if (range.startOffset != test.expected[i])
return failed(action + ' but expected at ' + test.expected[i]);
y += yIncrement;
passed(action);
}
}
var console = document.getElementById('console');
var container = document.createElement('div');
container.contentEditable = true;
container.setAttribute('dir', 'rtl');
document.body.appendChild(container);
if (!window.eventSender)
failed('Clicking tests require eventSender');
else {
for (var i = 0; i < tests.length; i++)
runTest(container, tests[i]);
container.innerHTML = '';
}
</script>
</body>
</html>
<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
test(() => {
assert_selection(
'<div>foo<div>bar|</div>baz</div>',
selection => selection.modify('move', 'backward', 'paragraph'),
'<div>foo|<div>bar</div>baz</div>');
assert_selection(
'<div>foo<span>bar|</span>baz</div>',
selection => selection.modify('move', 'backward', 'paragraph'),
'<div>|foo<span>bar</span>baz</div>');
}, 'Selection.modify move backward by paragraph');
test(() => {
assert_selection(
'<div>foo<div>|bar</div>baz</div>',
selection => selection.modify('move', 'forward', 'paragraph'),
'<div>foo<div>bar</div>|baz</div>');
assert_selection(
'<div>foo<span>|bar</span>baz</div>',
selection => selection.modify('move', 'forward', 'paragraph'),
'<div>foo<span>bar</span>baz|</div>');
}, 'Selection.modify move forward by paragraph');
</script>
\ No newline at end of file
<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
test(() => {
assert_selection(
'<div style="width:50px">|foo bar baz foo</div>',
selection => {
selection.modify('move', 'forward', 'line');
selection.modify('move', 'forward', 'character');
},
'<div style="width:50px">foo bar b|az foo</div>');
}, 'Modify move forward after line break');
</script>
<!doctype html>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
test(() => {
if (!window.eventSender) {
assert_no_reached('This test requires eventSender.');
return;
}
function testClickLeft(selection, lines, rowIndexToClick) {
const doc = selection.document;
const container = doc.querySelector('div');
// Adjust width to have |lines| of lines.
// Since the Ahem font doesn't cover characters used in test,
// we need to calc width depending on each platform.
const heightOfLine = container.offsetHeight;
let width = 5;
do {
container.style.width = `${width}px`;
width++;
} while (container.offsetHeight > heightOfLine * lines);
container.style.width = `${width + 1}px`;
// Click left of the |rowIndexToClick|th line.
eventSender.mouseMoveTo(
doc.offsetLeft + container.offsetLeft + 3,
doc.offsetTop + container.offsetTop + heightOfLine/2 + rowIndexToClick * heightOfLine);
eventSender.mouseDown();
eventSender.mouseUp();
// Remove width from style to clean result DOM.
container.style.removeProperty('width');
return heightOfLine;
}
assert_selection(
'<div contenteditable dir="rtl">&#1498; &#1500;&#1499;</div>',
selection => testClickLeft(selection, 2, 0),
'<div contenteditable dir="rtl">ך |לכ</div>');
assert_selection(
'<div contenteditable dir="rtl">&#1498; &#1500;&#1499;</div>',
selection => testClickLeft(selection, 2, 1),
'<div contenteditable dir="rtl">ך לכ|</div>');
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 3, 0),
[
'<div contenteditable dir="rtl">',
'ככ |ככככ כככ',
'</div>'
].join(''));
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 3, 1),
[
'<div contenteditable dir="rtl">',
'ככ ככככ |כככ',
'</div>'
].join(''));
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1499;&#1499; &#1499;&#1499;&#1499;&#1499; &#1499;&#1499;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 3, 2),
[
'<div contenteditable dir="rtl">',
'ככ ככככ כככ|',
'</div>'
].join(''));
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 5, 0),
[
'<div contenteditable dir="rtl">',
'גכ |יגכ יגכ יגכ יגכ',
'</div>'
].join(''));
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 5, 1),
[
'<div contenteditable dir="rtl">',
'גכ יגכ |יגכ יגכ יגכ',
'</div>'
].join(''));
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 5, 2),
[
'<div contenteditable dir="rtl">',
'גכ יגכ יגכ |יגכ יגכ',
'</div>'
].join(''));
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 5, 3),
[
'<div contenteditable dir="rtl">',
'גכ יגכ יגכ יגכ |יגכ',
'</div>'
].join(''));
assert_selection(
[
'<div contenteditable dir="rtl">',
'&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499; &#1497;&#1490;&#1499;',
'</div>'
].join(''),
selection => testClickLeft(selection, 5, 4),
[
'<div contenteditable dir="rtl">',
'גכ יגכ יגכ יגכ יגכ|',
'</div>'
].join(''));
}, 'This tests clicking on the left of RTL text puts the caret at the end of the line');
</script>
\ No newline at end of file
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {P} at (0,0) size 784x80
LayoutText {#text} at (0,0) size 782x79
text run at (0,0) width 389: "This tests moveTo{Beginning, End}OfLineAndModifySelection. "
text run at (388,0) width 330: "It should operate on line boundaries and not paragraph"
text run at (0,20) width 74: "boundaries. "
text run at (74,20) width 708: "To run it manually, click inside the first line of the editable region below and do Command+Shift+Left/Right Arrow, the"
text run at (0,40) width 511: "selection should extend to the start/end of the line, not the start/end of the paragraph. "
text run at (511,40) width 154: "Also, moveTo{Beginning,"
text run at (0,60) width 318: "End}OfParagraphAndModifySelection should work."
LayoutBlockFlow {DIV} at (0,96) size 200x40
LayoutText {#text} at (0,0) size 179x39
text run at (0,0) width 175: "The quick brown fox jumped"
text run at (175,0) width 4: " "
text run at (0,20) width 150: "over the lazy brown dog."
selection start: position 0 of child 0 {#text} of child 2 {DIV} of body
selection end: position 51 of child 0 {#text} of child 2 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x576
LayoutBlockFlow {P} at (0,0) size 784x40
LayoutInline {B} at (0,0) size 296x19
LayoutText {#text} at (0,0) size 296x19
text run at (0,0) width 296: "Make sure that your window is small enough"
LayoutText {#text} at (295,0) size 737x39
text run at (295,0) width 442: " so that 'don't select this line' and 'try to select just this line' appear on two"
text run at (0,20) width 87: "different lines. "
text run at (86,20) width 587: "The two phrases are actually in the same paragraph, there are just lots of spaces in between them."
LayoutBlockFlow {P} at (0,56) size 784x40
LayoutText {#text} at (0,0) size 99x19
text run at (0,0) width 99: "This is a test for "
LayoutInline {A} at (0,0) size 349x19 [color=#0000EE]
LayoutText {#text} at (99,0) size 349x19
text run at (99,0) width 349: "REGRESSION: Selection includes spaces that it shouldn't"
LayoutText {#text} at (448,0) size 784x39
text run at (448,0) width 336: ". The test makes sure that a word that is right after a line"
text run at (0,20) width 205: "wrap can be selected successfully."
LayoutBlockFlow {P} at (0,112) size 784x0
LayoutBlockFlow {DIV} at (16,112) size 752x82 [border: (1px solid #000000)]
LayoutText {#text} at (1,1) size 748x59
text run at (1,1) width 90: "don't select me"
text run at (91,1) width 4: " "
text run at (1,21) width 748: " "
text run at (1,41) width 644: " "
LayoutInline {I} at (0,0) size 750x39
LayoutText {#text} at (645,41) size 750x39
text run at (645,41) width 103: "try to select just"
text run at (748,41) width 3: " "
text run at (1,61) width 52: "this text"
LayoutText {#text} at (0,0) size 0x0
selection start: position 17 of child 0 {#text} of child 7 {DIV} of body
selection end: position 20 of child 0 {#text} of child 7 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {P} at (0,0) size 784x72
LayoutText {#text} at (0,0) size 775x72
text run at (0,0) width 423: "This tests moveTo{Beginning, End}OfLineAndModifySelection. "
text run at (422,0) width 350: "It should operate on line boundaries and not paragraph"
text run at (0,18) width 79: "boundaries. "
text run at (78,18) width 697: "To run it manually, click inside the first line of the editable region below and do Command+Shift+Left/Right"
text run at (0,36) width 619: "Arrow, the selection should extend to the start/end of the line, not the start/end of the paragraph. "
text run at (618,36) width 35: "Also,"
text run at (0,54) width 473: "moveTo{Beginning, End}OfParagraphAndModifySelection should work."
LayoutBlockFlow {DIV} at (0,88) size 200x36
LayoutText {#text} at (0,0) size 191x36
text run at (0,0) width 187: "The quick brown fox jumped"
text run at (186,0) width 5: " "
text run at (0,18) width 160: "over the lazy brown dog."
selection start: position 0 of child 0 {#text} of child 2 {DIV} of body
selection end: position 51 of child 0 {#text} of child 2 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x576
LayoutBlockFlow {P} at (0,0) size 784x36
LayoutInline {B} at (0,0) size 306x18
LayoutText {#text} at (0,0) size 306x18
text run at (0,0) width 306: "Make sure that your window is small enough"
LayoutText {#text} at (305,0) size 778x36
text run at (305,0) width 473: " so that 'don't select this line' and 'try to select just this line' appear on two"
text run at (0,18) width 98: "different lines. "
text run at (97,18) width 623: "The two phrases are actually in the same paragraph, there are just lots of spaces in between them."
LayoutBlockFlow {P} at (0,52) size 784x36
LayoutText {#text} at (0,0) size 108x18
text run at (0,0) width 108: "This is a test for "
LayoutInline {A} at (0,0) size 373x18 [color=#0000EE]
LayoutText {#text} at (107,0) size 373x18
text run at (107,0) width 373: "REGRESSION: Selection includes spaces that it shouldn't"
LayoutText {#text} at (479,0) size 768x36
text run at (479,0) width 289: ". The test makes sure that a word that is right"
text run at (0,18) width 291: "after a line wrap can be selected successfully."
LayoutBlockFlow {P} at (0,104) size 784x0
LayoutBlockFlow {DIV} at (16,104) size 752x74 [border: (1px solid #000000)]
LayoutText {#text} at (1,1) size 748x54
text run at (1,1) width 96: "don't select me"
text run at (96,1) width 5: " "
text run at (1,19) width 748: " "
text run at (1,37) width 644: " "
LayoutInline {I} at (0,0) size 750x36
LayoutText {#text} at (645,37) size 750x36
text run at (645,37) width 102: "try to select just"
text run at (746,37) width 5: " "
text run at (1,55) width 51: "this text"
LayoutText {#text} at (0,0) size 0x0
selection start: position 17 of child 0 {#text} of child 7 {DIV} of body
selection end: position 20 of child 0 {#text} of child 7 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {P} at (0,0) size 784x72
LayoutText {#text} at (0,0) size 776x71
text run at (0,0) width 423: "This tests moveTo{Beginning, End}OfLineAndModifySelection. "
text run at (422,0) width 350: "It should operate on line boundaries and not paragraph"
text run at (0,18) width 79: "boundaries. "
text run at (78,18) width 698: "To run it manually, click inside the first line of the editable region below and do Command+Shift+Left/Right"
text run at (0,36) width 619: "Arrow, the selection should extend to the start/end of the line, not the start/end of the paragraph. "
text run at (618,36) width 35: "Also,"
text run at (0,54) width 473: "moveTo{Beginning, End}OfParagraphAndModifySelection should work."
LayoutBlockFlow {DIV} at (0,88) size 200x36
LayoutText {#text} at (0,0) size 191x35
text run at (0,0) width 187: "The quick brown fox jumped"
text run at (186,0) width 5: " "
text run at (0,18) width 160: "over the lazy brown dog."
selection start: position 0 of child 0 {#text} of child 2 {DIV} of body
selection end: position 51 of child 0 {#text} of child 2 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x576
LayoutBlockFlow {P} at (0,0) size 784x36
LayoutInline {B} at (0,0) size 306x17
LayoutText {#text} at (0,0) size 306x17
text run at (0,0) width 306: "Make sure that your window is small enough"
LayoutText {#text} at (305,0) size 778x35
text run at (305,0) width 473: " so that 'don't select this line' and 'try to select just this line' appear on two"
text run at (0,18) width 97: "different lines. "
text run at (97,18) width 623: "The two phrases are actually in the same paragraph, there are just lots of spaces in between them."
LayoutBlockFlow {P} at (0,52) size 784x36
LayoutText {#text} at (0,0) size 108x17
text run at (0,0) width 108: "This is a test for "
LayoutInline {A} at (0,0) size 373x17 [color=#0000EE]
LayoutText {#text} at (107,0) size 373x17
text run at (107,0) width 373: "REGRESSION: Selection includes spaces that it shouldn't"
LayoutText {#text} at (479,0) size 768x35
text run at (479,0) width 289: ". The test makes sure that a word that is right"
text run at (0,18) width 291: "after a line wrap can be selected successfully."
LayoutBlockFlow {P} at (0,104) size 784x0
LayoutBlockFlow {DIV} at (16,104) size 752x74 [border: (1px solid #000000)]
LayoutText {#text} at (1,1) size 748x53
text run at (1,1) width 96: "don't select me"
text run at (96,1) width 5: " "
text run at (1,19) width 748: " "
text run at (1,37) width 644: " "
LayoutInline {I} at (0,0) size 750x35
LayoutText {#text} at (645,37) size 750x35
text run at (645,37) width 102: "try to select just"
text run at (746,37) width 5: " "
text run at (1,55) width 51: "this text"
LayoutText {#text} at (0,0) size 0x0
selection start: position 17 of child 0 {#text} of child 7 {DIV} of body
selection end: position 20 of child 0 {#text} of child 7 {DIV} of body
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment