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 56fb4484fd2d59fee560c5a3b2bdab77ad3a53fd..664da652785132d4723d465ec769d1e66b5916de 100644 |
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
@@ -798,7 +798,8 @@ void SpellChecker::didEndEditingOnTextField(Element* e) { |
// Remove markers when deactivating a selection in an <input type="text"/>. |
// Prevent new ones from appearing too. |
- m_spellCheckRequester->cancelCheck(); |
+ if (!RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) |
+ m_spellCheckRequester->cancelCheck(); |
TextControlElement* textControlElement = toTextControlElement(e); |
HTMLElement* innerEditor = textControlElement->innerEditorElement(); |
DocumentMarker::MarkerTypes markerTypes(DocumentMarker::Spelling); |
@@ -1035,6 +1036,9 @@ void SpellChecker::removeMarkers(const VisibleSelection& selection, |
frame().document()->markers().removeMarkers(range, markerTypes); |
} |
+// TODO(xiaochengh): This function is only used by unit tests. We should move it |
+// to IdleSpellCheckCallback and modify unit tests to cope with idle time spell |
+// checker. |
void SpellChecker::cancelCheck() { |
m_spellCheckRequester->cancelCheck(); |
} |
@@ -1045,7 +1049,8 @@ DEFINE_TRACE(SpellChecker) { |
} |
void SpellChecker::prepareForLeakDetection() { |
- m_spellCheckRequester->prepareForLeakDetection(); |
+ if (!RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) |
+ m_spellCheckRequester->prepareForLeakDetection(); |
} |
Vector<TextCheckingResult> SpellChecker::findMisspellings(const String& text) { |