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

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

Issue 1245843003: [CodeHealth] Use Position::anchorNode instead of deprecatedNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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/SelectionController.cpp ('k') | Source/core/editing/StyledMarkupSerializer.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 36197bb486b0c655bb81b22cd85f6e1f997c6150..d5ccf070b3b8e1ca9357c06fb64d23d5e5f99c9e 100644
--- a/Source/core/editing/SpellChecker.cpp
+++ b/Source/core/editing/SpellChecker.cpp
@@ -174,7 +174,7 @@ void SpellChecker::advanceToNextMisspelling(bool startBeforeSelection)
Range::selectNodeContents(frame().document(), spellingSearchStart, spellingSearchEnd);
bool startedWithSelection = false;
- if (selection.start().deprecatedNode()) {
+ if (selection.start().anchorNode()) {
startedWithSelection = true;
if (startBeforeSelection) {
VisiblePosition start(selection.visibleStart());
@@ -469,7 +469,7 @@ bool SpellChecker::isSpellCheckingEnabledFor(Node* node) const
bool SpellChecker::isSpellCheckingEnabledInFocusedNode() const
{
- return isSpellCheckingEnabledFor(frame().selection().start().deprecatedNode());
+ return isSpellCheckingEnabledFor(frame().selection().start().anchorNode());
}
void SpellChecker::markMisspellings(const VisibleSelection& selection, RefPtrWillBeRawPtr<Range>& firstMisspellingRange)
@@ -872,7 +872,7 @@ static Node* findFirstMarkable(Node* node)
if (node->layoutObject()->isText())
return node;
if (node->layoutObject()->isTextControl())
- node = toLayoutTextControl(node->layoutObject())->textFormControlElement()->visiblePositionForIndex(1).deepEquivalent().deprecatedNode();
+ node = toLayoutTextControl(node->layoutObject())->textFormControlElement()->visiblePositionForIndex(1).deepEquivalent().anchorNode();
else if (node->hasChildren())
node = node->firstChild();
else
@@ -884,7 +884,7 @@ static Node* findFirstMarkable(Node* node)
bool SpellChecker::selectionStartHasMarkerFor(DocumentMarker::MarkerType markerType, int from, int length) const
{
- Node* node = findFirstMarkable(frame().selection().start().deprecatedNode());
+ Node* node = findFirstMarkable(frame().selection().start().anchorNode());
if (!node)
return false;
« no previous file with comments | « Source/core/editing/SelectionController.cpp ('k') | Source/core/editing/StyledMarkupSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698