Index: content/browser/frame_host/render_widget_host_view_child_frame.cc |
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc |
index 09f1353e453a7a173507f4aff28078083853de7d..7e7f8e6eea58ad06e0aa1f3c9d93c25806ff3340 100644 |
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc |
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc |
@@ -33,6 +33,7 @@ |
#include "content/public/browser/render_process_host.h" |
#include "content/public/common/browser_plugin_guest_mode.h" |
#include "gpu/ipc/common/gpu_messages.h" |
+#include "third_party/WebKit/public/web/WebInputEvent.h" |
#include "ui/gfx/geometry/size_conversions.h" |
#include "ui/gfx/geometry/size_f.h" |
@@ -655,6 +656,28 @@ void RenderWidgetHostViewChildFrame::OnSetNeedsBeginFrames( |
} |
} |
+InputEventAckState RenderWidgetHostViewChildFrame::FilterInputEvent( |
+ const blink::WebInputEvent& input_event) { |
+ if (input_event.type == blink::WebInputEvent::GestureFlingStart) { |
+ const blink::WebGestureEvent& gesture_event = |
+ static_cast<const blink::WebGestureEvent&>(input_event); |
+ // Zero-velocity touchpad flings are an Aura-specific signal that the |
+ // touchpad scroll has ended, and should not be forwarded to the renderer. |
+ if (gesture_event.sourceDevice == blink::WebGestureDeviceTouchpad && |
+ !gesture_event.data.flingStart.velocityX && |
+ !gesture_event.data.flingStart.velocityY) { |
+ // Reporting consumed for a fling suggests that there's now an *active* |
Charlie Reis
2016/07/22 17:25:55
nit: Can you rephrase? I'm not sure what "Reporti
|
+ // fling that requires both animation and a fling-end notification. |
+ // However, here we've just indicated touchpad scroll has ended, and |
+ // we're not going to actually tick a fling animation. Report no consumer |
Charlie Reis
2016/07/22 17:25:55
tick?
|
+ // to convey this. |
+ return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
+ } |
+ } |
+ |
+ return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; |
+} |
+ |
BrowserAccessibilityManager* |
RenderWidgetHostViewChildFrame::CreateBrowserAccessibilityManager( |
BrowserAccessibilityDelegate* delegate, bool for_root_frame) { |