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

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: Ensure scales never coalesce to 0 or Infinity 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..2fcca34afb73bc9878c14511225ca545da3b58ef 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 source_device) {
+ WebGestureEvent result =
+ Build(WebInputEvent::GesturePinchUpdate, source_device);
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;
}
« no previous file with comments | « content/common/input/synthetic_web_input_event_builders.h ('k') | content/common/input/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698