Commit cccd8b08 authored by Kevin McNee's avatar Kevin McNee Committed by Commit Bot

Update callers of WebGestureEvent::NeedsWheelEvent

I previously made the DCHECK in WebGestureEvent::NeedsWheelEvent
more strict, but overlooked these callers. Here we update these
remaining callers so that they won't hit the DCHECK.

Bug: 787924, 802369
Change-Id: I65ae2dc873b25d0a3d770f2581a278b06ce7e7d8
Reviewed-on: https://chromium-review.googlesource.com/c/1286767Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600782}
parent 9cec9406
......@@ -691,7 +691,9 @@ bool GuestViewBase::PreHandleGestureEvent(WebContents* source,
// Pinch events which cause a scale change should not be routed to a guest.
// We still allow synthetic wheel events for touchpad pinch to go to the page.
DCHECK(!blink::WebInputEvent::IsPinchGestureEventType(event.GetType()) ||
event.NeedsWheelEvent());
(event.SourceDevice() ==
blink::WebGestureDevice::kWebGestureDeviceTouchpad &&
event.NeedsWheelEvent()));
return false;
}
......
......@@ -40,7 +40,9 @@ bool AppWebContentsHelper::ShouldSuppressGestureEvent(
if (blink::WebInputEvent::IsPinchGestureEventType(event.GetType())) {
// Only suppress pinch events that cause a scale change. We still
// allow synthetic wheel events for touchpad pinch to go to the page.
return !event.NeedsWheelEvent();
return !(event.SourceDevice() ==
blink::WebGestureDevice::kWebGestureDeviceTouchpad &&
event.NeedsWheelEvent());
}
return false;
......
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