| Index: Source/platform/PlatformGestureEvent.h
|
| diff --git a/Source/platform/PlatformGestureEvent.h b/Source/platform/PlatformGestureEvent.h
|
| index 2b5fb8f66468229be02b403ef5cbd6db565832b1..596cc1c0dec98878cc8f0c051c81af98aeed5dce 100644
|
| --- a/Source/platform/PlatformGestureEvent.h
|
| +++ b/Source/platform/PlatformGestureEvent.h
|
| @@ -43,7 +43,7 @@ public:
|
| memset(&m_data, 0, sizeof(m_data));
|
| }
|
|
|
| - PlatformGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const IntSize& area, double timestamp, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, float deltaX, float deltaY, float velocityX, float velocityY, bool preventPropagation)
|
| + PlatformGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const IntSize& area, double timestamp, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, float deltaX, float deltaY, float velocityX, float velocityY, bool inertial, bool preventPropagation)
|
| : PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp)
|
| , m_position(position)
|
| , m_globalPosition(globalPosition)
|
| @@ -53,11 +53,12 @@ public:
|
| if (type == PlatformEvent::GestureScrollBegin
|
| || type == PlatformEvent::GestureScrollEnd
|
| || type == PlatformEvent::GestureScrollUpdate) {
|
| - m_data.m_scrollUpdate.m_deltaX = deltaX;
|
| - m_data.m_scrollUpdate.m_deltaY = deltaY;
|
| - m_data.m_scrollUpdate.m_velocityX = velocityX;
|
| - m_data.m_scrollUpdate.m_velocityY = velocityY;
|
| - m_data.m_scrollUpdate.m_preventPropagation = preventPropagation;
|
| + m_data.m_scroll.m_deltaX = deltaX;
|
| + m_data.m_scroll.m_deltaY = deltaY;
|
| + m_data.m_scroll.m_velocityX = velocityX;
|
| + m_data.m_scroll.m_velocityY = velocityY;
|
| + m_data.m_scroll.m_inertial = inertial;
|
| + m_data.m_scroll.m_preventPropagation = preventPropagation;
|
| }
|
| }
|
|
|
| @@ -68,14 +69,16 @@ public:
|
|
|
| float deltaX() const
|
| {
|
| - ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
|
| - return m_data.m_scrollUpdate.m_deltaX;
|
| + ASSERT(m_type == PlatformEvent::GestureScrollUpdate
|
| + || m_type == PlatformEvent::GestureScrollEnd);
|
| + return m_data.m_scroll.m_deltaX;
|
| }
|
|
|
| float deltaY() const
|
| {
|
| - ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
|
| - return m_data.m_scrollUpdate.m_deltaY;
|
| + ASSERT(m_type == PlatformEvent::GestureScrollUpdate
|
| + || m_type == PlatformEvent::GestureScrollEnd);
|
| + return m_data.m_scroll.m_deltaY;
|
| }
|
|
|
| int tapCount() const
|
| @@ -86,20 +89,29 @@ public:
|
|
|
| float velocityX() const
|
| {
|
| - ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
|
| - return m_data.m_scrollUpdate.m_velocityX;
|
| + ASSERT(m_type == PlatformEvent::GestureScrollUpdate
|
| + || m_type == PlatformEvent::GestureScrollEnd);
|
| + return m_data.m_scroll.m_velocityX;
|
| }
|
|
|
| float velocityY() const
|
| {
|
| - ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
|
| - return m_data.m_scrollUpdate.m_velocityY;
|
| + ASSERT(m_type == PlatformEvent::GestureScrollUpdate
|
| + || m_type == PlatformEvent::GestureScrollEnd);
|
| + return m_data.m_scroll.m_velocityY;
|
| + }
|
| +
|
| + bool inertial() const
|
| + {
|
| + ASSERT(m_type == PlatformEvent::GestureScrollUpdate
|
| + || m_type == PlatformEvent::GestureScrollEnd);
|
| + return m_data.m_scroll.m_inertial;
|
| }
|
|
|
| bool preventPropagation() const
|
| {
|
| ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
|
| - return m_data.m_scrollUpdate.m_preventPropagation;
|
| + return m_data.m_scroll.m_preventPropagation;
|
| }
|
|
|
| float scale() const
|
| @@ -160,7 +172,8 @@ protected:
|
| float m_velocityX;
|
| float m_velocityY;
|
| int m_preventPropagation;
|
| - } m_scrollUpdate;
|
| + bool m_inertial;
|
| + } m_scroll;
|
|
|
| struct {
|
| float m_scale;
|
|
|