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

Unified Diff: Source/core/editing/SelectionController.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/ReplaceSelectionCommand.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SelectionController.cpp
diff --git a/Source/core/editing/SelectionController.cpp b/Source/core/editing/SelectionController.cpp
index 70903210a4b14c37e4cc36b63ab93b1df40d0551..5480b3f0dc39b4697ba5f126bf489fff68b68490 100644
--- a/Source/core/editing/SelectionController.cpp
+++ b/Source/core/editing/SelectionController.cpp
@@ -226,7 +226,7 @@ void SelectionController::updateSelectionForMouseDragAlgorithm(const HitTestResu
// Special case to limit selection to the containing block for SVG text.
// FIXME: Isn't there a better non-SVG-specific way to do this?
- if (Node* selectionBaseNode = Strategy::selectionBase(newSelection).deprecatedNode()) {
+ if (Node* selectionBaseNode = Strategy::selectionBase(newSelection).anchorNode()) {
if (LayoutObject* selectionBaseLayoutObject = selectionBaseNode->layoutObject()) {
if (selectionBaseLayoutObject->isSVGText()) {
if (target->layoutObject()->containingBlock() != selectionBaseLayoutObject->containingBlock())
@@ -375,7 +375,7 @@ void SelectionController::selectClosestWordOrLinkFromMouseEvent(const MouseEvent
VisibleSelection newSelection;
Element* URLElement = result.hitTestResult().URLElement();
VisiblePosition pos(innerNode->layoutObject()->positionForPoint(result.localPoint()));
- if (pos.isNotNull() && pos.deepEquivalent().deprecatedNode()->isDescendantOf(URLElement))
+ if (pos.isNotNull() && pos.deepEquivalent().anchorNode()->isDescendantOf(URLElement))
newSelection = VisibleSelection::selectionFromContentsOfNode(URLElement);
updateSelectionForMouseDownDispatchingSelectStart(innerNode, expandSelectionToRespectUserSelectAll(innerNode, newSelection), WordGranularity);
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698