 Chromium Code Reviews
 Chromium Code Reviews Issue 330383004:
  Oilpan: Introduce TempRangeScope to avoid needless Range attaches on Document.  (Closed) 
  Base URL: svn://svn.chromium.org/blink/trunk
    
  
    Issue 330383004:
  Oilpan: Introduce TempRangeScope to avoid needless Range attaches on Document.  (Closed) 
  Base URL: svn://svn.chromium.org/blink/trunk| 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); | 
| } |