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

Unified Diff: Source/core/editing/Editor.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/EditingStyle.cpp ('k') | Source/core/editing/FormatBlockCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Editor.cpp
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index 95b97de5fffb6f46842b50387c23b14ac6db2b07..c2343d4db19318adcba527329947762959265ca7 100644
--- a/Source/core/editing/Editor.cpp
+++ b/Source/core/editing/Editor.cpp
@@ -258,7 +258,7 @@ bool Editor::canDeleteRange(const EphemeralRange& range) const
VisiblePosition start(range.startPosition(), DOWNSTREAM);
VisiblePosition previous = start.previous();
// FIXME: We sometimes allow deletions at the start of editable roots, like when the caret is in an empty list item.
- if (previous.isNull() || previous.deepEquivalent().deprecatedNode()->rootEditableElement() != startContainer->rootEditableElement())
+ if (previous.isNull() || previous.deepEquivalent().anchorNode()->rootEditableElement() != startContainer->rootEditableElement())
return false;
}
return true;
@@ -543,7 +543,7 @@ void Editor::notifyComponentsOnChangedSelection(const VisibleSelection& oldSelec
void Editor::respondToChangedContents(const VisibleSelection& endingSelection)
{
if (frame().settings() && frame().settings()->accessibilityEnabled()) {
- Node* node = endingSelection.start().deprecatedNode();
+ Node* node = endingSelection.start().anchorNode();
if (AXObjectCache* cache = frame().document()->existingAXObjectCache())
cache->handleEditableTextContentChanged(node);
}
@@ -764,7 +764,7 @@ bool Editor::insertTextWithoutSendingTextEvent(const String& text, bool selectIn
// that is contained in the event target.
selection = selectionForCommand(triggeringEvent);
if (selection.isContentEditable()) {
- if (Node* selectionStart = selection.start().deprecatedNode()) {
+ if (Node* selectionStart = selection.start().anchorNode()) {
RefPtrWillBeRawPtr<Document> document(selectionStart->document());
// Insert the text
« no previous file with comments | « Source/core/editing/EditingStyle.cpp ('k') | Source/core/editing/FormatBlockCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698