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), |