Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Issue 2221783004: TypingCommand should not cancel previous spellcheck request if no new request in initiated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
index 0fa676f5dbdae622c1896308d4417bb0f120b0f0..603360f1b57fbef4a71eef5f40254f048ab97e75 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -352,6 +352,8 @@ void SpellChecker::markMisspellingsAfterLineBreak(const VisibleSelection& wordSe
if (!isContinuousSpellCheckingEnabled())
return;
+ m_spellCheckRequester->cancelCheck();
+
VisibleSelection wholeParagraph(
startOfParagraph(wordSelection.visibleStart()),
endOfParagraph(wordSelection.visibleEnd()));
@@ -367,6 +369,8 @@ void SpellChecker::markMisspellingsAfterTypingToWord(const VisiblePosition &word
TRACE_EVENT0("blink", "SpellChecker::markMisspellingsAfterTypingToWord");
if (unifiedTextCheckerEnabled()) {
+ m_spellCheckRequester->cancelCheck();
+
VisibleSelection adjacentWords = VisibleSelection(startOfWord(wordStart, LeftWordIfOnBoundary), endOfWord(wordStart, RightWordIfOnBoundary));
VisibleSelection selectedSentence = VisibleSelection(startOfSentence(wordStart), endOfSentence(wordStart));
markAllMisspellingsAndBadGrammarInRanges(adjacentWords.toNormalizedEphemeralRange(), selectedSentence.toNormalizedEphemeralRange());
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698