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

Unified Diff: content/common/input/synthetic_web_input_event_builders.cc

Issue 250923004: Synthesize ctrl-wheel events on touchpad pinch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows build and tweaks Created 6 years, 8 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: content/common/input/synthetic_web_input_event_builders.cc
diff --git a/content/common/input/synthetic_web_input_event_builders.cc b/content/common/input/synthetic_web_input_event_builders.cc
index 1bdea994878ebc401e5949d0304dd2189674c947..d0642341241b45ec20769c1ca88a9e2e77be37a2 100644
--- a/content/common/input/synthetic_web_input_event_builders.cc
+++ b/content/common/input/synthetic_web_input_event_builders.cc
@@ -123,12 +123,15 @@ WebGestureEvent SyntheticWebGestureEventBuilder::BuildPinchUpdate(
float scale,
float anchor_x,
float anchor_y,
- int modifiers) {
- WebGestureEvent result = Build(WebInputEvent::GesturePinchUpdate,
- WebGestureEvent::Touchscreen);
+ int modifiers,
+ WebGestureEvent::SourceDevice sourceDevice) {
+ WebGestureEvent result =
+ Build(WebInputEvent::GesturePinchUpdate, sourceDevice);
result.data.pinchUpdate.scale = scale;
result.x = anchor_x;
result.y = anchor_y;
+ result.globalX = anchor_x;
+ result.globalY = anchor_y;
result.modifiers = modifiers;
return result;
}

Powered by Google App Engine
This is Rietveld 408576698