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

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: Fix layout test on Mac Created 4 years, 11 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 | « third_party/WebKit/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: 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..92b6347a5996f609f49eb2870dee5ed97adb7134 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,8 @@ public:
// May be redundant with deltaX/deltaY in the first scrollUpdate.
float deltaXHint;
float deltaYHint;
+ // Default initialized to ScrollUnits::PrecisePixels.
+ ScrollUnits deltaHintUnits;
// If true, this event will skip hit testing to find a scroll
// target and instead just scroll the viewport.
bool targetViewport;
@@ -520,6 +528,8 @@ public:
bool previousUpdateInSequencePrevented;
bool preventPropagation;
bool inertial;
+ // Default initialized to ScrollUnits::PrecisePixels.
+ ScrollUnits deltaUnits;
} scrollUpdate;
struct {
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698