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

Unified Diff: third_party/WebKit/public/web/WebInputEvent.h

Issue 1557993002: Add scroll units in GestureEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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: third_party/WebKit/public/web/WebInputEvent.h
diff --git a/third_party/WebKit/public/web/WebInputEvent.h b/third_party/WebKit/public/web/WebInputEvent.h
index 6ce0fea97533c50f0eb52c316560f57b4fac0b41..c08c8a29c09f38b3483c48cb799a8f89e21ee0e2 100644
--- a/third_party/WebKit/public/web/WebInputEvent.h
+++ b/third_party/WebKit/public/web/WebInputEvent.h
@@ -456,6 +456,12 @@ public:
class WebGestureEvent : public WebInputEvent {
public:
+ enum ScrollUnits {
+ PrecisePixels = 0, // generated by high precision devices.
+ Pixels, // large pixel jump duration; should animate to delta.
+ Page // page (visible viewport) based scrolling.
+ };
+
int x;
int y;
int globalX;
@@ -502,6 +508,7 @@ public:
// May be redundant with deltaX/deltaY in the first scrollUpdate.
float deltaXHint;
float deltaYHint;
+ unsigned deltaHintUnits : 3;
tdresser 2016/01/05 16:07:33 It might be worth commenting that the default of 0
dtapuska 2016/01/05 16:52:28 Done.
// If true, this event will skip hit testing to find a scroll
// target and instead just scroll the viewport.
bool targetViewport;
@@ -520,6 +527,7 @@ public:
bool previousUpdateInSequencePrevented;
bool preventPropagation;
bool inertial;
+ unsigned deltaUnits : 3;
} scrollUpdate;
struct {

Powered by Google App Engine
This is Rietveld 408576698