| 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 e3a036176bbdbf690e3546a543b0b2c005d3fd63..c70c8e342cfe41990b2eeb243faa00f998ba9b4a 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
|
| @@ -327,24 +327,22 @@ void RenderWidgetHostViewChildFrame::UnregisterSurfaceNamespaceId() {
|
| }
|
| }
|
|
|
| -void RenderWidgetHostViewChildFrame::WheelEventAck(
|
| - const blink::WebMouseWheelEvent& event,
|
| - InputEventAckState ack_result) {
|
| - if (frame_connector_ &&
|
| - (ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED ||
|
| - ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS))
|
| - frame_connector_->BubbleScrollEvent(event);
|
| -}
|
| -
|
| void RenderWidgetHostViewChildFrame::GestureEventAck(
|
| const blink::WebGestureEvent& event,
|
| InputEventAckState ack_result) {
|
| bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED ||
|
| ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
|
| - // GestureScrollBegin/End are always consumed by the target frame, so we only
|
| - // forward GestureScrollUpdate.
|
| - if (frame_connector_ &&
|
| - event.type == blink::WebInputEvent::GestureScrollUpdate && not_consumed)
|
| + // GestureScrollBegin is consumed by the target frame and not forwarded,
|
| + // because we don't know whether we will need to bubble scroll until we
|
| + // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused
|
| + // scroll extent is forwarded for bubbling, while GestureScrollEnd is
|
| + // always forwarded and handled according to current scroll state in the
|
| + // RenderWidgetHostInputEventRouter.
|
| + if (!frame_connector_)
|
| + return;
|
| + if ((event.type == blink::WebInputEvent::GestureScrollUpdate &&
|
| + not_consumed) ||
|
| + event.type == blink::WebInputEvent::GestureScrollEnd)
|
| frame_connector_->BubbleScrollEvent(event);
|
| }
|
|
|
|
|