Reviewed by Darin.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Aug 2007 22:08:06 +0000 (22:08 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Aug 2007 22:08:06 +0000 (22:08 +0000)
        <rdar://problem/5415006> Command Left in a To Do causes caret to disappear

        * editing/selection/mixed-editability-8.html: Added.
        * editing/selection/mixed-editability-9.html: Added.
        * platform/mac/editing/selection: Added.
        * platform/mac/editing/selection/mixed-editability-8-expected.checksum: Added.
        * platform/mac/editing/selection/mixed-editability-8-expected.png: Added.
        * platform/mac/editing/selection/mixed-editability-8-expected.txt: Added.
        * platform/mac/editing/selection/mixed-editability-9-expected.checksum: Added.
        * platform/mac/editing/selection/mixed-editability-9-expected.png: Added.
        * platform/mac/editing/selection/mixed-editability-9-expected.txt: Added.

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

LayoutTests/ChangeLog
LayoutTests/editing/selection/mixed-editability-8.html [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-9.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.txt [new file with mode: 0644]

index 06101d132771494fe74d2846424c9d83133cc18e..9b8fb7e8d45731f3cb4f4d9d131b7ef0b6c272b3 100644 (file)
@@ -1,3 +1,19 @@
+2007-08-28  David Harrison  <harrison@apple.com>
+
+        Reviewed by Darin.
+
+        <rdar://problem/5415006> Command Left in a To Do causes caret to disappear
+
+        * editing/selection/mixed-editability-8.html: Added.
+        * editing/selection/mixed-editability-9.html: Added.
+        * platform/mac/editing/selection: Added.
+        * platform/mac/editing/selection/mixed-editability-8-expected.checksum: Added.
+        * platform/mac/editing/selection/mixed-editability-8-expected.png: Added.
+        * platform/mac/editing/selection/mixed-editability-8-expected.txt: Added.
+        * platform/mac/editing/selection/mixed-editability-9-expected.checksum: Added.
+        * platform/mac/editing/selection/mixed-editability-9-expected.png: Added.
+        * platform/mac/editing/selection/mixed-editability-9-expected.txt: Added.
+
 2007-08-28  Anders Carlsson  <andersca@apple.com>
 
         Use the correct test paths.
diff --git a/LayoutTests/editing/selection/mixed-editability-8.html b/LayoutTests/editing/selection/mixed-editability-8.html
new file mode 100644 (file)
index 0000000..d21c21b
--- /dev/null
@@ -0,0 +1,21 @@
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+<p>This tests moving the caret backward through content of mixed editability. The caret should end up back at the start of the editable text inside the table.</p>
+
+<div contenteditable="true">
+editable
+<table border="1" contenteditable="false"><tbody><tr><td><div style="display:inline-block; "><span>static</span><span id="test" contenteditable="plaintext-only">editable</span></div></td></tr></tbody></table>
+editable
+</div>
+
+<script>
+var e = document.getElementById("test");
+var s = window.getSelection();
+
+s.setPosition(e, 0);
+s.modify("move", "forward", "character");
+
+s.modify("move", "backward", "word");
+</script>
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/mixed-editability-9.html b/LayoutTests/editing/selection/mixed-editability-9.html
new file mode 100644 (file)
index 0000000..42a0461
--- /dev/null
@@ -0,0 +1,21 @@
+<script>
+if (window.layoutTestController)
+     layoutTestController.dumpEditingCallbacks();
+</script>
+<p>This tests moving the caret backward through content of mixed editability. The caret should back to just before the outlined table.</p>
+
+<div contenteditable="true">
+editable
+<table border="1" contenteditable="false"><tbody><tr><td><div style="display:inline-block; "><span>static</span><span id="test" contenteditable="plaintext-only">editable</span></div></td></tr></tbody></table>
+editable
+</div>
+
+<script>
+var e = document.getElementById("test");
+var s = window.getSelection();
+
+s.setPosition(e, 0);
+s.modify("move", "forward", "character");
+
+s.modify("move", "backward", "lineboundary");
+</script>
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.checksum b/LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.checksum
new file mode 100644 (file)
index 0000000..b57f49b
--- /dev/null
@@ -0,0 +1 @@
+90e8d5132a15f0a453721d4b11aaf2e6
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.png b/LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.png
new file mode 100644 (file)
index 0000000..eeb49ae
Binary files /dev/null and b/LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.txt b/LayoutTests/platform/mac/editing/selection/mixed-editability-8-expected.txt
new file mode 100644 (file)
index 0000000..c01b3c9
--- /dev/null
@@ -0,0 +1,33 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of SPAN > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 1 of SPAN > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+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 784x36
+        RenderText {#text} at (0,0) size 765x36
+          text run at (0,0) width 765: "This tests moving the caret backward through content of mixed editability. The caret should end up back at the start of the"
+          text run at (0,18) width 178: "editable text inside the table."
+      RenderBlock {DIV} at (0,52) size 784x64
+        RenderBlock (anonymous) at (0,0) size 784x18
+          RenderText {#text} at (0,0) size 49x18
+            text run at (0,0) width 49: "editable"
+        RenderTable {TABLE} at (0,18) size 91x28 [border: (1px outset #808080)]
+          RenderTableSection {TBODY} at (1,1) size 89x26
+            RenderTableRow {TR} at (0,2) size 89x22
+              RenderTableCell {TD} at (2,2) size 85x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                RenderBlock {DIV} at (2,2) size 81x18
+                  RenderInline {SPAN} at (0,0) size 32x18
+                    RenderText {#text} at (0,0) size 32x18
+                      text run at (0,0) width 32: "static"
+                  RenderInline {SPAN} at (0,0) size 49x18
+                    RenderText {#text} at (32,0) size 49x18
+                      text run at (32,0) width 49: "editable"
+        RenderBlock (anonymous) at (0,46) size 784x18
+          RenderText {#text} at (0,0) size 49x18
+            text run at (0,0) width 49: "editable"
+caret: position 0 of child 0 {#text} of child 1 {SPAN} of child 0 {DIV} of child 0 {TD} of child 0 {TR} of child 0 {TBODY} of child 1 {TABLE} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.checksum b/LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.checksum
new file mode 100644 (file)
index 0000000..cd6577d
--- /dev/null
@@ -0,0 +1 @@
+0bbc1bdc3916696f85a06bb77abfaa08
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.png b/LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.png
new file mode 100644 (file)
index 0000000..f1b6364
Binary files /dev/null and b/LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.txt b/LayoutTests/platform/mac/editing/selection/mixed-editability-9-expected.txt
new file mode 100644 (file)
index 0000000..9bd8501
--- /dev/null
@@ -0,0 +1,37 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of SPAN > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 1 of SPAN > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of SPAN > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 1 of SPAN > DIV > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+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 784x36
+        RenderText {#text} at (0,0) size 774x36
+          text run at (0,0) width 774: "This tests moving the caret backward through content of mixed editability. The caret should back to just before the outlined"
+          text run at (0,18) width 34: "table."
+      RenderBlock {DIV} at (0,52) size 784x64
+        RenderBlock (anonymous) at (0,0) size 784x18
+          RenderText {#text} at (0,0) size 49x18
+            text run at (0,0) width 49: "editable"
+        RenderTable {TABLE} at (0,18) size 91x28 [border: (1px outset #808080)]
+          RenderTableSection {TBODY} at (1,1) size 89x26
+            RenderTableRow {TR} at (0,2) size 89x22
+              RenderTableCell {TD} at (2,2) size 85x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+                RenderBlock {DIV} at (2,2) size 81x18
+                  RenderInline {SPAN} at (0,0) size 32x18
+                    RenderText {#text} at (0,0) size 32x18
+                      text run at (0,0) width 32: "static"
+                  RenderInline {SPAN} at (0,0) size 49x18
+                    RenderText {#text} at (32,0) size 49x18
+                      text run at (32,0) width 49: "editable"
+        RenderBlock (anonymous) at (0,46) size 784x18
+          RenderText {#text} at (0,0) size 49x18
+            text run at (0,0) width 49: "editable"
+caret: position 0 of child 1 {TABLE} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document