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

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

Issue 2248413003: Stop SpellCheckRequest from checking canCheckAsynchronously() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SpellCheckerDebugInfo
Patch Set: Removed rebaselining of the unrelated test 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/spellcheck/SpellChecker.h ('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 1badfdaa00f9e0f51047d330ce338a8477a2cf8d..17fa86ca749289960124956ac3076caf3eb2891b 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -387,7 +387,7 @@ void SpellChecker::markMisspellingsAfterTypingToWord(const VisiblePosition &word
markMisspellingsAndBadGrammar(adjacentWords);
}
-bool SpellChecker::isSpellCheckingEnabledFor(Node* node) const
+bool SpellChecker::isSpellCheckingEnabledFor(const Node* node) const
{
if (!node)
return false;
@@ -833,6 +833,8 @@ void SpellChecker::cancelCheck()
void SpellChecker::requestTextChecking(const Element& element)
{
+ if (!isSpellCheckingEnabledFor(&element))
+ return;
const EphemeralRange rangeToCheck = EphemeralRange::rangeOfContents(element);
m_spellCheckRequester->requestCheckingFor(SpellCheckRequest::create(TextCheckingProcessBatch, rangeToCheck));
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698