[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:39:57 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1f2f811cc80e7d14f0bdae98f9a4230a210978e5
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 15 06:52:54 2010 +0000

    2010-10-14  Jia Pu  <jpu at apple.com>
    
            Reviewed by Adele Peterson.
    
            REGRESSION (r69548): Autocorrections are applied even after typing further characters in the word
            https://bugs.webkit.org/show_bug.cgi?id=47689
            <rdar://problem/8552250>
    
            The test requires using setTimeout(). So we put it in manual-tests.
    
            * editing/Editor.cpp:
            (WebCore::Editor::markMisspellingsAfterTypingToPosition): Relpace release() with clear().
            (WebCore::Editor::startCorrectionPanelTimer): Release previously set correction range before
              start timer for next autocorrection check.
            * manual-tests/autocorrection: Added.
            * manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69841 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 953f1f0..c6abd8f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-10-14  Jia Pu  <jpu at apple.com>
+
+        Reviewed by Adele Peterson.
+
+        REGRESSION (r69548): Autocorrections are applied even after typing further characters in the word
+        https://bugs.webkit.org/show_bug.cgi?id=47689
+        <rdar://problem/8552250>
+
+        The test requires using setTimeout(). So we put it in manual-tests.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::markMisspellingsAfterTypingToPosition): Relpace release() with clear().
+        (WebCore::Editor::startCorrectionPanelTimer): Release previously set correction range before
+          start timer for next autocorrection check.
+        * manual-tests/autocorrection: Added.
+        * manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html: Added.
+
 2010-10-14  Ryosuke Niwa  <rniwa at webkit.org>
 
         Reviewed by Tony Chang and Darin Adler.
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 7ac6532..0b9b9ea 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -2447,7 +2447,7 @@ void Editor::markMisspellingsAfterTypingToPosition(const VisiblePosition &p)
                 }
             }
         }
-        m_rangeToBeReplacedByCorrection.release();
+        m_rangeToBeReplacedByCorrection.clear();
     }
 #endif
 
@@ -2901,8 +2901,10 @@ void Editor::startCorrectionPanelTimer()
 {
 #if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
     static const double correctionPanelTimerInterval = 0.3;
-    if (isAutomaticSpellingCorrectionEnabled())
+    if (isAutomaticSpellingCorrectionEnabled()) {
+        m_rangeToBeReplacedByCorrection.clear();
         m_correctionPanelTimer.startOneShot(correctionPanelTimerInterval);
+    }
 #endif
 }
 
diff --git a/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html b/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html
new file mode 100644
index 0000000..49cbca2
--- /dev/null
+++ b/WebCore/manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html
@@ -0,0 +1,59 @@
+<html>
+<head>
+
+<style>
+.editing {
+    border: 2px solid red;
+    padding: 12px;
+    font-size: 24px;
+}
+</style>
+<script src=../../../LayoutTests/editing/editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+ if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
+
+function keepTyping() {
+    typeCharacterCommand('i');
+    typeCharacterCommand('n');
+    typeCharacterCommand('g');
+    typeCharacterCommand(' ');
+    if (window.layoutTestController)
+            layoutTestController.notifyDone();
+}
+
+function editingTest() {
+    typeCharacterCommand('t');
+    typeCharacterCommand('h');
+    typeCharacterCommand('e');
+    typeCharacterCommand(' ');
+    typeCharacterCommand('c');
+    typeCharacterCommand('o');
+    typeCharacterCommand('l');
+    typeCharacterCommand('l');
+    typeCharacterCommand('a');
+    typeCharacterCommand('p');
+    typeCharacterCommand('s');
+    setTimeout("keepTyping()", 1000);
+}
+
+</script>
+
+<title>Autocorrection Cancellation Test</title>
+</head>
+<body>
+<div>This test verifies that continuing typing dismisses autocorrection panel that has been previously 
+shown. You should see phrase 'the notational', in which the word 'notational' has blue underline.</div>
+<p  style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'collapse' as the correct spelling of 'collaps' several times, the spell checker will not provide 'collapse' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.</p>
+<div contenteditable id="root" class="editing">
+<span id="test"></span>
+</div>
+
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list