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

Unified Diff: third_party/WebKit/public/web/WebInputEvent.h

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GestureEventStreamValidator source device compatibility check. Created 5 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
Index: third_party/WebKit/public/web/WebInputEvent.h
diff --git a/third_party/WebKit/public/web/WebInputEvent.h b/third_party/WebKit/public/web/WebInputEvent.h
index 53ca6a160bca6f32f40af13023ef2e97fc2cefa4..9d61d87d775dfda12a788fb9c0249adc1fd5b0f1 100644
--- a/third_party/WebKit/public/web/WebInputEvent.h
+++ b/third_party/WebKit/public/web/WebInputEvent.h
@@ -113,6 +113,8 @@ public:
KeyboardTypeLast = Char,
// WebGestureEvent
+ // Note: Gesture scroll events (ScrollBegin ... FlingCancel) must be
+ // kept sequential for isGestureScrollEventType() to work.
GestureScrollBegin,
GestureTypeFirst = GestureScrollBegin,
GestureScrollEnd,
@@ -229,6 +231,12 @@ public:
return GestureTypeFirst <= type && type <= GestureTypeLast;
}
+ // Returns true if the WebInputEvent is a gesture scroll event.
+ static bool isGestureScrollEventType(int type)
+ {
+ return GestureScrollBegin <= type && type <= GestureFlingCancel;
+ }
+
protected:
explicit WebInputEvent(unsigned sizeParam)
{
@@ -546,6 +554,7 @@ public:
, y(0)
, globalX(0)
, globalY(0)
+ , sourceDevice(WebGestureDeviceUninitialized)
, resendingPluginId(-1)
{
memset(&data, 0, sizeof(data));

Powered by Google App Engine
This is Rietveld 408576698