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 5d02a29eef8a4e909bef7244b3a3fd83e42f216a..7419642bfc14d95dc7c550cde4374071d5e2d85e 100644 |
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
@@ -710,10 +710,8 @@ void SpellChecker::updateMarkersForWordsAffectedByEditing(bool doNotRemoveIfSele |
// of marker that contains the word in question, and remove marker on that whole range. |
Document* document = frame().document(); |
ASSERT(document); |
- Node* startNode = startOfFirstWord.deepEquivalent().computeContainerNode(); |
- int startOffset = startOfFirstWord.deepEquivalent().computeOffsetInContainerNode(); |
- int endOffset = endOfLastWord.deepEquivalent().computeOffsetInContainerNode(); |
- document->markers().removeMarkers(startNode, startOffset, endOffset - startOffset, DocumentMarker::MisspellingMarkers(), DocumentMarkerController::RemovePartiallyOverlappingMarker); |
+ const EphemeralRange wordRange(startOfFirstWord.deepEquivalent(), endOfLastWord.deepEquivalent()); |
+ document->markers().removeMarkers(wordRange, DocumentMarker::MisspellingMarkers(), DocumentMarkerController::RemovePartiallyOverlappingMarker); |
} |
void SpellChecker::didEndEditingOnTextField(Element* e) |