• Kevin McNee's avatar
    Consistent touchpad pinch behaviour for app windows and webviews · be51aadb
    Kevin McNee authored
    Currently, app windows (possibly containing webviews):
    1) suppress all pinch events which also suppresses the
       synthetic wheel event, but not touchscreen touch events, and
    2) allow "smart zoom" on Mac which can change the page scale even
       though other means of changing the page scale are suppressed.
    
    As a result of (1), if we have, say, google maps in a webview, a
    user can pinch zoom with a touchscreen, but not with a touchpad.
    
    We now suppress gesture events to app windows based on whether they
    cause a scale change. So now touchscreen and touchpad pinching are
    consistent since the page has access to the events so that it may
    implement custom pinch zoom behaviour, but unhandled events still
    do not result in a scale change for the app window. Also, smart
    zoom is suppressed to be consistent with other touchpad pinching.
    
    Bug: 725970, 874132
    Change-Id: I03dd2048002d69dc7c8a822fc727140c67d64706
    Reviewed-on: https://chromium-review.googlesource.com/1174933Reviewed-by: default avatarBen Wells <benwells@chromium.org>
    Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
    Reviewed-by: default avatarEhsan Karamad <ekaramad@chromium.org>
    Commit-Queue: Kevin McNee <mcnee@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#585489}
    be51aadb
web_view_browsertest.cc 171 KB