| 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 f13a3b9230f232e3b09b5606ed402ae9a345e741..7e80a6432ab7b6a9fc36e362e3300c959dbaaafe 100644
|
| --- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
|
| @@ -930,8 +930,10 @@ static bool shouldCheckOldSelection(const Position& oldSelectionStart) {
|
| void SpellChecker::respondToChangedSelection(
|
| const Position& oldSelectionStart,
|
| FrameSelection::SetSelectionOptions options) {
|
| - if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
|
| + if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) {
|
| + m_idleSpellCheckCallback->setNeedsInvocation();
|
| return;
|
| + }
|
|
|
| TRACE_EVENT0("blink", "SpellChecker::respondToChangedSelection");
|
| if (!isSpellCheckingEnabledFor(oldSelectionStart))
|
| @@ -975,6 +977,12 @@ void SpellChecker::respondToChangedSelection(
|
| spellCheckOldSelection(oldSelectionStart, newAdjacentWords);
|
| }
|
|
|
| +void SpellChecker::respondToChangedContents(const VisibleSelection& selection) {
|
| + updateMarkersForWordsAffectedByEditing(true);
|
| + if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
|
| + m_idleSpellCheckCallback->setNeedsInvocation();
|
| +}
|
| +
|
| void SpellChecker::removeSpellingMarkers() {
|
| frame().document()->markers().removeMarkers(
|
| DocumentMarker::MisspellingMarkers());
|
| @@ -1108,6 +1116,10 @@ void SpellChecker::cancelCheck() {
|
| m_spellCheckRequester->cancelCheck();
|
| }
|
|
|
| +void SpellChecker::documentAttached(Document* document) {
|
| + m_idleSpellCheckCallback->documentAttached(document);
|
| +}
|
| +
|
| DEFINE_TRACE(SpellChecker) {
|
| visitor->trace(m_frame);
|
| visitor->trace(m_spellCheckRequester);
|
|
|