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

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

Issue 2681443003: Send click event after pointer capturing retarget (Closed)
Patch Set: Rename the function and the parameter names 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
« no previous file with comments | « third_party/WebKit/Source/core/input/PointerEventManager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/PointerEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
index f0fca95d815ea704bdc6b360b728655cf16c9e99..6e62a1656130e32b0ca32f271097a54da896374f 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -447,7 +447,8 @@ WebInputEventResult PointerEventManager::sendMousePointerEvent(
const String& canvasRegionId,
const AtomicString& mouseEventType,
const WebMouseEvent& mouseEvent,
- const Vector<WebMouseEvent>& coalescedEvents) {
+ const Vector<WebMouseEvent>& coalescedEvents,
+ bool selectionOverLink) {
PointerEvent* pointerEvent =
m_pointerEventFactory.create(mouseEventType, mouseEvent, coalescedEvents,
m_frame->document()->domWindow());
@@ -500,6 +501,14 @@ WebInputEventResult PointerEventManager::sendMousePointerEvent(
result,
m_mouseEventManager->dispatchMouseEvent(
mouseTarget, mouseEventType, mouseEvent, canvasRegionId, nullptr));
+
+ if (selectionOverLink && mouseTarget &&
+ mouseEventType == EventTypeNames::mouseup) {
+ WebInputEventResult clickEventResult =
+ m_mouseEventManager->dispatchMouseClickIfNeeded(
+ mouseTarget->toNode(), mouseEvent, canvasRegionId);
+ result = EventHandlingUtil::mergeEventResult(clickEventResult, result);
+ }
}
if (pointerEvent->type() == EventTypeNames::pointerup ||
« no previous file with comments | « third_party/WebKit/Source/core/input/PointerEventManager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698