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..aa6e26433b60afe423d848caac84237e2a54e267 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 scaleg |
kenrb
2017/01/24 17:13:27
nit: Typo.
wjmaclean
2017/01/24 18:24:26
Done.
|
+ for (auto entry : owner_map_) { |
+ if (entry.second != root_view && |
+ !entry.second->IsRenderWidgetHostViewGuest()) { |
+ entry.second->ProcessGestureEvent(*event, latency); |
kenrb
2017/01/24 17:13:27
Will this eventually get removed? It feels weird t
wjmaclean
2017/01/24 18:24:26
Yes, this will disappear with Salamander.
kenrb
2017/01/24 18:47:30
This warrants a TODO, marking it as temporary, the
|
+ } |
+ } |
+ } |
if (event->type() == blink::WebInputEvent::GesturePinchEnd) { |
in_touchscreen_gesture_pinch_ = false; |
// If the root view wasn't already receiving the gesture stream, then we |