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

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

Issue 544083002: Avoid allocating temporary ranges in connection with text and character iterators. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments. Created 6 years, 3 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
« no previous file with comments | « Source/core/editing/PlainTextRange.cpp ('k') | Source/core/editing/SurroundingText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SpellChecker.cpp
diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp
index 5f9be844eeb8a8b7a85111a8503ef9e49903203f..c6caf4abeb44a6cccd9eb524fa96df4ad2dc5278 100644
--- a/Source/core/editing/SpellChecker.cpp
+++ b/Source/core/editing/SpellChecker.cpp
@@ -251,7 +251,7 @@ void SpellChecker::advanceToNextMisspelling(bool startBeforeSelection)
// Stop looking at start of next misspelled word
CharacterIterator chars(grammarSearchRange.get());
chars.advance(misspellingOffset);
- grammarSearchRange->setEnd(chars.range()->startContainer(), chars.range()->startOffset(), IGNORE_EXCEPTION);
+ grammarSearchRange->setEnd(chars.startContainer(), chars.startOffset(), IGNORE_EXCEPTION);
}
if (isGrammarCheckingEnabled())
@@ -282,7 +282,7 @@ void SpellChecker::advanceToNextMisspelling(bool startBeforeSelection)
// Stop looking at start of next misspelled word
CharacterIterator chars(grammarSearchRange.get());
chars.advance(misspellingOffset);
- grammarSearchRange->setEnd(chars.range()->startContainer(), chars.range()->startOffset(), IGNORE_EXCEPTION);
+ grammarSearchRange->setEnd(chars.startContainer(), chars.startOffset(), IGNORE_EXCEPTION);
}
if (isGrammarCheckingEnabled())
« no previous file with comments | « Source/core/editing/PlainTextRange.cpp ('k') | Source/core/editing/SurroundingText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698