Commit ca095304 authored by W. James MacLean's avatar W. James MacLean Committed by Commit Bot

Don't return base::nullopt for GesturePinch position.

One possible crash mechanism for this crash is if we return
base::nullopt when the touch_id == 0, cf.
DispatchTouchscreenGestureEvent().

Bug: 824774
Change-Id: I20e3c01bb4b8cbac8c5dbe3ad41d28a6b6843b78
Reviewed-on: https://chromium-review.googlesource.com/1024651Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552846}
parent 0221a1b1
...@@ -1047,7 +1047,7 @@ RenderWidgetHostInputEventRouter::FindTouchscreenGestureEventTarget( ...@@ -1047,7 +1047,7 @@ RenderWidgetHostInputEventRouter::FindTouchscreenGestureEventTarget(
// target we could just return nullptr for pinch events, but since we know // target we could just return nullptr for pinch events, but since we know
// where they are going we return the correct target. // where they are going we return the correct target.
if (blink::WebInputEvent::IsPinchGestureEventType(gesture_event.GetType())) if (blink::WebInputEvent::IsPinchGestureEventType(gesture_event.GetType()))
return {root_view, false, base::nullopt}; return {root_view, false, gesture_event.PositionInWidget()};
// Android sends gesture events that have no corresponding touch sequence, so // Android sends gesture events that have no corresponding touch sequence, so
// these we hit-test explicitly. // these we hit-test explicitly.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment