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

Unified Diff: Source/platform/PlatformGestureEvent.h

Issue 1308313005: Modify gesture event types for WebView-tag scroll bubbling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment to explain |resendingPluginId|. Created 5 years, 3 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
« no previous file with comments | « Source/core/events/WheelEvent.cpp ('k') | Source/platform/PlatformWheelEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/PlatformGestureEvent.h
diff --git a/Source/platform/PlatformGestureEvent.h b/Source/platform/PlatformGestureEvent.h
index a1d8be5e0506953525615d3b62812b9567fb318b..53453a186462f593f6548137716175d6aa9d50ae 100644
--- a/Source/platform/PlatformGestureEvent.h
+++ b/Source/platform/PlatformGestureEvent.h
@@ -55,7 +55,7 @@ public:
}
void setScrollGestureData(float deltaX, float deltaY, float velocityX, float velocityY,
- bool inertial, bool preventPropagation)
+ bool inertial, bool preventPropagation, int resendingPluginId)
{
ASSERT(type() == PlatformEvent::GestureScrollBegin
|| type() == PlatformEvent::GestureScrollUpdate
@@ -76,6 +76,7 @@ public:
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_resendingPluginId = resendingPluginId;
m_data.m_scroll.m_preventPropagation = preventPropagation;
}
@@ -104,13 +105,13 @@ public:
float velocityX() const
{
- ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
+ ASSERT(m_type == PlatformEvent::GestureScrollUpdate || m_type == PlatformEvent::GestureFlingStart);
return m_data.m_scroll.m_velocityX;
}
float velocityY() const
{
- ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
+ ASSERT(m_type == PlatformEvent::GestureScrollUpdate || m_type == PlatformEvent::GestureFlingStart);
return m_data.m_scroll.m_velocityY;
}
@@ -120,6 +121,18 @@ public:
return m_data.m_scroll.m_inertial;
}
+ int resendingPluginId() const
+ {
+ if (m_type == PlatformEvent::GestureScrollUpdate
+ || m_type == PlatformEvent::GestureScrollBegin
+ || m_type == PlatformEvent::GestureScrollEnd)
+ return m_data.m_scroll.m_resendingPluginId;
+
+ // This function is called by *all* gesture event types in
+ // GestureEvent::Create(), so we return -1 for all other types.
+ return -1;
+ }
+
bool preventPropagation() const
{
ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
@@ -185,6 +198,7 @@ protected:
float m_velocityY;
int m_preventPropagation;
bool m_inertial;
+ int m_resendingPluginId;
} m_scroll;
struct {
« no previous file with comments | « Source/core/events/WheelEvent.cpp ('k') | Source/platform/PlatformWheelEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698