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

Unified Diff: public/web/WebInputEvent.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
« no previous file with comments | « Source/web/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebInputEvent.h
diff --git a/public/web/WebInputEvent.h b/public/web/WebInputEvent.h
index a21e26705b7e3b47fe8f4e50d5a4a3b589a450b8..058300bf7a27bc49809e40095da7ca0b77589c38 100644
--- a/public/web/WebInputEvent.h
+++ b/public/web/WebInputEvent.h
@@ -343,6 +343,15 @@ protected:
class WebMouseWheelEvent : public WebMouseEvent {
public:
+ // The rail mode for a wheel event specifies the axis on which scrolling is
+ // expected to stick. If this axis is set to Free, then scrolling is not
+ // stuck to any axis.
+ enum RailMode {
Rick Byers 2015/03/18 23:30:58 We'll want to use this from WebGestureEvent too I
ccameron 2015/03/19 00:05:10 Good point -- done. Did this to the platform event
+ RailModeFree = 0,
+ RailModeHorizontal = 1 << 0,
Rick Byers 2015/03/18 23:30:58 these don't need to be flags, right? I.e. it's no
ccameron 2015/03/19 00:05:10 The same is true of Phase, so I was guessing this
+ RailModeVertical = 1 << 1,
+ };
+
enum Phase {
PhaseNone = 0,
PhaseBegan = 1 << 0,
@@ -390,6 +399,8 @@ public:
// instead of scroll.
bool canScroll;
+ RailMode railMode;
+
WebMouseWheelEvent()
: WebMouseEvent(sizeof(WebMouseWheelEvent))
, deltaX(0.0f)
@@ -405,6 +416,7 @@ public:
, scrollByPage(false)
, hasPreciseScrollingDeltas(false)
, canScroll(true)
+ , railMode(RailModeFree)
{
}
};
« no previous file with comments | « Source/web/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698