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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2815823003: Notify OverscrollController of gesture events in plugins. (Closed)
Patch Set: Fix for Mac history swiper. Created 3 years, 7 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/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 8c14e80cb67245f110b24e0d70c72d64760eeeb3..2c2a23f9343135361e63800a91ac7dccdf5ba281 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
@@ -666,6 +666,22 @@ InputEventAckState RenderWidgetHostViewChildFrame::FilterInputEvent(
}
}
+ // TODO(mcnee): Allow the root RWHV to consume the child's
+ // GestureScrollUpdates. This is needed to prevent the child from consuming
+ // them after the root has started an overscroll.
Charlie Reis 2017/05/05 23:45:44 Is there a bug associated with this that you can l
Kevin McNee 2017/05/17 22:39:33 Done.
+
+ return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
+}
+
+InputEventAckState RenderWidgetHostViewChildFrame::FilterChildGestureEvent(
+ const blink::WebGestureEvent& gesture_event) {
+ // We may be the owner of a RenderWidgetHostViewGuest,
+ // so we talk to the root RWHV on its behalf.
+ // TODO(mcnee): Remove once MimeHandlerViewGuest is based on OOPIF.
+ // See crbug.com/659750
+ if (frame_connector_)
+ return frame_connector_->GetRootRenderWidgetHostView()
+ ->FilterChildGestureEvent(gesture_event);
return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
}

Powered by Google App Engine
This is Rietveld 408576698