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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 2432173005: Get rid of VisibleSelection::selectionFromContentsOfNode() (Closed)
Patch Set: 2016-10-20T17:14:18 Created 4 years, 2 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
Index: third_party/WebKit/Source/core/editing/SelectionController.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index 7cadac5b0f79ad42fb52330e9cd4746ed0996b3a..17a932d2feac8e995bbdbde13c306859ea56798d 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -503,9 +503,10 @@ void SelectionController::selectClosestWordOrLinkFromMouseEvent(
const VisiblePositionInFlatTree pos =
visiblePositionOfHitTestResult(result.hitTestResult());
if (pos.isNotNull() &&
- pos.deepEquivalent().anchorNode()->isDescendantOf(URLElement))
- newSelection =
- VisibleSelectionInFlatTree::selectionFromContentsOfNode(URLElement);
+ pos.deepEquivalent().anchorNode()->isDescendantOf(URLElement)) {
+ newSelection = createVisibleSelection(
+ SelectionInFlatTree::Builder().selectAllChildren(*URLElement).build());
+ }
updateSelectionForMouseDownDispatchingSelectStart(
innerNode, expandSelectionToRespectUserSelectAll(innerNode, newSelection),
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | third_party/WebKit/Source/core/editing/SelectionTemplate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698