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 444584d6264a490b8b8483f2cafcc927abd3bc46..89f86731d3aaf003d5e9eb34faa355a18c0d09de 100644 |
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp |
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp |
@@ -353,9 +353,11 @@ void SelectionController::UpdateSelectionForMouseDrag( |
frame_->GetDocument()->UpdateStyleAndLayoutIgnorePendingStylesheets(); |
const PositionWithAffinity& raw_target_position = |
- PositionRespectingEditingBoundary( |
- Selection().ComputeVisibleSelectionInDOMTree().Start(), |
- hit_test_result.LocalPoint(), target); |
+ Selection().SelectionHasFocus() |
+ ? PositionRespectingEditingBoundary( |
+ Selection().ComputeVisibleSelectionInDOMTree().Start(), |
+ hit_test_result.LocalPoint(), target) |
+ : PositionWithAffinity(); |
VisiblePositionInFlatTree target_position = CreateVisiblePosition( |
FromPositionInDOMTree<EditingInFlatTreeStrategy>(raw_target_position)); |
// Don't modify the selection if we're not on a node. |