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)); |
} |