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

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

Issue 267313008: First-cut at fixing unhandled Tap event returns in Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 | « Source/core/page/EventHandler.h ('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 2c57862dcc21a9a1e890935f48db0ffca70a537c..fbac989ba723daa141e95d86bf5f78b551331ecf 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -230,6 +230,7 @@ EventHandler::EventHandler(LocalFrame* frame)
, m_longTapShouldInvokeContextMenu(false)
, m_activeIntervalTimer(this, &EventHandler::activeIntervalTimerFired)
, m_lastShowPressTimestamp(0)
+ , m_fixTapGestureReturnValue(false)
{
}
@@ -614,6 +615,8 @@ bool EventHandler::handleMousePressEvent(const MouseEventWithHitTestResults& eve
swallowEvent = handleMousePressEventTripleClick(event);
else
swallowEvent = handleMousePressEventSingleClick(event);
+ if (m_fixTapGestureReturnValue)
+ swallowEvent = false;
Rick Byers 2014/05/16 11:10:43 This seems wrong. A click from touch is as legiti
Donn Denman 2014/05/27 05:58:14 Done.
m_mouseDownMayStartAutoscroll = m_mouseDownMayStartSelect
|| (m_mousePressNode && m_mousePressNode->renderBox() && m_mousePressNode->renderBox()->canBeProgramaticallyScrolled());
@@ -2229,6 +2232,7 @@ bool EventHandler::handleGestureTap(const PlatformGestureEvent& gestureEvent, co
handleMouseMoveEvent(fakeMouseMove);
bool defaultPrevented = false;
+ m_fixTapGestureReturnValue = true;
PlatformMouseEvent fakeMouseDown(adjustedPoint, gestureEvent.globalPosition(),
LeftButton, PlatformEvent::MousePressed, gestureEvent.tapCount(),
modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
@@ -2238,6 +2242,8 @@ bool EventHandler::handleGestureTap(const PlatformGestureEvent& gestureEvent, co
LeftButton, PlatformEvent::MouseReleased, gestureEvent.tapCount(),
modifiers, PlatformMouseEvent::FromTouch, gestureEvent.timestamp());
defaultPrevented |= handleMouseReleaseEvent(fakeMouseUp);
+ // TODO(donnd): do we need to worry about exceptions being thrown above?
+ m_fixTapGestureReturnValue = false;
return defaultPrevented;
}
« no previous file with comments | « Source/core/page/EventHandler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698