• David Bokan's avatar
    Fix Aura double-tap touch-action filtering · a27f2244
    David Bokan authored
    The double-tap gesture on Aura (which causes zoom) does not respect the
    touch-action filter as it should. i.e., double-tapping over a region
    with touch-action: none should prevent zooming.
    
    This is caused by IsGestureEvent() returning false for the
    TAP_UNCONFIRMED event. IsGestureEvent is used in EventHandler::OnEvent
    to determine whether to pass the event to OnGestureEvent and meant that
    the TAP_UNCONFIRMED gesture would get dropped at this point.
    
    The reason this was working on Android was that Android's
    GestureProivderClient is RenderWidgetHostViewAndroid. When
    FilteredGestureProvider forwards the gesture it passes it straight back
    to the RWHVA which doesn't go through the IsGestureEvent check mentioned
    above.
    
    On Aura, the GestureProviderClient is GestureProviderAura which passes
    the forwarded gesture back through WindowEventDispatch before finding
    the RenderWidgetHostViewAura. The WindowEventDispatch call chain is
    where we accidentally filtered the TAP_UNCONFIRMED gesture because of
    !IsGestureEvent. This means the TouchActionFilter never saw this
    gesture, which it needs to determine whether to filter the subsequent
    double-tap gesture.
    
    Bug: 865090
    Change-Id: I5f8932dcf8b33ec132fa946864a462610cc8413b
    Reviewed-on: https://chromium-review.googlesource.com/1213881Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
    Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
    Commit-Queue: David Bokan <bokan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#590173}
    a27f2244
event.h 39.7 KB