[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 13:40:21 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 151dc7df85fca826737c5f6cf1ebb60df35a7986
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 23 00:44:18 2010 +0000
2010-09-22 Jia Pu <jpu at apple.com>
Reviewed by Dan Bernstein.
Need to stop autocorrection panel timer when selection changes.
https://bugs.webkit.org/show_bug.cgi?id=46201
<rdar://problem/8441042>
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing): Stop correction timer after editing.
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): When text checking is done for
showing autocorrection panel, we suppress all corrections that are not at the end of
text checking range. So that we don't replace other words while showing correction panel
for the last word.
(WebCore::Editor::stopCorrectionPanelTimer): Stop correction timer.
* editing/Editor.h: Added stopCorrectionPanelTimer() method.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 281f62b..a729781 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-09-22 Jia Pu <jpu at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Need to stop autocorrection panel timer when selection changes.
+ https://bugs.webkit.org/show_bug.cgi?id=46201
+ <rdar://problem/8441042>
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::appliedEditing): Stop correction timer after editing.
+ (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): When text checking is done for
+ showing autocorrection panel, we suppress all corrections that are not at the end of
+ text checking range. So that we don't replace other words while showing correction panel
+ for the last word.
+ (WebCore::Editor::stopCorrectionPanelTimer): Stop correction timer.
+
+ * editing/Editor.h: Added stopCorrectionPanelTimer() method.
+
2010-09-22 Eric Uhrhane <ericu at chromium.org>
Reviewed by Dumitru Daniliuc.
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index f81367e..8224281 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -1010,7 +1010,8 @@ void Editor::appliedEditing(PassRefPtr<EditCommand> cmd)
if (client())
client()->registerCommandForUndo(m_lastEditCommand);
}
- respondToChangedContents(newSelection);
+ respondToChangedContents(newSelection);
+ stopCorrectionPanelTimer();
}
void Editor::unappliedEditing(PassRefPtr<EditCommand> cmd)
@@ -2658,6 +2659,10 @@ void Editor::markAllMisspellingsAndBadGrammarInRanges(TextCheckingOptions textCh
|| result->type == TextCheckingTypeCorrection)) {
// In this case the result range just has to touch the spelling range, so we can handle replacing non-word text such as punctuation.
ASSERT(resultLength > 0 && resultLocation >= 0);
+
+ if (shouldShowCorrectionPanel && resultLocation + resultLength < spellingRangeEndOffset)
+ continue;
+
int replacementLength = result->replacement.length();
bool doReplacement = (replacementLength > 0);
RefPtr<Range> rangeToReplace = TextIterator::subrange(paragraphRange.get(), resultLocation, resultLength);
@@ -2827,6 +2832,13 @@ void Editor::startCorrectionPanelTimer()
#endif
}
+void Editor::stopCorrectionPanelTimer()
+{
+#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
+ m_correctionPanelTimer.stop();
+#endif
+}
+
void Editor::handleCancelOperation()
{
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
diff --git a/WebCore/editing/Editor.h b/WebCore/editing/Editor.h
index ab8ff7d..f167b16 100644
--- a/WebCore/editing/Editor.h
+++ b/WebCore/editing/Editor.h
@@ -402,6 +402,7 @@ private:
void changeSelectionAfterCommand(const VisibleSelection& newSelection, bool closeTyping, bool clearTypingStyle);
void correctionPanelTimerFired(Timer<Editor>*);
Node* findEventTargetFromSelection() const;
+ void stopCorrectionPanelTimer();
};
inline void Editor::setStartNewKillRingSequence(bool flag)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list