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)); |