Index: third_party/WebKit/Source/core/input/EventHandler.cpp |
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp |
index 6dd54001587b8793c2427a3817dc2ad4c4f751d5..dd4dbaaf2b546a0ca3e6365b97dec2e2bb5445bd 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
@@ -410,7 +410,7 @@ WebInputEventResult EventHandler::handleMousePressEvent(const MouseEventWithHitT |
bool singleClick = event.event().clickCount() <= 1; |
- m_mouseDownMayStartDrag = singleClick; |
+ m_mouseDownMayStartDrag = singleClick && !mayBeLinkSelection(event); |
selectionController().handleMousePressEvent(event); |
@@ -951,7 +951,8 @@ OptionalCursor EventHandler::selectAutoCursor(const HitTestResult& result, Node* |
{ |
bool editable = (node && node->hasEditableStyle()); |
- if (useHandCursor(node, result.isOverLink())) |
+ const bool isOverLink = !selectionController().mouseDownMayStartSelect() && result.isOverLink(); |
kotenkov
2016/03/09 17:27:59
This is needed so that there is a beam cursor when
|
+ if (useHandCursor(node, isOverLink)) |
return handCursor(); |
bool inResizer = false; |
@@ -1375,7 +1376,12 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(const PlatformMouseEve |
#endif |
WebInputEventResult clickEventResult = WebInputEventResult::NotHandled; |
- if (m_clickCount > 0 && !contextMenuEvent && mev.innerNode() && m_clickNode && mev.innerNode()->canParticipateInFlatTree() && m_clickNode->canParticipateInFlatTree()) { |
+ const bool shouldDispatchClickEvent = m_clickCount > 0 |
+ && !contextMenuEvent |
+ && mev.innerNode() && m_clickNode |
+ && mev.innerNode()->canParticipateInFlatTree() && m_clickNode->canParticipateInFlatTree() |
+ && !(selectionController().hasExtendedSelection() && mayBeLinkSelection(mev)); |
kotenkov
2016/03/09 17:27:59
This is needed so that no click event is sent when
|
+ if (shouldDispatchClickEvent) { |
// Updates distribution because a 'mouseup' event listener can make the |
// tree dirty at dispatchMouseEvent() invocation above. |
// Unless distribution is updated, commonAncestor would hit ASSERT. |