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

Unified Diff: third_party/WebKit/Source/platform/PlatformGestureEvent.h

Issue 1557993002: Add scroll units in GestureEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout test on Mac Created 4 years, 11 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/Source/platform/PlatformGestureEvent.h
diff --git a/third_party/WebKit/Source/platform/PlatformGestureEvent.h b/third_party/WebKit/Source/platform/PlatformGestureEvent.h
index 57d5ef7b17833b97427b48a11db3c2e9780337eb..a9a10720a8b9920b813bcd628005e0d8a2966545 100644
--- a/third_party/WebKit/Source/platform/PlatformGestureEvent.h
+++ b/third_party/WebKit/Source/platform/PlatformGestureEvent.h
@@ -30,6 +30,7 @@
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/IntPoint.h"
#include "platform/geometry/IntSize.h"
+#include "platform/scroll/ScrollTypes.h"
#include "wtf/Assertions.h"
#include <string.h>
@@ -62,7 +63,7 @@ public:
memset(&m_data, 0, sizeof(m_data));
}
- void setScrollGestureData(float deltaX, float deltaY, float velocityX, float velocityY,
+ void setScrollGestureData(float deltaX, float deltaY, ScrollGranularity deltaUnits, float velocityX, float velocityY,
bool inertial, bool preventPropagation, int resendingPluginId)
{
ASSERT(type() == PlatformEvent::GestureScrollBegin
@@ -81,6 +82,7 @@ public:
m_data.m_scroll.m_deltaX = deltaX;
m_data.m_scroll.m_deltaY = deltaY;
+ m_data.m_scroll.m_deltaUnits = deltaUnits;
m_data.m_scroll.m_velocityX = velocityX;
m_data.m_scroll.m_velocityY = velocityY;
m_data.m_scroll.m_inertial = inertial;
@@ -107,6 +109,12 @@ public:
return m_data.m_scroll.m_deltaY;
}
+ ScrollGranularity deltaUnits() const
+ {
+ ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
+ return m_data.m_scroll.m_deltaUnits;
+ }
+
int tapCount() const
{
ASSERT(m_type == PlatformEvent::GestureTap);
@@ -212,6 +220,7 @@ protected:
float m_velocityY;
int m_preventPropagation;
bool m_inertial;
+ ScrollGranularity m_deltaUnits;
int m_resendingPluginId;
} m_scroll;
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/web/WebInputEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698