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

Unified Diff: Source/platform/PlatformWheelEvent.h

Issue 1018183002: Add rails to input wheel events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/PlatformWheelEvent.h
diff --git a/Source/platform/PlatformWheelEvent.h b/Source/platform/PlatformWheelEvent.h
index fc36ffb137765dacc4348ade05fd8f90438d039c..b282da1437baac9dc0a53b416a60f51afd2279c4 100644
--- a/Source/platform/PlatformWheelEvent.h
+++ b/Source/platform/PlatformWheelEvent.h
@@ -41,6 +41,12 @@ enum PlatformWheelEventGranularity {
ScrollByPixelWheelEvent,
};
+enum PlatformWheelEventRailMode {
+ PlatformWheelEventRailModeFree = 0,
+ PlatformWheelEventRailModeHorizontal = 1 << 0,
+ PlatformWheelEventRailModeVertical = 1 << 1,
+};
+
#if OS(MACOSX)
enum PlatformWheelEventPhase {
PlatformWheelEventPhaseNone = 0,
@@ -64,6 +70,7 @@ public:
, m_granularity(ScrollByPixelWheelEvent)
, m_hasPreciseScrollingDeltas(false)
, m_canScroll(true)
+ , m_railMode(PlatformWheelEventRailModeFree)
#if OS(MACOSX)
, m_phase(PlatformWheelEventPhaseNone)
, m_momentumPhase(PlatformWheelEventPhaseNone)
@@ -84,6 +91,7 @@ public:
, m_granularity(granularity)
, m_hasPreciseScrollingDeltas(false)
, m_canScroll(true)
+ , m_railMode(PlatformWheelEventRailModeFree)
#if OS(MACOSX)
, m_phase(PlatformWheelEventPhaseNone)
, m_momentumPhase(PlatformWheelEventPhaseNone)
@@ -108,6 +116,8 @@ public:
void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b; }
bool canScroll() const { return m_canScroll; }
void setCanScroll(bool b) { m_canScroll = b; }
+ PlatformWheelEventRailMode railMode() const { return m_railMode; }
+
#if OS(MACOSX)
PlatformWheelEventPhase phase() const { return m_phase; }
PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; }
@@ -128,6 +138,7 @@ protected:
PlatformWheelEventGranularity m_granularity;
bool m_hasPreciseScrollingDeltas;
bool m_canScroll;
+ PlatformWheelEventRailMode m_railMode;
#if OS(MACOSX)
PlatformWheelEventPhase m_phase;
PlatformWheelEventPhase m_momentumPhase;

Powered by Google App Engine
This is Rietveld 408576698