Chromium Code Reviews| Index: third_party/WebKit/public/platform/WebGestureEvent.h |
| diff --git a/third_party/WebKit/public/platform/WebGestureEvent.h b/third_party/WebKit/public/platform/WebGestureEvent.h |
| index 791562f026cef28315ce63a0f281d94c03992b14..092227c3829b9cdb0b71dc914cddf9412912f59d 100644 |
| --- a/third_party/WebKit/public/platform/WebGestureEvent.h |
| +++ b/third_party/WebKit/public/platform/WebGestureEvent.h |
| @@ -5,6 +5,7 @@ |
| #ifndef WebGestureEvent_h |
| #define WebGestureEvent_h |
| +#include "WebFloatSize.h" |
| #include "WebGestureDevice.h" |
| #include "WebInputEvent.h" |
| @@ -162,6 +163,63 @@ class WebGestureEvent : public WebInputEvent { |
| globalY(0), |
| sourceDevice(WebGestureDeviceUninitialized), |
| resendingPluginId(-1) {} |
| + |
| +#if INSIDE_BLINK |
| + BLINK_PLATFORM_EXPORT float deltaXInRootFrame() const; |
| + BLINK_PLATFORM_EXPORT float deltaYInRootFrame() const; |
| + BLINK_PLATFORM_EXPORT ScrollUnits deltaUnits() const; |
| + BLINK_PLATFORM_EXPORT WebFloatPoint positionInRootFrame() const; |
|
Navid Zolghadr
2016/12/02 17:34:54
Is it worth adding an int version of this as well
dtapuska
2016/12/02 18:22:54
There is no WebIntPoint exposed on the API. We cou
|
| + BLINK_PLATFORM_EXPORT float pinchScale() const; |
| + BLINK_PLATFORM_EXPORT InertialPhaseState inertialPhase() const; |
| + BLINK_PLATFORM_EXPORT bool synthetic() const; |
| + |
| + BLINK_PLATFORM_EXPORT float velocityX() const; |
| + BLINK_PLATFORM_EXPORT float velocityY() const; |
| + |
| + BLINK_PLATFORM_EXPORT WebFloatSize tapAreaInRootFrame() const; |
| + BLINK_PLATFORM_EXPORT int tapCount() const; |
| + |
| + BLINK_PLATFORM_EXPORT void applyTouchAdjustment( |
| + WebFloatPoint rootFrameCoords); |
| + |
| + // Sets any scaled values to be their computed values and sets |frameScale| |
| + // back to 1. |
|
majidvp
2016/12/01 15:46:30
+ and translate back to (0,0)
dtapuska
2016/12/01 16:26:43
Acknowledged.
|
| + BLINK_PLATFORM_EXPORT void flattenScale(); |
|
majidvp
2016/12/01 15:46:30
It is both scale and transform so perhaps flattenS
dtapuska
2016/12/01 16:26:43
sgtm; I didn't care for the name.
|
| + |
| + bool preventPropagation() const { |
| + // TODO(tdresser) Once we've decided if we're getting rid of scroll |
| + // chaining, we should remove all scroll chaining related logic. See |
| + // crbug.com/526462 for details. |
| + DCHECK(type == WebInputEvent::GestureScrollUpdate); |
| + return true; |
| + } |
| + |
| + bool isScrollEvent() const { |
| + switch (type) { |
| + case GestureScrollBegin: |
| + case GestureScrollEnd: |
| + case GestureScrollUpdate: |
| + case GestureFlingStart: |
| + case GesturePinchBegin: |
| + case GesturePinchEnd: |
| + case GesturePinchUpdate: |
| + return true; |
| + case GestureTap: |
| + case GestureTapUnconfirmed: |
| + case GestureTapDown: |
| + case GestureShowPress: |
| + case GestureTapCancel: |
| + case GestureTwoFingerTap: |
| + case GestureLongPress: |
| + case GestureLongTap: |
| + return false; |
| + default: |
| + NOTREACHED(); |
| + return false; |
| + } |
| + } |
| + |
| +#endif |
| }; |
| #pragma pack(pop) |