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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2681443003: Send click event after pointer capturing retarget (Closed)
Patch Set: Created 3 years, 10 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/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index fa417ad6707e2a82a77b79ac1a7fdfc926c2fda0..e61ad3b7647241e7c9334414ec58fc6f7c91e043 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -971,10 +971,8 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(
WebInputEventResult eventResult = updatePointerTargetAndDispatchEvents(
EventTypeNames::mouseup, mev.innerNode(), mev.canvasRegionId(),
- mev.event(), Vector<WebMouseEvent>());
-
- WebInputEventResult clickEventResult =
- m_mouseEventManager->dispatchMouseClickIfNeeded(mev);
+ mev.event(), Vector<WebMouseEvent>(),
+ !(selectionController().hasExtendedSelection() && isLinkSelection(mev)));
m_scrollManager->clearResizeScrollableArea(false);
@@ -984,7 +982,7 @@ WebInputEventResult EventHandler::handleMouseReleaseEvent(
m_mouseEventManager->invalidateClick();
- return EventHandlingUtil::mergeEventResult(clickEventResult, eventResult);
+ return eventResult;
}
static bool targetIsFrame(Node* target, LocalFrame*& frame) {
@@ -1259,14 +1257,15 @@ WebInputEventResult EventHandler::updatePointerTargetAndDispatchEvents(
Node* targetNode,
const String& canvasRegionId,
const WebMouseEvent& mouseEvent,
- const Vector<WebMouseEvent>& coalescedEvents) {
+ const Vector<WebMouseEvent>& coalescedEvents,
+ bool sendClickIfNeeded) {
mustaq 2017/02/10 21:16:53 Can the name |sendClickIfNeeded| be more specific
ASSERT(mouseEventType == EventTypeNames::mousedown ||
mouseEventType == EventTypeNames::mousemove ||
mouseEventType == EventTypeNames::mouseup);
const auto& eventResult = m_pointerEventManager->sendMousePointerEvent(
updateMouseEventTargetNode(targetNode), canvasRegionId, mouseEventType,
- mouseEvent, coalescedEvents);
+ mouseEvent, coalescedEvents, sendClickIfNeeded);
return eventResult;
}
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.h ('k') | third_party/WebKit/Source/core/input/MouseEventManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698