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

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

Issue 1829743003: Fix missing fields in GestureScrollBegin/Update/End event conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tdresser's comments in patch set 1 Created 4 years, 9 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 350fe9ebdbd0a19cecd856d2b4ab704d5a16f2f8..86ec241bc832c00b2541a01bb2868429e52a5aaf 100644
--- a/third_party/WebKit/Source/platform/PlatformGestureEvent.h
+++ b/third_party/WebKit/Source/platform/PlatformGestureEvent.h
@@ -99,19 +99,19 @@ public:
float deltaX() const
{
- ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
+ ASSERT(m_type == PlatformEvent::GestureScrollBegin || m_type == PlatformEvent::GestureScrollUpdate);
return m_data.m_scroll.m_deltaX;
}
float deltaY() const
{
- ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
+ ASSERT(m_type == PlatformEvent::GestureScrollBegin || m_type == PlatformEvent::GestureScrollUpdate);
return m_data.m_scroll.m_deltaY;
}
ScrollGranularity deltaUnits() const
{
- ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
+ ASSERT(m_type == PlatformEvent::GestureScrollBegin || m_type == PlatformEvent::GestureScrollUpdate || m_type == PlatformEvent::GestureScrollEnd);
return m_data.m_scroll.m_deltaUnits;
}
@@ -135,10 +135,16 @@ public:
bool inertial() const
{
- ASSERT(m_type == PlatformEvent::GestureScrollUpdate || m_type == PlatformEvent::GestureScrollEnd);
+ ASSERT(m_type == PlatformEvent::GestureScrollBegin || m_type == PlatformEvent::GestureScrollUpdate || m_type == PlatformEvent::GestureScrollEnd);
return m_data.m_scroll.m_inertial;
}
+ bool synthetic() const
+ {
+ ASSERT(m_type == PlatformEvent::GestureScrollBegin || m_type == PlatformEvent::GestureScrollEnd);
+ return m_data.m_scroll.m_synthetic;
+ }
+
int resendingPluginId() const
{
if (m_type == PlatformEvent::GestureScrollUpdate
@@ -214,6 +220,8 @@ protected:
} m_tap;
struct {
+ // |m_deltaX| and |m_deltaY| represent deltas in GSU but
+ // are only hints in GSB.
float m_deltaX;
float m_deltaY;
float m_velocityX;
@@ -222,6 +230,7 @@ protected:
bool m_inertial;
ScrollGranularity m_deltaUnits;
int m_resendingPluginId;
+ bool m_synthetic;
} m_scroll;
struct {
« no previous file with comments | « third_party/WebKit/Source/core/events/GestureEvent.cpp ('k') | third_party/WebKit/Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698