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

Unified Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 2090113002: Do not convert mouse wheel gesture events in pepper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget_fullscreen_pepper.cc
diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc
index 6f3dc9529835b04da0cfb30004d4b5cdc34c697c..30a6372c08274af15a6765680bd67ab280e6c81d 100644
--- a/content/renderer/render_widget_fullscreen_pepper.cc
+++ b/content/renderer/render_widget_fullscreen_pepper.cc
@@ -65,37 +65,31 @@ class FullscreenMouseLockDispatcher : public MouseLockDispatcher {
WebMouseEvent WebMouseEventFromGestureEvent(const WebGestureEvent& gesture) {
WebMouseEvent mouse;
+ // Only convert touch screen gesture events, do not convert
+ // touchpad/mouse wheel gesture events. (crbug.com/620974)
+ if (gesture.sourceDevice != blink::WebGestureDeviceTouchscreen)
+ return mouse;
+
switch (gesture.type) {
case WebInputEvent::GestureScrollBegin:
mouse.type = WebInputEvent::MouseDown;
break;
-
case WebInputEvent::GestureScrollUpdate:
mouse.type = WebInputEvent::MouseMove;
break;
-
case WebInputEvent::GestureFlingStart:
- if (gesture.sourceDevice == blink::WebGestureDeviceTouchscreen) {
- // A scroll gesture on the touchscreen may end with a GestureScrollEnd
- // when there is no velocity, or a GestureFlingStart when it has a
- // velocity. In both cases, it should end the drag that was initiated by
- // the GestureScrollBegin (and subsequent GestureScrollUpdate) events.
- mouse.type = WebInputEvent::MouseUp;
- break;
- } else {
- return mouse;
- }
+ // A scroll gesture on the touchscreen may end with a GestureScrollEnd
+ // when there is no velocity, or a GestureFlingStart when it has a
+ // velocity. In both cases, it should end the drag that was initiated by
+ // the GestureScrollBegin (and subsequent GestureScrollUpdate) events.
+ mouse.type = WebInputEvent::MouseUp;
case WebInputEvent::GestureScrollEnd:
mouse.type = WebInputEvent::MouseUp;
break;
-
default:
- break;
+ return mouse;
}
- if (mouse.type == WebInputEvent::Undefined)
- return mouse;
-
mouse.timeStampSeconds = gesture.timeStampSeconds;
mouse.modifiers = gesture.modifiers | WebInputEvent::LeftButtonDown;
mouse.button = WebMouseEvent::ButtonLeft;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698