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

Unified Diff: Source/core/events/TouchEvent.cpp

Issue 247483002: Allow touch events to be uncancelable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build on some platforms Created 6 years, 8 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/events/TouchEvent.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/TouchEvent.cpp
diff --git a/Source/core/events/TouchEvent.cpp b/Source/core/events/TouchEvent.cpp
index bdd908cd0d68d18d731cf29c3dc09f4868b2ef1f..f252c9a155de4d8f7ae1a1d6ad339e77be6bbb3e 100644
--- a/Source/core/events/TouchEvent.cpp
+++ b/Source/core/events/TouchEvent.cpp
@@ -40,8 +40,8 @@ TouchEvent::TouchEvent()
TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches,
TouchList* changedTouches, const AtomicString& type,
PassRefPtrWillBeRawPtr<AbstractView> view, int screenX, int screenY, int pageX, int pageY,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
- : MouseRelatedEvent(type, true, true, view, 0, IntPoint(screenX, screenY),
+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable)
+ : MouseRelatedEvent(type, true, cancelable, view, 0, IntPoint(screenX, screenY),
IntPoint(pageX, pageY),
IntPoint(0, 0),
ctrlKey, altKey, shiftKey, metaKey)
@@ -64,7 +64,11 @@ void TouchEvent::initTouchEvent(TouchList* touches, TouchList* targetTouches,
if (dispatched())
return;
- initUIEvent(type, true, true, view, 0);
+ bool cancelable = true;
+ if (type == EventTypeNames::touchcancel)
+ cancelable = false;
+
+ initUIEvent(type, true, cancelable, view, 0);
m_touches = touches;
m_targetTouches = targetTouches;
« no previous file with comments | « Source/core/events/TouchEvent.h ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698