| Index: content/browser/renderer_host/render_widget_host_input_event_router.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc
|
| index cb96ee2baaebbe5c11a0de76ae583bf83fb0c90c..888dfd7d0d1991edc3084110ae3917e4770e6cdc 100644
|
| --- a/content/browser/renderer_host/render_widget_host_input_event_router.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
|
| @@ -35,6 +35,12 @@ blink::WebGestureEvent DummyGestureScrollUpdate(double timeStampSeconds) {
|
| timeStampSeconds);
|
| }
|
|
|
| +bool IsGesturePinchEvent(const blink::WebGestureEvent* event) {
|
| + return event->type() == blink::WebInputEvent::GesturePinchBegin ||
|
| + event->type() == blink::WebInputEvent::GesturePinchUpdate ||
|
| + event->type() == blink::WebInputEvent::GesturePinchEnd;
|
| +}
|
| +
|
| } // anonymous namespace
|
|
|
| namespace content {
|
| @@ -689,6 +695,18 @@ void RenderWidgetHostInputEventRouter::RouteTouchscreenGestureEvent(
|
|
|
| if (in_touchscreen_gesture_pinch_) {
|
| root_view->ProcessGestureEvent(*event, latency);
|
| + if (IsGesturePinchEvent(event)) {
|
| + // Broadcast the pinch events to all subframes so they can update their
|
| + // PageScales with the deltas in the events. We don't broadcast to
|
| + // RenderWidgetHostViewGuest as it has a separate mechanism for
|
| + // propagating page scale.
|
| + for (auto entry : owner_map_) {
|
| + if (entry.second != root_view &&
|
| + !entry.second->IsRenderWidgetHostViewGuest()) {
|
| + entry.second->ProcessGestureEvent(*event, latency);
|
| + }
|
| + }
|
| + }
|
| if (event->type() == blink::WebInputEvent::GesturePinchEnd) {
|
| in_touchscreen_gesture_pinch_ = false;
|
| // If the root view wasn't already receiving the gesture stream, then we
|
|
|