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

Unified Diff: Source/platform/PlatformGestureEvent.h

Issue 1052433003: Allow postponed rail application for touch scrolling - blink side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix broken test. Created 5 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: Source/platform/PlatformGestureEvent.h
diff --git a/Source/platform/PlatformGestureEvent.h b/Source/platform/PlatformGestureEvent.h
index a1d8be5e0506953525615d3b62812b9567fb318b..7495f0fb7871f9472f042b48fa9cabdda3b7c84a 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, RailsMode railsMode)
{
ASSERT(type() == PlatformEvent::GestureScrollBegin
|| type() == PlatformEvent::GestureScrollUpdate
@@ -66,6 +66,7 @@ public:
ASSERT(velocityX == 0);
ASSERT(velocityY == 0);
ASSERT(!preventPropagation);
+ ASSERT(railsMode == PlatformEvent::RailsModeFree);
}
if (type() == PlatformEvent::GestureScrollBegin)
@@ -77,6 +78,7 @@ public:
m_data.m_scroll.m_velocityY = velocityY;
m_data.m_scroll.m_inertial = inertial;
m_data.m_scroll.m_preventPropagation = preventPropagation;
+ m_data.m_scroll.m_railsMode = railsMode;
}
const IntPoint& position() const { return m_position; } // PlatformWindow coordinates.
@@ -114,6 +116,12 @@ public:
return m_data.m_scroll.m_velocityY;
}
+ RailsMode railsMode() const
+ {
+ ASSERT(m_type == PlatformEvent::GestureScrollUpdate);
+ return m_data.m_scroll.m_railsMode;
+ }
+
bool inertial() const
{
ASSERT(m_type == PlatformEvent::GestureScrollUpdate || m_type == PlatformEvent::GestureScrollEnd);
@@ -185,6 +193,7 @@ protected:
float m_velocityY;
int m_preventPropagation;
bool m_inertial;
+ RailsMode m_railsMode;
} m_scroll;
struct {

Powered by Google App Engine
This is Rietveld 408576698