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

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

Issue 2740873003: Make SpellChecker::removeMarkers() to take EphemeralRange instead of VisibleSelection (Closed)
Patch Set: 2017-03-09T14:47:18 Created 3 years, 9 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 | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a15d95c82de1a0b7577cd488046a7eb5b03aca06..1bb7922fe8f2ec84519561467181a43c7e058540 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp
@@ -185,7 +185,10 @@ void SpellChecker::didBeginEditing(Element* element) {
}
void SpellChecker::ignoreSpelling() {
- removeMarkers(frame().selection().computeVisibleSelectionInDOMTree(),
+ removeMarkers(frame()
+ .selection()
+ .computeVisibleSelectionInDOMTree()
+ .toNormalizedEphemeralRange(),
DocumentMarker::Spelling);
}
@@ -317,7 +320,8 @@ void SpellChecker::showSpellingGuessPanel() {
void SpellChecker::clearMisspellingsForMovingParagraphs(
const VisibleSelection& movingSelection) {
- removeMarkers(movingSelection, DocumentMarker::MisspellingMarkers());
+ removeMarkers(movingSelection.toNormalizedEphemeralRange(),
+ DocumentMarker::MisspellingMarkers());
}
void SpellChecker::markMisspellingsForMovingParagraphs(
@@ -1020,11 +1024,10 @@ bool SpellChecker::selectionStartHasSpellingMarkerFor(int from,
return selectionStartHasMarkerFor(DocumentMarker::Spelling, from, length);
}
-void SpellChecker::removeMarkers(const VisibleSelection& selection,
+void SpellChecker::removeMarkers(const EphemeralRange& range,
DocumentMarker::MarkerTypes markerTypes) {
DCHECK(!frame().document()->needsLayoutTreeUpdate());
- const EphemeralRange& range = selection.toNormalizedEphemeralRange();
if (range.isNull())
return;
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698