[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:45:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 55ac1ae2df6da43e1f4010f2343b629816435342
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 19 18:30:00 2010 +0000

    2010-10-19  Jia Pu  <jpu at apple.com>
    
            Reviewed by Adele Peterson.
    
            Moving cursor back to autocorrected word in the same line shouldn't remove the underline
            https://bugs.webkit.org/show_bug.cgi?id=47629
            <rdar://problem/8546758>
    
            * platform/mac-leopard/Skipped: New tests don't apply to this Mac OSX version.
            * platform/mac-snowleopard/Skipped: Ditto.
            * platform/mac-tiger/Skipped: Ditto.
            * platform/mac-wk2/Skipped: Ditto.
            * platform/mac/editing/spelling/autocorrection-delete-expected.checksum:
            * platform/mac/editing/spelling/autocorrection-delete-expected.png:
            * platform/mac/editing/spelling/click-autocorrected-word-expected.checksum: Added.
            * platform/mac/editing/spelling/click-autocorrected-word-expected.png: Added.
            * platform/mac/editing/spelling/click-autocorrected-word-expected.txt: Added.
            * platform/mac/editing/spelling/click-autocorrected-word.html: Added.
            * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.checksum: Added.
            * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png: Added.
            * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt: Added.
            * platform/mac/editing/spelling/delete-into-autocorrected-word.html: Added.
            * platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt: Added.
            * platform/mac/editing/spelling/delete-into-misspelled-word.html: Added.
            * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.checksum: Added.
            * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png: Added.
            * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt: Added.
            * platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html: Added.
            * platform/mac/editing/spelling/move-cursor-around-misspelled-word-expected.txt: Added.
            * platform/mac/editing/spelling/move-cursor-around-misspelled-word.html: Added.
            * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.checksum: Added.
            * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png: Added.
            * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt: Added.
            * platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html: Added.
            * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.checksum: Added.
            * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png: Added.
            * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt: Added.
            * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html: Added.
    2010-10-19  Jia Pu  <jpu at apple.com>
    
            Reviewed by Adele Peterson.
    
            Moving cursor back to autocorrected word in the same line shouldn't remove the underline
            https://bugs.webkit.org/show_bug.cgi?id=47629
            <rdar://problem/8546758>
    
            Tests: platform/mac/editing/spelling/click-autocorrected-word.html
                   platform/mac/editing/spelling/delete-into-autocorrected-word.html
                   platform/mac/editing/spelling/delete-into-misspelled-word.html
                   platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
                   platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
                   platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
                   platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
    
            * editing/Editor.cpp:
            (WebCore::Editor::respondToChangedSelection): Don't remove misspelling or autocorrection
              underlines when cursor is moved onto a word.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70071 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index fbaefae..f864bf6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,42 @@
+2010-10-19  Jia Pu  <jpu at apple.com>
+
+        Reviewed by Adele Peterson.
+
+        Moving cursor back to autocorrected word in the same line shouldn't remove the underline
+        https://bugs.webkit.org/show_bug.cgi?id=47629
+        <rdar://problem/8546758>
+
+        * platform/mac-leopard/Skipped: New tests don't apply to this Mac OSX version.
+        * platform/mac-snowleopard/Skipped: Ditto.
+        * platform/mac-tiger/Skipped: Ditto.
+        * platform/mac-wk2/Skipped: Ditto.
+        * platform/mac/editing/spelling/autocorrection-delete-expected.checksum:
+        * platform/mac/editing/spelling/autocorrection-delete-expected.png:
+        * platform/mac/editing/spelling/click-autocorrected-word-expected.checksum: Added.
+        * platform/mac/editing/spelling/click-autocorrected-word-expected.png: Added.
+        * platform/mac/editing/spelling/click-autocorrected-word-expected.txt: Added.
+        * platform/mac/editing/spelling/click-autocorrected-word.html: Added.
+        * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.checksum: Added.
+        * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png: Added.
+        * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt: Added.
+        * platform/mac/editing/spelling/delete-into-autocorrected-word.html: Added.
+        * platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt: Added.
+        * platform/mac/editing/spelling/delete-into-misspelled-word.html: Added.
+        * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.checksum: Added.
+        * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png: Added.
+        * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt: Added.
+        * platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html: Added.
+        * platform/mac/editing/spelling/move-cursor-around-misspelled-word-expected.txt: Added.
+        * platform/mac/editing/spelling/move-cursor-around-misspelled-word.html: Added.
+        * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.checksum: Added.
+        * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png: Added.
+        * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt: Added.
+        * platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html: Added.
+        * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.checksum: Added.
+        * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png: Added.
+        * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt: Added.
+        * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html: Added.
+
 2010-10-19  Eric Carlson  <eric.carlson at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/mac-leopard/Skipped b/LayoutTests/platform/mac-leopard/Skipped
index 475dffc..3d76eb2 100644
--- a/LayoutTests/platform/mac-leopard/Skipped
+++ b/LayoutTests/platform/mac-leopard/Skipped
@@ -99,3 +99,10 @@ platform/mac/editing/spelling/autocorrection-delete.html
 platform/mac/editing/spelling/autocorrection-removing-underline-after-paste.html
 platform/mac/editing/spelling/autocorrection-removing-underline.html
 platform/mac/editing/spelling/autocorrection-simple.html
+platform/mac/editing/spelling/click-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-misspelled-word.html
+platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
+platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
diff --git a/LayoutTests/platform/mac-snowleopard/Skipped b/LayoutTests/platform/mac-snowleopard/Skipped
index 3ac4593..e1ae38c 100644
--- a/LayoutTests/platform/mac-snowleopard/Skipped
+++ b/LayoutTests/platform/mac-snowleopard/Skipped
@@ -134,3 +134,10 @@ platform/mac/editing/spelling/autocorrection-delete.html
 platform/mac/editing/spelling/autocorrection-removing-underline-after-paste.html
 platform/mac/editing/spelling/autocorrection-removing-underline.html
 platform/mac/editing/spelling/autocorrection-simple.html
+platform/mac/editing/spelling/click-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-misspelled-word.html
+platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
+platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
diff --git a/LayoutTests/platform/mac-tiger/Skipped b/LayoutTests/platform/mac-tiger/Skipped
index 2d0b023..a09713f 100644
--- a/LayoutTests/platform/mac-tiger/Skipped
+++ b/LayoutTests/platform/mac-tiger/Skipped
@@ -209,3 +209,10 @@ platform/mac/editing/spelling/autocorrection-delete.html
 platform/mac/editing/spelling/autocorrection-removing-underline-after-paste.html
 platform/mac/editing/spelling/autocorrection-removing-underline.html
 platform/mac/editing/spelling/autocorrection-simple.html
+platform/mac/editing/spelling/click-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-misspelled-word.html
+platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
+platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 6048c3d..b276b73 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -516,6 +516,13 @@ platform/mac/editing/spelling/autocorrection-delete.html
 platform/mac/editing/spelling/autocorrection-removing-underline-after-paste.html
 platform/mac/editing/spelling/autocorrection-removing-underline.html
 platform/mac/editing/spelling/autocorrection-simple.html
+platform/mac/editing/spelling/click-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-autocorrected-word.html
+platform/mac/editing/spelling/delete-into-misspelled-word.html
+platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
+platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
+platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
 platform/mac/fast/forms/input-appearance-spinbutton-up.html
 platform/mac/fast/forms/input-number-click.html
 platform/mac/fast/forms/listbox-scrollbar-hit-test.html
diff --git a/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.checksum b/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.checksum
index aa0b65c..af08fca 100644
--- a/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.checksum
+++ b/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.checksum
@@ -1 +1 @@
-39685c692f4697ce0b957e38a07a2357
\ No newline at end of file
+a7f7bb68b8cb6b37695a4e7b4f69a847
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.png b/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.png
index 556ed39..ca1293f 100644
Binary files a/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.png and b/LayoutTests/platform/mac/editing/spelling/autocorrection-delete-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.checksum b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.checksum
new file mode 100644
index 0000000..34cdd10
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.checksum
@@ -0,0 +1 @@
+1117257f7c3cbe1004c3a37e3ed3a145
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.png b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.png
new file mode 100644
index 0000000..41f82bc
Binary files /dev/null and b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.txt b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.txt
new file mode 100644
index 0000000..2a98d78
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.txt
@@ -0,0 +1,27 @@
+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 753x36
+          text run at (0,0) width 753: "The test verified that if user clicks a word that is marked as autocorrected, the autocorrection underline will remain. You"
+          text run at (0,18) width 460: "should see phrase \"it's a message\", in which the word 'message' has blue "
+          text run at (460,18) width 63: "underline."
+      RenderBlock {P} at (0,52) size 784x54 [color=#008000]
+        RenderText {#text} at (0,0) size 774x54
+          text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
+          text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
+          text run at (0,18) width 216: "spelling of 'mesage' several times, "
+          text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
+          text run at (0,36) width 185: "all files in ~/Library/Spelling."
+      RenderBlock (anonymous) at (0,122) size 784x140
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,262) size 784x0
+layer at (10,132) size 581x136 clip at (11,133) size 579x134
+  RenderTextControl {TEXTAREA} at (2,2) size 581x136 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+    RenderBlock {DIV} at (3,3) size 575x13
+      RenderText {#text} at (0,0) size 79x13
+        text run at (0,0) width 76: "it's a message"
+        text run at (76,0) width 3: " "
+caret: position 11 of child 0 {#text} of child 0 {DIV} of child 5 {TEXTAREA} of body
diff --git a/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word.html b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word.html
new file mode 100644
index 0000000..b09e7f5
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>The test verified that if user clicks a word that is marked as autocorrected, the autocorrection
+underline will remain. You should see phrase "it's a message", in which the word 'message' has blue 
+underline.</p>
+<p  style="color:green">Note, this test can fail due to user specific spell checking data. 
+If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, 
+the spell checker will not provide 'message' as a suggestion anymore. To fix this,
+remove all files in ~/Library/Spelling.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script language="javascript" type="text/javascript">
+document.getElementById('test').focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand(' ');
+document.getElementById('test').setSelectionRange(10, 10);
+execMoveSelectionForwardByCharacterCommand();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.checksum b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.checksum
new file mode 100644
index 0000000..7b42384
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.checksum
@@ -0,0 +1 @@
+5d660d94c41df047d6f9f60292ff8941
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png
new file mode 100644
index 0000000..b50a8d6
Binary files /dev/null and b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt
new file mode 100644
index 0000000..3faf77a
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt
@@ -0,0 +1,27 @@
+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 770x36
+          text run at (0,0) width 657: "The test verified that if user use delete key to move to the end of a word that is marked as autocorrected, "
+          text run at (657,0) width 113: "the autocorrection"
+          text run at (0,18) width 515: "underline will remain. You should see phrase \"it's a message\", in which the word "
+          text run at (515,18) width 182: "'message' has blue underline."
+      RenderBlock {P} at (0,52) size 784x54 [color=#008000]
+        RenderText {#text} at (0,0) size 774x54
+          text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
+          text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
+          text run at (0,18) width 216: "spelling of 'mesage' several times, "
+          text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
+          text run at (0,36) width 185: "all files in ~/Library/Spelling."
+      RenderBlock (anonymous) at (0,122) size 784x140
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,262) size 784x0
+layer at (10,132) size 581x136 clip at (11,133) size 579x134
+  RenderTextControl {TEXTAREA} at (2,2) size 581x136 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+    RenderBlock {DIV} at (3,3) size 575x13
+      RenderText {#text} at (0,0) size 76x13
+        text run at (0,0) width 76: "it's a message"
+caret: position 14 of child 0 {#text} of child 0 {DIV} of child 5 {TEXTAREA} of body
diff --git a/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word.html b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word.html
new file mode 100644
index 0000000..72aacf3
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word.html
@@ -0,0 +1,35 @@
+<html>
+<head>
+<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>The test verified that if user use delete key to move to the end of a word that is marked as autocorrected, 
+the autocorrection underline will remain. You should see phrase "it's a message", in which the word 
+'message' has blue underline.</p>
+<p  style="color:green">Note, this test can fail due to user specific spell checking data. 
+If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, 
+the spell checker will not provide 'message' as a suggestion anymore. To fix this,
+remove all files in ~/Library/Spelling.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script language="javascript" type="text/javascript">
+document.getElementById('test').focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand(' ');
+execDeleteCommand();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt b/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt
new file mode 100644
index 0000000..28825f4
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word-expected.txt
@@ -0,0 +1,6 @@
+The test verified that if user use delete to move caret to the end, or use forward delete to move caret to the beginning of, a word that is marked as misspelled, the misspell underline will remain. You should see phrase "it's a meagesga", in which the word 'meagesga' has red underline.
+
+
+SUCCESS
+SUCCESS
+
diff --git a/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html b/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html
new file mode 100644
index 0000000..55592a8
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/delete-into-misspelled-word.html
@@ -0,0 +1,57 @@
+<html>
+<head>
+<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>The test verified that if user use delete to move caret to the end, or use forward delete to move
+caret to the beginning of, a word that is marked as misspelled, the misspell underline will remain. 
+You should see phrase "it's a meagesga", in which the word 'meagesga' has red underline.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script language="javascript" type="text/javascript">
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+}
+
+document.getElementById('test').focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('g');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+execDeleteCommand();
+if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
+    if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+        document.getElementById('console').innerHTML = 'SUCCESS<br>';
+    } else {
+        document.getElementById('console').innerHTML = "FAILURE. The word 'meagesga' does not have underline.<br>";
+    }
+}
+
+textarea = document.getElementById('test');
+textarea.setSelectionRange(6, 6);
+textarea.focus();
+typeCharacterCommand(' ');
+execForwardDeleteCommand();
+if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
+    if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
+    } else {
+        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' does not have underline.<br>";
+    }
+}
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.checksum b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.checksum
new file mode 100644
index 0000000..103d71d
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.checksum
@@ -0,0 +1 @@
+b46abf9c2f0904bb283a4293e4736978
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png
new file mode 100644
index 0000000..c842d13
Binary files /dev/null and b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt
new file mode 100644
index 0000000..7f623ad
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt
@@ -0,0 +1,29 @@
+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 784x54
+        RenderText {#text} at (0,0) size 743x54
+          text run at (0,0) width 724: "The test verified that if user use forward delete to move to the beginning of a word that is marked as autocorrected, "
+          text run at (724,0) width 19: "the"
+          text run at (0,18) width 609: "autocorrection underline will remain. You should see phrase \"it's a message\", in which the word "
+          text run at (609,18) width 115: "'message' has blue"
+          text run at (0,36) width 63: "underline."
+      RenderBlock {P} at (0,70) size 784x54 [color=#008000]
+        RenderText {#text} at (0,0) size 774x54
+          text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
+          text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
+          text run at (0,18) width 216: "spelling of 'mesage' several times, "
+          text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
+          text run at (0,36) width 185: "all files in ~/Library/Spelling."
+      RenderBlock (anonymous) at (0,140) size 784x140
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,280) size 784x0
+layer at (10,150) size 581x136 clip at (11,151) size 579x134
+  RenderTextControl {TEXTAREA} at (2,2) size 581x136 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+    RenderBlock {DIV} at (3,3) size 575x13
+      RenderText {#text} at (0,0) size 79x13
+        text run at (0,0) width 76: "it's a message"
+        text run at (76,0) width 3: " "
+caret: position 15 of child 0 {#text} of child 0 {DIV} of child 5 {TEXTAREA} of body
diff --git a/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
new file mode 100644
index 0000000..2b9658a
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
@@ -0,0 +1,37 @@
+<html>
+<head>
+<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>The test verified that if user use forward delete to move to the beginning of a word that is marked as autocorrected, 
+the autocorrection underline will remain. You should see phrase "it's a message", in which the word 
+'message' has blue underline.</p>
+<p  style="color:green">Note, this test can fail due to user specific spell checking data. 
+If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, 
+the spell checker will not provide 'message' as a suggestion anymore. To fix this,
+remove all files in ~/Library/Spelling.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script language="javascript" type="text/javascript">
+textarea = document.getElementById('test');
+textarea.setSelectionRange(6, 6);
+textarea.focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand(' ');
+execForwardDeleteCommand();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-around-misspelled-word-expected.txt b/LayoutTests/platform/mac/editing/spelling/move-cursor-around-misspelled-word-expected.txt
new file mode 100644
index 0000000..b622773
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-around-misspelled-word-expected.txt
@@ -0,0 +1,7 @@
+The test verified that if the caret is move to the beginning, end, and middle of a word that is marked as misspelled, the misspell underline will remain. You should see phrase "it's a meagesga", in which the word 'meagesga' has red underline.
+
+
+SUCCESS
+SUCCESS
+SUCCESS
+
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-around-misspelled-word.html b/LayoutTests/platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
new file mode 100644
index 0000000..01b68c4
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
@@ -0,0 +1,67 @@
+<html>
+<head>
+<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>The test verified that if the caret is move to the beginning, end, and middle of a word that is 
+marked as misspelled, the misspell underline will remain. You should see phrase "it's a meagesga", 
+in which the word 'meagesga' has red underline.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script language="javascript" type="text/javascript">
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+}
+
+document.getElementById('test').focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('g');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+execMoveSelectionBackwardByCharacterCommand();
+    
+if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
+    if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+        document.getElementById('console').innerHTML = 'SUCCESS<br>';
+    } else {
+        document.getElementById('console').innerHTML = "FAILURE. The word 'meagesga' does not have misspell underline.<br>";
+    }
+}
+
+textarea = document.getElementById('test');
+textarea.setSelectionRange(10, 10);
+textarea.focus();
+if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
+    if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
+    } else {
+        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' does not have misspell underline.<br>";
+    }
+}
+
+textarea.setSelectionRange(6, 6);
+textarea.focus();
+execMoveSelectionForwardByCharacterCommand();
+if (window.layoutTestController && window.layoutTestController.hasSpellingMarker) {
+    if (window.layoutTestController.hasSpellingMarker(7,8) == 1) {
+        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + 'SUCCESS<br>';
+    } else {
+        document.getElementById('console').innerHTML = document.getElementById('console').innerHTML + "FAILURE. The word 'meagesga' does not have misspell underline.<br>";
+    }
+}
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.checksum b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.checksum
new file mode 100644
index 0000000..8479b61
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.checksum
@@ -0,0 +1 @@
+17cee3d52b13455af6c00098f03a1385
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png
new file mode 100644
index 0000000..78282d3
Binary files /dev/null and b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt
new file mode 100644
index 0000000..4101e0c
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt
@@ -0,0 +1,28 @@
+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 778x36
+          text run at (0,0) width 602: "The test verified that if user use arrow key to move into a word that is marked as autocorrected, "
+          text run at (602,0) width 176: "the autocorrection underline"
+          text run at (0,18) width 452: "will remain. You should see phrase \"it's a message\", in which the word "
+          text run at (452,18) width 182: "'message' has blue underline."
+      RenderBlock {P} at (0,52) size 784x54 [color=#008000]
+        RenderText {#text} at (0,0) size 774x54
+          text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
+          text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
+          text run at (0,18) width 216: "spelling of 'mesage' several times, "
+          text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
+          text run at (0,36) width 185: "all files in ~/Library/Spelling."
+      RenderBlock (anonymous) at (0,122) size 784x140
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,262) size 784x0
+layer at (10,132) size 581x136 clip at (11,133) size 579x134
+  RenderTextControl {TEXTAREA} at (2,2) size 581x136 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+    RenderBlock {DIV} at (3,3) size 575x13
+      RenderText {#text} at (0,0) size 79x13
+        text run at (0,0) width 76: "it's a message"
+        text run at (76,0) width 3: " "
+caret: position 14 of child 0 {#text} of child 0 {DIV} of child 5 {TEXTAREA} of body
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
new file mode 100644
index 0000000..64a1bee
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
@@ -0,0 +1,35 @@
+<html>
+<head>
+<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>The test verified that if user use arrow key to move into a word that is marked as autocorrected, 
+the autocorrection underline will remain. You should see phrase "it's a message", in which the word 
+'message' has blue underline.</p>
+<p  style="color:green">Note, this test can fail due to user specific spell checking data. 
+If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, 
+the spell checker will not provide 'message' as a suggestion anymore. To fix this,
+remove all files in ~/Library/Spelling.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script language="javascript" type="text/javascript">
+document.getElementById('test').focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand(' ');
+execMoveSelectionBackwardByCharacterCommand();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.checksum b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.checksum
new file mode 100644
index 0000000..a8aeb64
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.checksum
@@ -0,0 +1 @@
+144c4c3f06119dc772094c6d4ec07f45
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png
new file mode 100644
index 0000000..a7ec20e
Binary files /dev/null and b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt
new file mode 100644
index 0000000..b2434b3
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt
@@ -0,0 +1,29 @@
+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 784x54
+        RenderText {#text} at (0,0) size 783x54
+          text run at (0,0) width 589: "The test verified that if user use right arrow key to move caret to the beginning of a word that "
+          text run at (589,0) width 194: "is marked as autocorrected, the"
+          text run at (0,18) width 422: "autocorrection underline will remain. You should see phrase \"it's a "
+          text run at (422,18) width 302: "message\", in which the word 'message' has blue"
+          text run at (0,36) width 63: "underline."
+      RenderBlock {P} at (0,70) size 784x54 [color=#008000]
+        RenderText {#text} at (0,0) size 774x54
+          text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
+          text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
+          text run at (0,18) width 216: "spelling of 'mesage' several times, "
+          text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
+          text run at (0,36) width 185: "all files in ~/Library/Spelling."
+      RenderBlock (anonymous) at (0,140) size 784x140
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,280) size 784x0
+layer at (10,150) size 581x136 clip at (11,151) size 579x134
+  RenderTextControl {TEXTAREA} at (2,2) size 581x136 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+    RenderBlock {DIV} at (3,3) size 575x13
+      RenderText {#text} at (0,0) size 79x13
+        text run at (0,0) width 76: "it's a message"
+        text run at (76,0) width 3: " "
+caret: position 7 of child 0 {#text} of child 0 {DIV} of child 5 {TEXTAREA} of body
diff --git a/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
new file mode 100644
index 0000000..2ddbb41
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>The test verified that if user use right arrow key to move caret to the beginning of a word that 
+is marked as autocorrected, the autocorrection underline will remain. You should see phrase "it's a 
+message", in which the word 'message' has blue underline.</p>
+<p  style="color:green">Note, this test can fail due to user specific spell checking data. 
+If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, 
+the spell checker will not provide 'message' as a suggestion anymore. To fix this,
+remove all files in ~/Library/Spelling.</p>
+<textarea id="test" cols="80" rows="10"></textarea>
+<div id="console"></div>
+<script language="javascript" type="text/javascript">
+document.getElementById('test').focus();
+typeCharacterCommand('i');
+typeCharacterCommand('t');
+typeCharacterCommand('\'');
+typeCharacterCommand('s');
+typeCharacterCommand(' ');
+typeCharacterCommand('a');
+typeCharacterCommand(' ');
+typeCharacterCommand('m');
+typeCharacterCommand('e');
+typeCharacterCommand('s');
+typeCharacterCommand('a');
+typeCharacterCommand('g');
+typeCharacterCommand('e');
+typeCharacterCommand(' ');
+document.getElementById('test').setSelectionRange(6, 6);
+execMoveSelectionForwardByCharacterCommand();
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d52d7d2..5916ac9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-10-19  Jia Pu  <jpu at apple.com>
+
+        Reviewed by Adele Peterson.
+
+        Moving cursor back to autocorrected word in the same line shouldn't remove the underline
+        https://bugs.webkit.org/show_bug.cgi?id=47629
+        <rdar://problem/8546758>
+
+        Tests: platform/mac/editing/spelling/click-autocorrected-word.html
+               platform/mac/editing/spelling/delete-into-autocorrected-word.html
+               platform/mac/editing/spelling/delete-into-misspelled-word.html
+               platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
+               platform/mac/editing/spelling/move-cursor-around-misspelled-word.html
+               platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
+               platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::respondToChangedSelection): Don't remove misspelling or autocorrection
+          underlines when cursor is moved onto a word.
+
 2010-10-19  Eric Carlson  <eric.carlson at apple.com>
 
         Not reviewed. Build fix.
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 9980d67..640e739 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -3609,12 +3609,12 @@ void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, boo
             }
         }
 
+#if PLATFORM(MAC) && (defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD))
         // This only erases markers that are in the first unit (word or sentence) of the selection.
-        // Perhaps peculiar, but it matches AppKit.
-        if (RefPtr<Range> wordRange = newAdjacentWords.toNormalizedRange()) {
+        // Perhaps peculiar, but it matches AppKit on these Mac OSX versions.
+        if (RefPtr<Range> wordRange = newAdjacentWords.toNormalizedRange())
             m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::Spelling);
-            m_frame->document()->markers()->removeMarkers(wordRange.get(), DocumentMarker::CorrectionIndicator);
-        }
+#endif
         if (RefPtr<Range> sentenceRange = newSelectedSentence.toNormalizedRange())
             m_frame->document()->markers()->removeMarkers(sentenceRange.get(), DocumentMarker::Grammar);
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list