• David Bokan's avatar
    Fix touch action filter for double-tap-drag zoom · d713bb2e
    David Bokan authored
    The touch action filter currently relies on checking the
    GestureScrollBegin event for whether we need to filter or not. It
    assumes a pinch-zoom will cause a GSB with a pointer_count == 2 and so
    pinch-zoom is filtered in that way, since we always bracket GesturePinch
    events between a GSB and a GestureScrollEnd.
    
    However, this breaks down for double-tap-drag zoom (i.e. double tap but
    hold and drag the second tap to zoom). In this case, the pointer_count
    is 1 so we don't filter it.
    
    In this CL, we remove the bracketing of pinch gestures in the
    double-tap-drag zoom case and allow activating the filter at
    GesturePinchBegin. We must now track in the TouchActionFilter whether
    we've seen a GestureScrollBegin so that we know whether to apply and
    remove the filtering at GesturePinchBegin/GesturePinchEnd.
    
    Bug: 865090
    Change-Id: I25e426f6f48dbf0ebcecfbddee5e2d8cbcc40504
    Reviewed-on: https://chromium-review.googlesource.com/c/1279236
    Commit-Queue: David Bokan <bokan@chromium.org>
    Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
    Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#600937}
    d713bb2e
BUILD.gn 92.8 KB