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

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: More plumbing and tests 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/tests/WebInputEventConversionTest.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..d212f6fe2a2a0e21cde6fe3a232b960849b1cad0 100644
--- a/public/web/WebInputEvent.h
+++ b/public/web/WebInputEvent.h
@@ -173,6 +173,15 @@ public:
IsRight = 1 << 12,
};
+ // 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 RailsMode {
+ RailsModeFree = 0,
+ RailsModeHorizontal = 1,
+ RailsModeVertical = 2,
+ };
+
static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey;
double timeStampSeconds; // Seconds since epoch.
@@ -390,6 +399,8 @@ public:
// instead of scroll.
bool canScroll;
+ RailsMode railsMode;
+
WebMouseWheelEvent()
: WebMouseEvent(sizeof(WebMouseWheelEvent))
, deltaX(0.0f)
@@ -405,6 +416,7 @@ public:
, scrollByPage(false)
, hasPreciseScrollingDeltas(false)
, canScroll(true)
+ , railsMode(RailsModeFree)
{
}
};
« no previous file with comments | « Source/web/tests/WebInputEventConversionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698