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

Unified Diff: Source/core/editing/VisibleSelection.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/VisiblePosition.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/VisibleSelection.cpp
diff --git a/Source/core/editing/VisibleSelection.cpp b/Source/core/editing/VisibleSelection.cpp
index 3ea806fa8b614f4e467502c60db6ef0d579c9a4a..9f906dec4cfd69bd984beec8b67c55ab870fd660 100644
--- a/Source/core/editing/VisibleSelection.cpp
+++ b/Source/core/editing/VisibleSelection.cpp
@@ -337,7 +337,7 @@ bool VisibleSelection::expandUsingGranularityInComposedTree(TextGranularity gran
static PassRefPtrWillBeRawPtr<Range> makeSearchRange(const Position& pos)
{
- Node* node = pos.deprecatedNode();
+ Node* node = pos.anchorNode();
if (!node)
return nullptr;
Document& document = node->document();
@@ -494,7 +494,7 @@ void VisibleSelection::setEndRespectingGranularity(TextGranularity granularity,
VisiblePosition wordEnd(endOfWord(originalEnd, side));
VisiblePosition end(wordEnd);
- if (isEndOfParagraph(originalEnd) && !isEmptyTableCell(m_start.deprecatedNode())) {
+ if (isEndOfParagraph(originalEnd) && !isEmptyTableCell(m_start.anchorNode())) {
// Select the paragraph break (the space from the end of a paragraph to the start of
// the next one) to match TextEdit.
end = wordEnd.next();
@@ -1064,7 +1064,7 @@ Element* VisibleSelection::rootEditableElement() const
Node* VisibleSelection::nonBoundaryShadowTreeRootNode() const
{
- return start().deprecatedNode() && !start().deprecatedNode()->isShadowRoot() ? start().deprecatedNode()->nonBoundaryShadowTreeRootNode() : 0;
+ return start().anchorNode() && !start().anchorNode()->isShadowRoot() ? start().anchorNode()->nonBoundaryShadowTreeRootNode() : 0;
}
VisibleSelection::ChangeObserver::ChangeObserver()
« no previous file with comments | « Source/core/editing/VisiblePosition.cpp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698