Index: Source/core/editing/SpellChecker.cpp |
diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp |
index 3253554d87a7d546ca23273e7532bf11eac85f70..3ad184725ea75070c277a1ddd4f24e6dcb98b5f4 100644 |
--- a/Source/core/editing/SpellChecker.cpp |
+++ b/Source/core/editing/SpellChecker.cpp |
@@ -331,6 +331,7 @@ void SpellChecker::markMisspellingsAndBadGrammar(const VisibleSelection &movingS |
void SpellChecker::markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, const VisibleSelection& selectionAfterTyping) |
{ |
+ TempRangeScope scope; |
if (unifiedTextCheckerEnabled()) { |
TextCheckingTypeMask textCheckingOptions = 0; |
@@ -741,11 +742,14 @@ void SpellChecker::respondToChangedSelection(const VisibleSelection& oldSelectio |
spellCheckOldSelection(oldSelection, newAdjacentWords, newSelectedSentence); |
} |
+ |
if (textChecker().shouldEraseMarkersAfterChangeSelection(TextCheckingTypeSpelling)) { |
+ TempRangeScope scope; |
if (RefPtrWillBeRawPtr<Range> wordRange = newAdjacentWords.toNormalizedRange()) |
m_frame.document()->markers().removeMarkers(wordRange.get(), DocumentMarker::Spelling); |
} |
if (textChecker().shouldEraseMarkersAfterChangeSelection(TextCheckingTypeGrammar)) { |
+ TempRangeScope scope; |
if (RefPtrWillBeRawPtr<Range> sentenceRange = newSelectedSentence.toNormalizedRange()) |
m_frame.document()->markers().removeMarkers(sentenceRange.get(), DocumentMarker::Grammar); |
} |