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

Unified Diff: third_party/WebKit/public/platform/WebGestureEvent.h

Issue 2925883003: [Touch Adjustment] Pass primary_pointer_type to WebGestureEvent and disable adjustment for stylus (Closed)
Patch Set: Created 3 years, 6 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/platform/WebGestureEvent.h
diff --git a/third_party/WebKit/public/platform/WebGestureEvent.h b/third_party/WebKit/public/platform/WebGestureEvent.h
index 4cefc3414fbff56fd901ad0531a5c6027fcf9ee3..1dac2aa81fa6e58796acd7de043b98c78f71c074 100644
--- a/third_party/WebKit/public/platform/WebGestureEvent.h
+++ b/third_party/WebKit/public/platform/WebGestureEvent.h
@@ -38,6 +38,10 @@ class WebGestureEvent : public WebInputEvent {
int global_y;
WebGestureDevice source_device;
+ // |primary_pointer_type| is used to distinguish between finger-generated and
+ // stylus-generated gestures. This is important for touch adjustment.
+ WebPointerProperties::PointerType primary_pointer_type;
mustaq 2017/06/14 20:37:48 Please drop "primary_", there is only one type for
chongz 2017/06/14 23:53:23 dtapuska@ Are you ok with dropping "primary_"? Th
dtapuska 2017/06/15 14:47:23 Probably we should indicate that for a multi-conta
chongz 2017/06/15 21:40:08 Updated comments.
+
// If the WebGestureEvent has sourceDevice=WebGestureDeviceTouchscreen, this
// field contains the unique identifier for the touch event that released
// this event at TouchDispositionGestureFilter. If the WebGestureEvents was
@@ -164,11 +168,13 @@ class WebGestureEvent : public WebInputEvent {
modifiers,
time_stamp_seconds),
source_device(kWebGestureDeviceUninitialized),
+ primary_pointer_type(WebPointerProperties::PointerType::kUnknown),
resending_plugin_id(-1) {}
WebGestureEvent()
: WebInputEvent(sizeof(WebGestureEvent)),
source_device(kWebGestureDeviceUninitialized),
+ primary_pointer_type(WebPointerProperties::PointerType::kUnknown),
resending_plugin_id(-1) {}
#if INSIDE_BLINK

Powered by Google App Engine
This is Rietveld 408576698