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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2173603002: Filter GestureFlingStarts with Vx=Vy=0 in RenderWidgetHostViewChildFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarify comments, and include reference to RWHVA::FilterInputEvent(). Created 4 years, 5 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/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 62af378073402dd6e2e4ac793125945052b0e026..34b8ff6150519975b06cc16b19e7dc48b4945912 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1254,12 +1254,16 @@ InputEventAckState RenderWidgetHostViewAura::FilterInputEvent(
if (WebTouchEvent::isTouchEventType(input_event.type))
return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
- // Reporting consumed for a fling suggests that there's now an *active* fling
- // that requires both animation and a fling-end notification. However, the
- // OverscrollController consumes a fling to stop its propagation; it doesn't
- // actually tick a fling animation. Report no consumer to convey this.
- if (consumed && input_event.type == blink::WebInputEvent::GestureFlingStart)
+ if (consumed && input_event.type == blink::WebInputEvent::GestureFlingStart) {
+ // Here we indicate that there was no consumer for this event, as
+ // otherwise the fling animation system will try to run an animation
+ // and will also expect a notification when the fling ends. Since
+ // CrOS just uses the GestureFlingStart with zero-velocity as a means
+ // of indicating that touchpad scroll has ended, we don't actually want
+ // a fling animation. Note: Similar code exists in
+ // RenderWidgetHostViewChildFrame::FilterInputEvent()
return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
+ }
return consumed ? INPUT_EVENT_ACK_STATE_CONSUMED
: INPUT_EVENT_ACK_STATE_NOT_CONSUMED;

Powered by Google App Engine
This is Rietveld 408576698