Reviewed by Stephanie.
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2007 04:34:16 +0000 (04:34 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Sep 2007 04:34:16 +0000 (04:34 +0000)
        Moved a number of tests from platform/mac that are not currently cross-platform,
        but should eventually be updated to work across all platforms.

        * editing/deleting/5300379-expected.checksum: Copied from platform/mac/editing/deleting/5300379-expected.checksum.
        * editing/deleting/5300379-expected.png: Copied from platform/mac/editing/deleting/5300379-expected.png.
        * editing/deleting/5300379-expected.txt: Copied from platform/mac/editing/deleting/5300379-expected.txt.
        * editing/deleting/5300379.html: Copied from platform/mac/editing/deleting/5300379.html.
        * editing/deleting/delete-to-end-of-paragraph-expected.checksum: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.checksum.
        * editing/deleting/delete-to-end-of-paragraph-expected.png: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.png.
        * editing/deleting/delete-to-end-of-paragraph-expected.txt: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.txt.
        * editing/deleting/delete-to-end-of-paragraph.html: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph.html.
        * editing/deleting/smart-delete-003-expected.checksum: Copied from platform/mac/editing/deleting/smart-delete-003-expected.checksum.
        * editing/deleting/smart-delete-003-expected.png: Copied from platform/mac/editing/deleting/smart-delete-003-expected.png.
        * editing/deleting/smart-delete-003-expected.txt: Copied from platform/mac/editing/deleting/smart-delete-003-expected.txt.
        * editing/deleting/smart-delete-003.html: Copied from platform/mac/editing/deleting/smart-delete-003.html.
        * editing/deleting/smart-delete-004-expected.checksum: Copied from platform/mac/editing/deleting/smart-delete-004-expected.checksum.
        * editing/deleting/smart-delete-004-expected.png: Copied from platform/mac/editing/deleting/smart-delete-004-expected.png.
        * editing/deleting/smart-delete-004-expected.txt: Copied from platform/mac/editing/deleting/smart-delete-004-expected.txt.
        * editing/deleting/smart-delete-004.html: Copied from platform/mac/editing/deleting/smart-delete-004.html.
        * editing/execCommand/nsresponder-indent-expected.checksum: Copied from platform/mac/editing/execCommand/nsresponder-indent-expected.checksum.
        * editing/execCommand/nsresponder-indent-expected.png: Copied from platform/mac/editing/execCommand/nsresponder-indent-expected.png.
        * editing/execCommand/nsresponder-indent-expected.txt: Copied from platform/mac/editing/execCommand/nsresponder-indent-expected.txt.
        * editing/execCommand/nsresponder-indent.html: Copied from platform/mac/editing/execCommand/nsresponder-indent.html.
        * editing/execCommand/nsresponder-outdent-expected.checksum: Copied from platform/mac/editing/execCommand/nsresponder-outdent-expected.checksum.
        * editing/execCommand/nsresponder-outdent-expected.png: Copied from platform/mac/editing/execCommand/nsresponder-outdent-expected.png.
        * editing/execCommand/nsresponder-outdent-expected.txt: Copied from platform/mac/editing/execCommand/nsresponder-outdent-expected.txt.
        * editing/execCommand/nsresponder-outdent.html: Copied from platform/mac/editing/execCommand/nsresponder-outdent.html.
        * editing/selection/4947387-expected.checksum: Copied from platform/mac/editing/selection/4947387-expected.checksum.
        * editing/selection/4947387-expected.png: Copied from platform/mac/editing/selection/4947387-expected.png.
        * editing/selection/4947387-expected.txt: Copied from platform/mac/editing/selection/4947387-expected.txt.
        * editing/selection/4947387.html: Copied from platform/mac/editing/selection/4947387.html.
        * editing/selection/5195166-1-expected.checksum: Copied from platform/mac/editing/selection/5195166-1-expected.checksum.
        * editing/selection/5195166-1-expected.png: Copied from platform/mac/editing/selection/5195166-1-expected.png.
        * editing/selection/5195166-1-expected.txt: Copied from platform/mac/editing/selection/5195166-1-expected.txt.
        * editing/selection/5195166-1.html: Copied from platform/mac/editing/selection/5195166-1.html.
        * editing/selection/5195166-2-expected.checksum: Copied from platform/mac/editing/selection/5195166-2-expected.checksum.
        * editing/selection/5195166-2-expected.png: Copied from platform/mac/editing/selection/5195166-2-expected.png.
        * editing/selection/5195166-2-expected.txt: Copied from platform/mac/editing/selection/5195166-2-expected.txt.
        * editing/selection/5195166-2.html: Copied from platform/mac/editing/selection/5195166-2.html.
        * editing/selection/select-line-expected.txt: Copied from platform/mac/editing/selection/select-line-expected.txt.
        * editing/selection/select-line.html: Copied from platform/mac/editing/selection/select-line.html.
        * editing/selection/selection-actions-expected.checksum: Copied from platform/mac/editing/selection/selection-actions-expected.checksum.
        * editing/selection/selection-actions-expected.png: Copied from platform/mac/editing/selection/selection-actions-expected.png.
        * editing/selection/selection-actions-expected.txt: Copied from platform/mac/editing/selection/selection-actions-expected.txt.
        * editing/selection/selection-actions.html: Copied from platform/mac/editing/selection/selection-actions.html.
        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25382 268f45cc-cd09-0410-ab3c-d52691b4dbfc

44 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/5300379-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/5300379-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/5300379-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/5300379.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-to-end-of-paragraph.html [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-003-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-003-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-003.html [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-004-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-004-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-004.html [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-indent-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-indent-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-indent-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-indent.html [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-outdent-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-outdent-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-outdent-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/nsresponder-outdent.html [new file with mode: 0644]
LayoutTests/editing/selection/4947387-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/4947387-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/4947387-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/4947387.html [new file with mode: 0644]
LayoutTests/editing/selection/5195166-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/5195166-1-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/5195166-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/5195166-1.html [new file with mode: 0644]
LayoutTests/editing/selection/5195166-2-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/5195166-2-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/5195166-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/5195166-2.html [new file with mode: 0644]
LayoutTests/editing/selection/select-line-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/select-line.html [new file with mode: 0644]
LayoutTests/editing/selection/selection-actions-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/selection-actions-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/selection-actions-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/selection-actions.html [new file with mode: 0644]
LayoutTests/platform/win/Skipped

index 98fc292..ddd0080 100644 (file)
@@ -1,3 +1,54 @@
+2007-09-05  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Stephanie.
+
+        Moved a number of tests from platform/mac that are not currently cross-platform,
+        but should eventually be updated to work across all platforms.
+
+        * editing/deleting/5300379-expected.checksum: Copied from platform/mac/editing/deleting/5300379-expected.checksum.
+        * editing/deleting/5300379-expected.png: Copied from platform/mac/editing/deleting/5300379-expected.png.
+        * editing/deleting/5300379-expected.txt: Copied from platform/mac/editing/deleting/5300379-expected.txt.
+        * editing/deleting/5300379.html: Copied from platform/mac/editing/deleting/5300379.html.
+        * editing/deleting/delete-to-end-of-paragraph-expected.checksum: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.checksum.
+        * editing/deleting/delete-to-end-of-paragraph-expected.png: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.png.
+        * editing/deleting/delete-to-end-of-paragraph-expected.txt: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.txt.
+        * editing/deleting/delete-to-end-of-paragraph.html: Copied from platform/mac/editing/deleting/delete-to-end-of-paragraph.html.
+        * editing/deleting/smart-delete-003-expected.checksum: Copied from platform/mac/editing/deleting/smart-delete-003-expected.checksum.
+        * editing/deleting/smart-delete-003-expected.png: Copied from platform/mac/editing/deleting/smart-delete-003-expected.png.
+        * editing/deleting/smart-delete-003-expected.txt: Copied from platform/mac/editing/deleting/smart-delete-003-expected.txt.
+        * editing/deleting/smart-delete-003.html: Copied from platform/mac/editing/deleting/smart-delete-003.html.
+        * editing/deleting/smart-delete-004-expected.checksum: Copied from platform/mac/editing/deleting/smart-delete-004-expected.checksum.
+        * editing/deleting/smart-delete-004-expected.png: Copied from platform/mac/editing/deleting/smart-delete-004-expected.png.
+        * editing/deleting/smart-delete-004-expected.txt: Copied from platform/mac/editing/deleting/smart-delete-004-expected.txt.
+        * editing/deleting/smart-delete-004.html: Copied from platform/mac/editing/deleting/smart-delete-004.html.
+        * editing/execCommand/nsresponder-indent-expected.checksum: Copied from platform/mac/editing/execCommand/nsresponder-indent-expected.checksum.
+        * editing/execCommand/nsresponder-indent-expected.png: Copied from platform/mac/editing/execCommand/nsresponder-indent-expected.png.
+        * editing/execCommand/nsresponder-indent-expected.txt: Copied from platform/mac/editing/execCommand/nsresponder-indent-expected.txt.
+        * editing/execCommand/nsresponder-indent.html: Copied from platform/mac/editing/execCommand/nsresponder-indent.html.
+        * editing/execCommand/nsresponder-outdent-expected.checksum: Copied from platform/mac/editing/execCommand/nsresponder-outdent-expected.checksum.
+        * editing/execCommand/nsresponder-outdent-expected.png: Copied from platform/mac/editing/execCommand/nsresponder-outdent-expected.png.
+        * editing/execCommand/nsresponder-outdent-expected.txt: Copied from platform/mac/editing/execCommand/nsresponder-outdent-expected.txt.
+        * editing/execCommand/nsresponder-outdent.html: Copied from platform/mac/editing/execCommand/nsresponder-outdent.html.
+        * editing/selection/4947387-expected.checksum: Copied from platform/mac/editing/selection/4947387-expected.checksum.
+        * editing/selection/4947387-expected.png: Copied from platform/mac/editing/selection/4947387-expected.png.
+        * editing/selection/4947387-expected.txt: Copied from platform/mac/editing/selection/4947387-expected.txt.
+        * editing/selection/4947387.html: Copied from platform/mac/editing/selection/4947387.html.
+        * editing/selection/5195166-1-expected.checksum: Copied from platform/mac/editing/selection/5195166-1-expected.checksum.
+        * editing/selection/5195166-1-expected.png: Copied from platform/mac/editing/selection/5195166-1-expected.png.
+        * editing/selection/5195166-1-expected.txt: Copied from platform/mac/editing/selection/5195166-1-expected.txt.
+        * editing/selection/5195166-1.html: Copied from platform/mac/editing/selection/5195166-1.html.
+        * editing/selection/5195166-2-expected.checksum: Copied from platform/mac/editing/selection/5195166-2-expected.checksum.
+        * editing/selection/5195166-2-expected.png: Copied from platform/mac/editing/selection/5195166-2-expected.png.
+        * editing/selection/5195166-2-expected.txt: Copied from platform/mac/editing/selection/5195166-2-expected.txt.
+        * editing/selection/5195166-2.html: Copied from platform/mac/editing/selection/5195166-2.html.
+        * editing/selection/select-line-expected.txt: Copied from platform/mac/editing/selection/select-line-expected.txt.
+        * editing/selection/select-line.html: Copied from platform/mac/editing/selection/select-line.html.
+        * editing/selection/selection-actions-expected.checksum: Copied from platform/mac/editing/selection/selection-actions-expected.checksum.
+        * editing/selection/selection-actions-expected.png: Copied from platform/mac/editing/selection/selection-actions-expected.png.
+        * editing/selection/selection-actions-expected.txt: Copied from platform/mac/editing/selection/selection-actions-expected.txt.
+        * editing/selection/selection-actions.html: Copied from platform/mac/editing/selection/selection-actions.html.
+        * platform/win/Skipped:
+
 2007-09-05  David Harrison  <harrison@apple.com>
 
         Updated results for:
diff --git a/LayoutTests/editing/deleting/5300379-expected.checksum b/LayoutTests/editing/deleting/5300379-expected.checksum
new file mode 100644 (file)
index 0000000..4c7e26d
--- /dev/null
@@ -0,0 +1 @@
+eb961bc0a6372808fbd351e18cea694a
\ No newline at end of file
diff --git a/LayoutTests/editing/deleting/5300379-expected.png b/LayoutTests/editing/deleting/5300379-expected.png
new file mode 100644 (file)
index 0000000..394f193
Binary files /dev/null and b/LayoutTests/editing/deleting/5300379-expected.png differ
diff --git a/LayoutTests/editing/deleting/5300379-expected.txt b/LayoutTests/editing/deleting/5300379-expected.txt
new file mode 100644 (file)
index 0000000..3a91e3c
--- /dev/null
@@ -0,0 +1,11 @@
+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 {DIV} at (0,0) size 784x0
+      RenderBlock {DIV} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 50x18
+          text run at (0,0) width 50: "Success"
+      RenderBlock {DIV} at (0,18) size 784x0
+caret: position 7 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/deleting/5300379.html b/LayoutTests/editing/deleting/5300379.html
new file mode 100644 (file)
index 0000000..ea2b344
--- /dev/null
@@ -0,0 +1,19 @@
+<div></div>
+<div contenteditable="true" id="div"></div>
+<div></div>
+
+<script>
+div = document.getElementById("div");
+sel = window.getSelection();
+sel.setPosition(div, 0);
+if (window.layoutTestController) {
+    // Test to see if deleteWordBackward: hangs.
+    textInputController.doCommand("deleteWordBackward:");
+    document.execCommand("InsertText", false, "Success FAIL");
+    // Delete 'FAIL' with deleteWordBackward: to verify that it's not a no-op.
+    textInputController.doCommand("deleteWordBackward:");
+    textInputController.doCommand("deleteBackward:");
+} else {
+    document.execCommand("InsertText", false, "To run this test manually.  Delete all this text and then option-delete.  Safari shouldn't hang.");
+}
+</script>
diff --git a/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.checksum b/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.checksum
new file mode 100644 (file)
index 0000000..467b7ef
--- /dev/null
@@ -0,0 +1 @@
+d02ca3caf3164fa5a1ff7876328613a7
\ No newline at end of file
diff --git a/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.png b/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.png
new file mode 100644 (file)
index 0000000..c9b3bf6
Binary files /dev/null and b/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.png differ
diff --git a/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt b/LayoutTests/editing/deleting/delete-to-end-of-paragraph-expected.txt
new file mode 100644 (file)
index 0000000..babfd53
--- /dev/null
@@ -0,0 +1,25 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 5 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) 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: shouldDeleteDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) 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
+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 {DIV} at (0,0) size 600x18
+        RenderInline {SPAN} at (0,0) size 76x18
+          RenderText {#text} at (0,0) size 76x18
+            text run at (0,0) width 76: "four five six"
+caret: position 0 of child 0 {#text} of child 0 {SPAN} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html b/LayoutTests/editing/deleting/delete-to-end-of-paragraph.html
new file mode 100644 (file)
index 0000000..40415a3
--- /dev/null
@@ -0,0 +1,41 @@
+<html>
+<head>
+
+<style>
+.editing { 
+    font-size: 24px; 
+    width: 600px; 
+}
+</style>
+<script src="../editing.js" language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    if (window.layoutTestController) {
+        
+        try {
+            // test for 4570218 by using double deleteToEndOfParagraph
+            textInputController.doCommand("deleteToEndOfParagraph:");    
+            textInputController.doCommand("deleteToEndOfParagraph:");    
+
+        } catch (ex) {
+            document.write("Exception: " + ex.description);
+        }
+    } else {
+        document.write("(cannot run interactively)");
+    }
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body contenteditable id="root">
+<div id="test" class="editing">one two three</div><div>four five six</div>
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/smart-delete-003-expected.checksum b/LayoutTests/editing/deleting/smart-delete-003-expected.checksum
new file mode 100644 (file)
index 0000000..304c4b1
--- /dev/null
@@ -0,0 +1 @@
+63468c9c237c04e458fae3bbc7a1c2a6
\ No newline at end of file
diff --git a/LayoutTests/editing/deleting/smart-delete-003-expected.png b/LayoutTests/editing/deleting/smart-delete-003-expected.png
new file mode 100644 (file)
index 0000000..3770b41
Binary files /dev/null and b/LayoutTests/editing/deleting/smart-delete-003-expected.png differ
diff --git a/LayoutTests/editing/deleting/smart-delete-003-expected.txt b/LayoutTests/editing/deleting/smart-delete-003-expected.txt
new file mode 100644 (file)
index 0000000..f83c73a
--- /dev/null
@@ -0,0 +1,25 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > 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: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+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 {P} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 768x36
+          text run at (0,0) width 392: "This tests deleting a selection created with a word granularity. "
+          text run at (392,0) width 348: "To run it manually, double click on 'bar' and hit delete. "
+          text run at (740,0) width 28: "You"
+          text run at (0,18) width 125: "should see 'foo bar'."
+      RenderBlock {DIV} at (0,52) size 784x18
+        RenderText {#text} at (0,0) size 47x18
+          text run at (0,0) width 47: "foo baz"
+caret: position 3 of child 0 {#text} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/deleting/smart-delete-003.html b/LayoutTests/editing/deleting/smart-delete-003.html
new file mode 100644 (file)
index 0000000..2b71d7d
--- /dev/null
@@ -0,0 +1,19 @@
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+<p>This tests deleting a selection created with a word granularity.  To run it manually, double click on 'bar' and hit delete.  You should see 'foo bar'.</p>
+<div id="div" contenteditable="true">foo bar baz</div>
+
+<script>
+if (window.layoutTestController) {
+    var div = document.getElementById("div");
+    var sel = window.getSelection();
+    
+    sel.setPosition(div, 0);
+    sel.modify("move", "forward", "word");
+    sel.modify("move", "forward", "word");
+    sel.modify("extend", "backward", "word");
+    textInputController.doCommand("deleteBackward:");
+}
+</script>
diff --git a/LayoutTests/editing/deleting/smart-delete-004-expected.checksum b/LayoutTests/editing/deleting/smart-delete-004-expected.checksum
new file mode 100644 (file)
index 0000000..99219f4
--- /dev/null
@@ -0,0 +1 @@
+cdfd56093cf3801b073bd1297242add8
\ No newline at end of file
diff --git a/LayoutTests/editing/deleting/smart-delete-004-expected.png b/LayoutTests/editing/deleting/smart-delete-004-expected.png
new file mode 100644 (file)
index 0000000..789abfe
Binary files /dev/null and b/LayoutTests/editing/deleting/smart-delete-004-expected.png differ
diff --git a/LayoutTests/editing/deleting/smart-delete-004-expected.txt b/LayoutTests/editing/deleting/smart-delete-004-expected.txt
new file mode 100644 (file)
index 0000000..fd10089
--- /dev/null
@@ -0,0 +1,25 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > 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: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+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 {P} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 745x36
+          text run at (0,0) width 392: "This tests deleting a selection created with a word granularity. "
+          text run at (392,0) width 353: "To run it manually, double click on 'bar' and hit forward"
+          text run at (0,18) width 45: "delete. "
+          text run at (45,18) width 157: "You should see 'foo bar'."
+      RenderBlock {DIV} at (0,52) size 784x18
+        RenderText {#text} at (0,0) size 47x18
+          text run at (0,0) width 47: "foo baz"
+caret: position 3 of child 0 {#text} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/deleting/smart-delete-004.html b/LayoutTests/editing/deleting/smart-delete-004.html
new file mode 100644 (file)
index 0000000..49ec7e4
--- /dev/null
@@ -0,0 +1,19 @@
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+<p>This tests deleting a selection created with a word granularity.  To run it manually, double click on 'bar' and hit forward delete.  You should see 'foo bar'.</p>
+<div id="div" contenteditable="true">foo bar baz</div>
+
+<script>
+if (window.layoutTestController) {
+    var div = document.getElementById("div");
+    var sel = window.getSelection();
+    
+    sel.setPosition(div, 0);
+    sel.modify("move", "forward", "word");
+    sel.modify("move", "forward", "word");
+    sel.modify("extend", "backward", "word");
+    textInputController.doCommand("deleteForward:");
+}
+</script>
diff --git a/LayoutTests/editing/execCommand/nsresponder-indent-expected.checksum b/LayoutTests/editing/execCommand/nsresponder-indent-expected.checksum
new file mode 100644 (file)
index 0000000..6ca0b00
--- /dev/null
@@ -0,0 +1 @@
+fba0893b2523ed8a9b24017cf5bac404
\ No newline at end of file
diff --git a/LayoutTests/editing/execCommand/nsresponder-indent-expected.png b/LayoutTests/editing/execCommand/nsresponder-indent-expected.png
new file mode 100644 (file)
index 0000000..4218c45
Binary files /dev/null and b/LayoutTests/editing/execCommand/nsresponder-indent-expected.png differ
diff --git a/LayoutTests/editing/execCommand/nsresponder-indent-expected.txt b/LayoutTests/editing/execCommand/nsresponder-indent-expected.txt
new file mode 100644 (file)
index 0000000..7cfd34c
--- /dev/null
@@ -0,0 +1,22 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of BLOCKQUOTE > DIV > BODY > HTML > #document to 0 of BLOCKQUOTE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+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 {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 534x18
+          text run at (0,0) width 281: "This tests the NSResponder method indent:. "
+          text run at (281,0) width 253: "You should see an indented 'foo' below."
+      RenderBlock {DIV} at (0,34) size 784x18
+        RenderBlock {BLOCKQUOTE} at (40,0) size 744x18
+          RenderText {#text} at (0,0) size 21x18
+            text run at (0,0) width 21: "foo"
+        RenderBlock (anonymous) at (0,18) size 784x0
+caret: position 0 of child 0 {#text} of child 0 {BLOCKQUOTE} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/execCommand/nsresponder-indent.html b/LayoutTests/editing/execCommand/nsresponder-indent.html
new file mode 100644 (file)
index 0000000..9ec1a1c
--- /dev/null
@@ -0,0 +1,15 @@
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+<p>This tests the NSResponder method indent:.  You should see an indented 'foo' below.</p>
+<div id="div" contenteditable="true">foo</div>
+
+<script>
+var div = document.getElementById("div");
+var sel = window.getSelection();
+
+sel.setPosition(div, 0);
+
+textInputController.doCommand("indent:");
+</script>
diff --git a/LayoutTests/editing/execCommand/nsresponder-outdent-expected.checksum b/LayoutTests/editing/execCommand/nsresponder-outdent-expected.checksum
new file mode 100644 (file)
index 0000000..3c82a36
--- /dev/null
@@ -0,0 +1 @@
+329d267e85ae206c3393388f31efbd4b
\ No newline at end of file
diff --git a/LayoutTests/editing/execCommand/nsresponder-outdent-expected.png b/LayoutTests/editing/execCommand/nsresponder-outdent-expected.png
new file mode 100644 (file)
index 0000000..019cd75
Binary files /dev/null and b/LayoutTests/editing/execCommand/nsresponder-outdent-expected.png differ
diff --git a/LayoutTests/editing/execCommand/nsresponder-outdent-expected.txt b/LayoutTests/editing/execCommand/nsresponder-outdent-expected.txt
new file mode 100644 (file)
index 0000000..dba5d30
--- /dev/null
@@ -0,0 +1,20 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) 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
+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 {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 453x18
+          text run at (0,0) width 196: "This tests the outdent: method. "
+          text run at (196,0) width 257: "You should see an undented 'foo' below."
+      RenderBlock {DIV} at (0,34) size 784x18
+        RenderText {#text} at (0,0) size 21x18
+          text run at (0,0) width 21: "foo"
+caret: position 0 of child 0 {#text} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/execCommand/nsresponder-outdent.html b/LayoutTests/editing/execCommand/nsresponder-outdent.html
new file mode 100644 (file)
index 0000000..bf53fe7
--- /dev/null
@@ -0,0 +1,15 @@
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+<p>This tests the outdent: method.  You should see an undented 'foo' below.</p>
+<div id="div" contenteditable="true"><blockquote class="webkit-indent-blockquote">foo</blockquote></div>
+
+<script>
+var div = document.getElementById("div");
+var sel = window.getSelection();
+
+sel.setPosition(div, 0);
+
+textInputController.doCommand("outdent:");
+</script>
diff --git a/LayoutTests/editing/selection/4947387-expected.checksum b/LayoutTests/editing/selection/4947387-expected.checksum
new file mode 100644 (file)
index 0000000..ad5bddc
--- /dev/null
@@ -0,0 +1 @@
+3451d74b46b0f16238b744cd22cff204
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/4947387-expected.png b/LayoutTests/editing/selection/4947387-expected.png
new file mode 100644 (file)
index 0000000..5fb36bd
Binary files /dev/null and b/LayoutTests/editing/selection/4947387-expected.png differ
diff --git a/LayoutTests/editing/selection/4947387-expected.txt b/LayoutTests/editing/selection/4947387-expected.txt
new file mode 100644 (file)
index 0000000..199e0b2
--- /dev/null
@@ -0,0 +1,34 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 51 of #text > DIV > BODY > HTML > #document to 51 of #text > DIV > BODY > HTML > #document toDOMRange:range from 27 of #text > DIV > BODY > HTML > #document to 51 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 27 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 51 of #text > DIV > BODY > HTML > #document to 51 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 51 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 51 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+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 {P} at (0,0) size 784x72
+        RenderText {#text} at (0,0) size 775x72
+          text run at (0,0) width 419: "This tests moveTo{Beginning, End}OfLineAndModifySelection. "
+          text run at (419,0) width 343: "It should operate on line boundaries and not paragraph"
+          text run at (0,18) width 77: "boundaries. "
+          text run at (77,18) width 684: "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 606: "Arrow, the selection should extend to the start/end of the line, not the start/end of the paragraph. "
+          text run at (606,36) width 169: "Also, moveTo{Beginning,"
+          text run at (0,54) width 335: "End}OfParagraphAndModifySelection should work."
+      RenderBlock {DIV} at (0,88) size 200x36
+        RenderText {#text} at (0,0) size 189x36
+          text run at (0,0) width 189: "The quick brown fox jumped "
+          text run at (0,18) width 158: "over the lazy brown dog."
+selection start: position 0 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
+selection end:   position 51 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/selection/4947387.html b/LayoutTests/editing/selection/4947387.html
new file mode 100644 (file)
index 0000000..0f0c84f
--- /dev/null
@@ -0,0 +1,26 @@
+<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.layoutTestController) {
+
+    window.layoutTestController.dumpEditingCallbacks();
+    
+    var div = document.getElementById("div");
+    var text = div.firstChild;
+    var sel = window.getSelection();
+    
+    sel.setPosition(text, text.length);
+    textInputController.doCommand("moveToBeginningOfLineAndModifySelection:");
+    
+    sel.setPosition(text, 0);
+    textInputController.doCommand("moveToEndOfLineAndModifySelection:");
+
+    sel.setPosition(text, text.length);
+    textInputController.doCommand("moveToBeginningOfParagraphAndModifySelection:");
+    
+    sel.setPosition(text, 0);
+    textInputController.doCommand("moveToEndOfParagraphAndModifySelection:");
+}
+</script>
diff --git a/LayoutTests/editing/selection/5195166-1-expected.checksum b/LayoutTests/editing/selection/5195166-1-expected.checksum
new file mode 100644 (file)
index 0000000..088c736
--- /dev/null
@@ -0,0 +1 @@
+8366adb955f518dbe02cbc0650a093ee
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/5195166-1-expected.png b/LayoutTests/editing/selection/5195166-1-expected.png
new file mode 100644 (file)
index 0000000..d5a0920
Binary files /dev/null and b/LayoutTests/editing/selection/5195166-1-expected.png differ
diff --git a/LayoutTests/editing/selection/5195166-1-expected.txt b/LayoutTests/editing/selection/5195166-1-expected.txt
new file mode 100644 (file)
index 0000000..ec59e66
--- /dev/null
@@ -0,0 +1,18 @@
+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 784x576
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 704x18
+          text run at (0,0) width 704: "This tests for a bug where extending a selection created with the mouse would blow it away before extending it."
+      RenderBlock {DIV} at (0,34) size 784x18
+        RenderText {#text} at (0,0) size 355x18
+          text run at (0,0) width 355: "There should be five characters selected in this sentence."
+      RenderBlock {UL} at (0,68) size 784x18
+        RenderListItem {LI} at (40,0) size 744x18
+          RenderListMarker at (-17,0) size 7x18: bullet
+          RenderText {#text} at (0,0) size 50x18
+            text run at (0,0) width 50: "Success"
+selection start: position 3 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
+selection end:   position 9 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/selection/5195166-1.html b/LayoutTests/editing/selection/5195166-1.html
new file mode 100644 (file)
index 0000000..b4398ee
--- /dev/null
@@ -0,0 +1,31 @@
+<p>This tests for a bug where extending a selection created with the mouse would blow it away before extending it.</p>
+<div id="div" contenteditable="true">There should be five characters selected in this sentence.</div>
+<ul id="console"></ul>
+<script>
+function log(str) {
+    console = document.getElementById("console");
+    li = document.createElement("li");
+    text = document.createTextNode(str);
+    console.appendChild(li);
+    li.appendChild(text);
+}
+if (window.layoutTestController) {
+    var text = document.getElementById("div").firstChild;
+    var selection = window.getSelection();
+    
+    // FIXME: m_lastChangeWasHorizontalExtension isn't cleared in several places
+    // where it should be, when opening a new document for example.
+    selection.setPosition(text, 0);
+    selection.modify("move", "forward", "character");
+    
+    selection.setBaseAndExtent(text, 3 + 5, text, 3);
+    // Extending this 5 character selection will select 6 characters.
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    // Extending it in this way flips the base and the extent.
+    if (selection.extentOffset - selection.baseOffset != 6)
+        log("Failure: Selection isn't the right size.");
+    else
+        log ("Success");
+} else
+    log ("Failure: This test cannot be run manually.")
+</script>
diff --git a/LayoutTests/editing/selection/5195166-2-expected.checksum b/LayoutTests/editing/selection/5195166-2-expected.checksum
new file mode 100644 (file)
index 0000000..804158b
--- /dev/null
@@ -0,0 +1 @@
+d37efd722d6c73128dc4d9537b9ded16
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/5195166-2-expected.png b/LayoutTests/editing/selection/5195166-2-expected.png
new file mode 100644 (file)
index 0000000..a7b7358
Binary files /dev/null and b/LayoutTests/editing/selection/5195166-2-expected.png differ
diff --git a/LayoutTests/editing/selection/5195166-2-expected.txt b/LayoutTests/editing/selection/5195166-2-expected.txt
new file mode 100644 (file)
index 0000000..485c9a0
--- /dev/null
@@ -0,0 +1,25 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+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 784x576
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 653x18
+          text run at (0,0) width 653: "This tests for a bug where selection change notifications would post the wrong proposed selected range."
+      RenderBlock {DIV} at (0,34) size 784x18
+        RenderText {#text} at (0,0) size 355x18
+          text run at (0,0) width 355: "There should be five characters selected in this sentence."
+      RenderBlock {UL} at (0,68) size 784x0
+selection start: position 0 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
+selection end:   position 2 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/selection/5195166-2.html b/LayoutTests/editing/selection/5195166-2.html
new file mode 100644 (file)
index 0000000..a8eb6ae
--- /dev/null
@@ -0,0 +1,25 @@
+<p>This tests for a bug where selection change notifications would post the wrong proposed selected range.</p>
+<div id="div" contenteditable="true">There should be five characters selected in this sentence.</div>
+<ul id="console"></ul>
+<script>
+function log(str) {
+    console = document.getElementById("console");
+    li = document.createElement("li");
+    text = document.createTextNode(str);
+    console.appendChild(li);
+    li.appendChild(text);
+}
+if (window.layoutTestController) {
+    window.layoutTestController.dumpEditingCallbacks();
+    var text = document.getElementById("div").firstChild;
+    var selection = window.getSelection();
+    selection.setBaseAndExtent(text, 0, text, 0);
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveBackwardAndModifySelection:");
+} else {
+    log("Failure: This test cannot be run manually.")
+}
+
+</script>
diff --git a/LayoutTests/editing/selection/select-line-expected.txt b/LayoutTests/editing/selection/select-line-expected.txt
new file mode 100644 (file)
index 0000000..38cc39f
--- /dev/null
@@ -0,0 +1,3 @@
+This tests for a crash when performing selectLine: inside an empty editable div. It cannot be run manually.
+
+
diff --git a/LayoutTests/editing/selection/select-line.html b/LayoutTests/editing/selection/select-line.html
new file mode 100644 (file)
index 0000000..2d10391
--- /dev/null
@@ -0,0 +1,14 @@
+<p>This tests for a crash when performing selectLine: inside an empty editable div.  It cannot be run manually.</p>
+<div id="div" contenteditable="true"></div>
+
+<script>
+if (window.layoutTestController)
+    window.layoutTestController.dumpAsText();
+    
+var div = document.getElementById("div");
+var sel = window.getSelection();
+
+sel.setPosition(div, 0);
+if (window.layoutTestController)
+    textInputController.doCommand("selectLine:");
+</script>
diff --git a/LayoutTests/editing/selection/selection-actions-expected.checksum b/LayoutTests/editing/selection/selection-actions-expected.checksum
new file mode 100644 (file)
index 0000000..8604393
--- /dev/null
@@ -0,0 +1 @@
+e043a04fd8ea67200a830d7ba2ecba8d
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/selection-actions-expected.png b/LayoutTests/editing/selection/selection-actions-expected.png
new file mode 100644 (file)
index 0000000..29e3b1b
Binary files /dev/null and b/LayoutTests/editing/selection/selection-actions-expected.png differ
diff --git a/LayoutTests/editing/selection/selection-actions-expected.txt b/LayoutTests/editing/selection/selection-actions-expected.txt
new file mode 100644 (file)
index 0000000..277e0fe
--- /dev/null
@@ -0,0 +1,41 @@
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 15 of #text > BODY > HTML > #document to 15 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > BODY > HTML > #document to 15 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 4 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > BODY > HTML > #document to 4 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 8 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+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
+      RenderText {#text} at (0,0) size 772x36
+        text run at (0,0) width 772: "This tests whether certain NSResponder methods that should only operate on editable regions modify a selection that is not"
+        text run at (0,18) width 132: "in an editable region."
+      RenderBR {BR} at (132,32) size 0x0
+      RenderText {#text} at (0,36) size 84x18
+        text run at (0,36) width 84: "This is a para"
+      RenderInline {SPAN} at (0,0) size 8x18 [color=#0000FF]
+        RenderText {#text} at (84,36) size 8x18
+          text run at (84,36) width 8: "g"
+      RenderText {#text} at (92,36) size 32x18
+        text run at (92,36) width 32: "raph."
+      RenderBR {BR} at (124,50) size 0x0
+      RenderText {#text} at (0,54) size 63x18
+        text run at (0,54) width 63: "Some text"
+      RenderBR {BR} at (63,68) size 0x0
+      RenderText {#text} at (0,72) size 63x18
+        text run at (0,72) width 63: "Some text"
+      RenderBR {BR} at (63,86) size 0x0
+      RenderText {#text} at (0,90) size 63x18
+        text run at (0,90) width 63: "Some text"
+      RenderBR {BR} at (63,104) size 0x0
+      RenderText {#text} at (0,108) size 63x18
+        text run at (0,108) width 63: "Some text"
+      RenderBR {BR} at (63,122) size 0x0
+      RenderText {#text} at (0,126) size 124x18
+        text run at (0,126) width 124: "This is a paragraph."
+      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 0x0
+selection start: position 11 of child 2 {#text} of child 1 {BODY} of child 0 {HTML} of document
+selection end:   position 1 of child 7 {BR} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/selection/selection-actions.html b/LayoutTests/editing/selection/selection-actions.html
new file mode 100644 (file)
index 0000000..affedaa
--- /dev/null
@@ -0,0 +1,73 @@
+<html> 
+<head>
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+
+
+<script>
+
+function editingTest() {
+    var start = document.getElementById("start");
+    
+    x = start.offsetLeft + 2;
+    y = start.offsetTop + 2;
+    
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+    eventSender.mouseDown();
+    
+    y = y + 30;
+    
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseUp();
+    
+    textInputController.doCommand("moveBackward:");
+    textInputController.doCommand("moveBackwardAndModifySelection:");
+    textInputController.doCommand("moveDown:");
+    textInputController.doCommand("moveDownAndModifySelection:");
+    textInputController.doCommand("moveForward:");
+    textInputController.doCommand("moveForwardAndModifySelection:");
+    textInputController.doCommand("moveLeft:");
+    textInputController.doCommand("moveLeftAndModifySelection:");
+    textInputController.doCommand("moveRight:");
+    textInputController.doCommand("moveRightAndModifySelection:");
+    textInputController.doCommand("moveToBeginningOfDocument:");
+    textInputController.doCommand("moveToBeginningOfLine:");
+    textInputController.doCommand("moveToBeginningOfParagraph:");
+    textInputController.doCommand("moveToEndOfDocument:");
+    textInputController.doCommand("moveToEndOfLine:");
+    textInputController.doCommand("moveToEndOfParagraph:");
+    textInputController.doCommand("moveUp:");
+    textInputController.doCommand("moveUpAndModifySelection:");
+    textInputController.doCommand("moveWordBackward:");
+    textInputController.doCommand("moveWordBackwardAndModifySelection:");
+    textInputController.doCommand("moveWordForward:");
+    textInputController.doCommand("moveWordForwardAndModifySelection:");
+    textInputController.doCommand("moveWordLeft:");
+    textInputController.doCommand("moveWordRight:");
+    textInputController.doCommand("moveWordRightAndModifySelection:");
+    textInputController.doCommand("moveWordLeftAndModifySelection:");
+    textInputController.doCommand("pageDown:");
+    textInputController.doCommand("pageUp:");
+    textInputController.doCommand("selectLine:");
+    textInputController.doCommand("selectParagraph:");
+    textInputController.doCommand("selectWord:");
+}
+
+</script>
+</head>
+<body style="overflow:hidden">
+This tests whether certain NSResponder methods that should only operate on editable regions modify a selection that is not in an editable region.<br>
+This is a para<span style="color:blue;" id="start">g</span>raph.<br>
+Some text<br>
+Some text<br>
+Some text<br>
+Some text<br>
+This is a paragraph.
+<script>
+editingTest();
+</script>
+</html>
index 3544d6f..3f95f52 100644 (file)
@@ -467,6 +467,20 @@ http/tests/security/cross-frame-access-put.html
 #rdar://problem/5410959 editing/selection/drag-to-contenteditable-iframe.html fails on Windows
 editing/selection/drag-to-contenteditable-iframe.html
 
+
+# <rdar://problem/5463489> 
+editing/deleting/5300379.html
+editing/deleting/delete-to-end-of-paragraph.html
+editing/deleting/smart-delete-003.html
+editing/deleting/smart-delete-004.html
+editing/execCommand/nsresponder-indent.html
+editing/execCommand/nsresponder-outdent.html
+editing/selection/4947387.html
+editing/selection/5195166-1.html
+editing/selection/5195166-2.html
+editing/selection/select-line.html
+editing/selection/selection-actions.html
+
 ################################################################################
 ####################### No bugs filed about the below yet#######################
 ################################################################################