0

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/1286767
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Kevin McNee <mcnee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600782}
This commit is contained in:
Kevin McNee
2018-10-18 16:10:01 +00:00
committed by Commit Bot
parent 9cec94065f
commit cccd8b081b
2 changed files with 6 additions and 2 deletions
components/guest_view/browser
extensions/browser/app_window

@ -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;