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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp

Issue 2901213008: Make DocumentMarkerController::Add[Spelling/Grammar]Marker() take EphemeralRange (Closed)
Patch Set: Created 3 years, 7 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: 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 d08c0004b666e728eba26422a4dd7857bd06bea9..250bb769eedab603e3e5e2cd137d38d9a3530c7f 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -305,8 +305,7 @@ void SpellChecker::AdvanceToNextMisspelling(bool start_before_selection) {
.Build());
GetFrame().Selection().RevealSelection();
GetSpellCheckerClient().UpdateSpellingUIWithMisspelledWord(misspelled_word);
- GetFrame().GetDocument()->Markers().AddSpellingMarker(
- misspelling_range.StartPosition(), misspelling_range.EndPosition());
+ GetFrame().GetDocument()->Markers().AddSpellingMarker(misspelling_range);
}
}
@@ -557,15 +556,12 @@ static void AddMarker(Document* document,
}
if (type == DocumentMarker::kSpelling) {
- document->Markers().AddSpellingMarker(range_to_mark.StartPosition(),
- range_to_mark.EndPosition(),
- description);
+ document->Markers().AddSpellingMarker(range_to_mark, description);
return;
}
DCHECK_EQ(type, DocumentMarker::kGrammar);
- document->Markers().AddGrammarMarker(
- range_to_mark.StartPosition(), range_to_mark.EndPosition(), description);
+ document->Markers().AddGrammarMarker(range_to_mark, description);
}
void SpellChecker::MarkAndReplaceFor(

Powered by Google App Engine
This is Rietveld 408576698