+2011-04-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Convert insert-div-021.html to a dump-as-markup test
+ https://bugs.webkit.org/show_bug.cgi?id=58019
+
+ Converted the test.
+
+ * editing/inserting/insert-div-021-expected.txt: Added.
+ * editing/inserting/insert-div-021.html:
+ * platform/chromium-linux/editing/inserting/insert-div-021-expected.checksum: Removed.
+ * platform/chromium-linux/editing/inserting/insert-div-021-expected.png: Removed.
+ * platform/chromium-win/editing/inserting/insert-div-021-expected.checksum: Removed.
+ * platform/chromium-win/editing/inserting/insert-div-021-expected.png: Removed.
+ * platform/chromium-win/editing/inserting/insert-div-021-expected.txt: Removed.
+ * platform/gtk/editing/inserting/insert-div-021-expected.checksum: Removed.
+ * platform/gtk/editing/inserting/insert-div-021-expected.png: Removed.
+ * platform/gtk/editing/inserting/insert-div-021-expected.txt: Removed.
+ * platform/mac/editing/inserting/insert-div-021-expected.checksum: Removed.
+ * platform/mac/editing/inserting/insert-div-021-expected.png: Removed.
+ * platform/mac/editing/inserting/insert-div-021-expected.txt: Removed.
+ * platform/qt/editing/inserting/insert-div-021-expected.txt: Removed.
+
2011-04-07 Adam Barth <abarth@webkit.org>
Reviewed by Eric Seidel.
--- /dev/null
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 6 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+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: shouldDeleteDOMRange:range from 4 of DIV > BODY > HTML > #document to 5 of DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+Test inserting paragraphs: should see "foo", then an empty line, then "bar" in the next line.
+Fix for this bug: <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
+| "
+"
+| <div>
+| style="border: none; height: 12px"
+| "
+"
+| <span>
+| id="test"
+| "foo"
+| <div>
+| <br>
+| <div>
+| <span>
+| id="test"
+| "<#selection-caret>bar
+"
-<html>
-<head>
-
-<style>
-body {
- font-size: 24px;
-}
-.editing {
- border: 2px solid red;
- padding: 12px;
-}
-div {
- border: 2px solid blue;
- padding: 12px;
-}
-
-</style>
-<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
-
+<!DOCTYPE html>
+<html>
+<body>
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div style="border: none; height: 12px"></div>
+<span id="test">foo</span><br>bar
+</div>
+<script src="../../resources/dump-as-markup.js"></script>
<script>
-function editingTest() {
- for (i = 0; i < 4; i++)
- moveSelectionForwardByCharacterCommand();
- deleteCommand();
- insertParagraphCommand();
- insertParagraphCommand();
-}
-
-</script>
-
-<title>Editing Test</title>
-</head>
-<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+if (window.layoutTestController)
+ layoutTestController.dumpEditingCallbacks();
-Test inserting paragraphs: should see "foo", then an empty blue box, then a blue box with with "bar" in it. Fix for this bug:
-<a href="rdar://problem/3924579"><rdar://problem/3924579></a> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
+var root = document.getElementById('root');
+root.focus();
+window.getSelection().setPosition(document.getElementById('test'), 0);
+for (i = 0; i < 4; i++)
+ window.getSelection().modify('move', 'forward', 'character');
-<div style="border: none; height: 12px"></div>
+document.execCommand('Delete');
+document.execCommand('InsertParagraph');
+document.execCommand('InsertParagraph');
-<span id="test">foo</span><br>bar
+Markup.description('Test inserting paragraphs: should see "foo", then an empty line, then "bar" in the next line.\n'+
+'Fix for this bug: <rdar://problem/3924579> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline');
+Markup.dump(root);
-<script>
-runEditingTest();
</script>
-
</body>
</html>
+++ /dev/null
-6d5a0ecb1ee5fc6ebacfbc1be6a6db9b
\ No newline at end of file
+++ /dev/null
-f00bb8352f226258292d76f54ada39c6
\ No newline at end of file
+++ /dev/null
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of BODY > HTML > #document to 7 of BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock (anonymous) at (0,0) size 784x112
- RenderText {#text} at (0,0) size 772x55
- text run at (0,0) width 766: "Test inserting paragraphs: should see \"foo\", then an empty blue box, then a blue"
- text run at (766,0) width 6: " "
- text run at (0,28) width 402: "box with with \"bar\" in it. Fix for this bug: "
- RenderInline {A} at (0,0) size 257x27 [color=#0000EE]
- RenderText {#text} at (402,28) size 257x27
- text run at (402,28) width 257: "<rdar://problem/3924579>"
- RenderText {#text} at (659,28) size 754x83
- text run at (659,28) width 6: " "
- text run at (0,56) width 748: "REGRESSION (Mail): After deleting, hitting return key does not insert visible"
- text run at (748,56) width 6: " "
- text run at (0,84) width 75: "newline"
- RenderBlock {DIV} at (0,112) size 784x36
- RenderBlock (anonymous) at (0,148) size 784x28
- RenderInline {SPAN} at (0,0) size 32x27
- RenderText {#text} at (0,0) size 32x27
- text run at (0,0) width 32: "foo"
- RenderBlock {DIV} at (0,176) size 784x56 [border: (2px solid #0000FF)]
- RenderBR {BR} at (14,14) size 0x27
- RenderBlock {DIV} at (0,232) size 784x56 [border: (2px solid #0000FF)]
- RenderInline {SPAN} at (0,0) size 0x0
- RenderText {#text} at (14,14) size 31x27
- text run at (14,14) width 31: "bar"
-caret: position 0 of child 1 {#text} of child 7 {DIV} of body
+++ /dev/null
-0674d93a70b2ddc037a6df3027aafc5e
\ No newline at end of file
+++ /dev/null
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of BODY > HTML > #document to 7 of BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock (anonymous) at (0,0) size 784x112
- RenderText {#text} at (0,0) size 782x56
- text run at (0,0) width 776: "Test inserting paragraphs: should see \"foo\", then an empty blue box, then a blue"
- text run at (776,0) width 6: " "
- text run at (0,28) width 410: "box with with \"bar\" in it. Fix for this bug: "
- RenderInline {A} at (0,0) size 260x28 [color=#0000EE]
- RenderText {#text} at (410,28) size 260x28
- text run at (410,28) width 260: "<rdar://problem/3924579>"
- RenderText {#text} at (670,28) size 769x84
- text run at (670,28) width 6: " "
- text run at (0,56) width 763: "REGRESSION (Mail): After deleting, hitting return key does not insert visible"
- text run at (763,56) width 6: " "
- text run at (0,84) width 77: "newline"
- RenderBlock {DIV} at (0,112) size 784x36
- RenderBlock (anonymous) at (0,148) size 784x28
- RenderInline {SPAN} at (0,0) size 32x28
- RenderText {#text} at (0,0) size 32x28
- text run at (0,0) width 32: "foo"
- RenderBlock {DIV} at (0,176) size 784x56 [border: (2px solid #0000FF)]
- RenderBR {BR} at (14,14) size 0x28
- RenderBlock {DIV} at (0,232) size 784x56 [border: (2px solid #0000FF)]
- RenderInline {SPAN} at (0,0) size 0x0
- RenderText {#text} at (14,14) size 31x28
- text run at (14,14) width 31: "bar"
-caret: position 0 of child 1 {#text} of child 7 {DIV} of body
+++ /dev/null
-48cb4c0d647589dcb335475b170a0fc5
\ No newline at end of file
+++ /dev/null
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of BODY > HTML > #document to 7 of BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock (anonymous) at (0,0) size 784x112
- RenderText {#text} at (0,0) size 782x56
- text run at (0,0) width 776: "Test inserting paragraphs: should see \"foo\", then an empty blue box, then a blue"
- text run at (776,0) width 6: " "
- text run at (0,28) width 410: "box with with \"bar\" in it. Fix for this bug: "
- RenderInline {A} at (0,0) size 260x28 [color=#0000EE]
- RenderText {#text} at (410,28) size 260x28
- text run at (410,28) width 260: "<rdar://problem/3924579>"
- RenderText {#text} at (670,28) size 769x84
- text run at (670,28) width 6: " "
- text run at (0,56) width 763: "REGRESSION (Mail): After deleting, hitting return key does not insert visible"
- text run at (763,56) width 6: " "
- text run at (0,84) width 77: "newline"
- RenderBlock {DIV} at (0,112) size 784x36
- RenderBlock (anonymous) at (0,148) size 784x28
- RenderInline {SPAN} at (0,0) size 32x28
- RenderText {#text} at (0,0) size 32x28
- text run at (0,0) width 32: "foo"
- RenderBlock {DIV} at (0,176) size 784x56 [border: (2px solid #0000FF)]
- RenderBR {BR} at (14,14) size 0x28
- RenderBlock {DIV} at (0,232) size 784x56 [border: (2px solid #0000FF)]
- RenderInline {SPAN} at (0,0) size 0x0
- RenderText {#text} at (14,14) size 31x28
- text run at (14,14) width 31: "bar"
-caret: position 0 of child 1 {#text} of child 7 {DIV} of body
+++ /dev/null
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 9 of BODY > HTML > #document
-EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldDeleteDOMRange:range from 6 of BODY > HTML > #document to 7 of BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-layer at (0,0) size 800x600
- RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
- RenderBlock {HTML} at (0,0) size 800x600
- RenderBody {BODY} at (8,8) size 784x584
- RenderBlock (anonymous) at (0,0) size 784x124
- RenderText {#text} at (0,0) size 779x63
- text run at (0,0) width 773: "Test inserting paragraphs: should see \"foo\", then an empty blue box, then a"
- text run at (773,0) width 6: " "
- text run at (0,31) width 488: "blue box with with \"bar\" in it. Fix for this bug: "
- RenderInline {A} at (0,0) size 275x32 [color=#0000EE]
- RenderText {#text} at (488,31) size 275x32
- text run at (488,31) width 275: "<rdar://problem/3924579>"
- RenderText {#text} at (763,31) size 769x94
- text run at (763,31) width 6: " "
- text run at (0,62) width 734: "REGRESSION (Mail): After deleting, hitting return key does not insert"
- text run at (734,62) width 6: " "
- text run at (0,93) width 151: "visible newline"
- RenderBlock {DIV} at (0,124) size 784x36
- RenderBlock (anonymous) at (0,160) size 784x31
- RenderInline {SPAN} at (0,0) size 32x32
- RenderText {#text} at (0,0) size 32x32
- text run at (0,0) width 32: "foo"
- RenderBlock {DIV} at (0,191) size 784x59 [border: (2px solid #0000FF)]
- RenderBR {BR} at (14,14) size 0x32
- RenderBlock {DIV} at (0,250) size 784x59 [border: (2px solid #0000FF)]
- RenderInline {SPAN} at (0,0) size 0x0
- RenderText {#text} at (14,14) size 36x32
- text run at (14,14) width 36: "bar"
-caret: position 0 of child 1 {#text} of child 7 {DIV} of body