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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 641063003: Pass correct client coordinates for mouse events synthesized from a GestureTap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 2 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 | « LayoutTests/fast/events/touch/gesture/resources/event-delegator.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index f20eb9d9b444fef875547f922032cd55e1b08525..b3f8ac4a84d8b45acb39ffb94f57df6703673535 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2239,7 +2239,7 @@ bool EventHandler::handleGestureTap(const GestureEventWithHitTestResults& target
// co-ordinates outside the target's bounds.
IntPoint adjustedPoint = m_frame->view()->windowToContents(gestureEvent.position());
- PlatformMouseEvent fakeMouseMove(adjustedPoint, gestureEvent.globalPosition(),
+ PlatformMouseEvent fakeMouseMove(gestureEvent.position(), gestureEvent.globalPosition(),
NoButton, PlatformEvent::MouseMoved, /* clickCount */ 0,
modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
dispatchMouseEvent(EventTypeNames::mousemove, currentHitTest.innerNode(), 0, fakeMouseMove, true);
@@ -2255,7 +2255,7 @@ bool EventHandler::handleGestureTap(const GestureEventWithHitTestResults& target
if (m_clickNode && m_clickNode->isTextNode())
m_clickNode = NodeRenderingTraversal::parent(m_clickNode.get());
- PlatformMouseEvent fakeMouseDown(adjustedPoint, gestureEvent.globalPosition(),
+ PlatformMouseEvent fakeMouseDown(gestureEvent.position(), gestureEvent.globalPosition(),
LeftButton, PlatformEvent::MousePressed, gestureEvent.tapCount(),
modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
bool swallowMouseDownEvent = !dispatchMouseEvent(EventTypeNames::mousedown, currentHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseDown, true);
@@ -2267,7 +2267,7 @@ bool EventHandler::handleGestureTap(const GestureEventWithHitTestResults& target
// FIXME: Use a hit-test cache to avoid unnecessary hit tests. http://crbug.com/398920
if (currentHitTest.innerNode())
currentHitTest = hitTestResultInFrame(m_frame, adjustedPoint, hitType);
- PlatformMouseEvent fakeMouseUp(adjustedPoint, gestureEvent.globalPosition(),
+ PlatformMouseEvent fakeMouseUp(gestureEvent.position(), gestureEvent.globalPosition(),
LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(),
modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
bool swallowMouseUpEvent = !dispatchMouseEvent(EventTypeNames::mouseup, currentHitTest.innerNode(), gestureEvent.tapCount(), fakeMouseUp, false);
« no previous file with comments | « LayoutTests/fast/events/touch/gesture/resources/event-delegator.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698