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

Unified Diff: Source/core/editing/SpellChecker.cpp

Issue 330383004: Oilpan: Introduce TempRangeScope to avoid needless Range attaches on Document. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Created 6 years, 6 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
Index: Source/core/editing/SpellChecker.cpp
diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp
index 3253554d87a7d546ca23273e7532bf11eac85f70..988761d4796dee1b5bacc7ae587734c4c17e2654 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)
{
+ TemporaryRangeScope scope;
if (unifiedTextCheckerEnabled()) {
TextCheckingTypeMask textCheckingOptions = 0;
@@ -741,11 +742,14 @@ void SpellChecker::respondToChangedSelection(const VisibleSelection& oldSelectio
spellCheckOldSelection(oldSelection, newAdjacentWords, newSelectedSentence);
}
+
if (textChecker().shouldEraseMarkersAfterChangeSelection(TextCheckingTypeSpelling)) {
+ TemporaryRangeScope scope;
if (RefPtrWillBeRawPtr<Range> wordRange = newAdjacentWords.toNormalizedRange())
m_frame.document()->markers().removeMarkers(wordRange.get(), DocumentMarker::Spelling);
yosin_UTC9 2014/06/25 01:22:20 It seems if we hare removeMakrers() which takes tw
Mads Ager (chromium) 2014/06/25 11:41:42 It would seem so. However, removeMarkers uses a Te
}
if (textChecker().shouldEraseMarkersAfterChangeSelection(TextCheckingTypeGrammar)) {
+ TemporaryRangeScope scope;
yosin_UTC9 2014/06/25 01:22:20 ditto as L747
if (RefPtrWillBeRawPtr<Range> sentenceRange = newSelectedSentence.toNormalizedRange())
m_frame.document()->markers().removeMarkers(sentenceRange.get(), DocumentMarker::Grammar);
}

Powered by Google App Engine
This is Rietveld 408576698