commit | 37a15052f10515874939931d9ed725e94bc94ee7 | [log] [tgz] |
---|---|---|
author | Dominick Ng <dominickn@chromium.org> | Tue Jul 17 23:56:35 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jul 17 23:56:35 2018 |
tree | dc14e1c52bee0c94447a0dc53c221015155870a5 | |
parent | 475a55ea17d4fc6ae1efbdea9300a92d5ee86616 [diff] |
Remove browser-initiated navigations from WebContentsObserver::DidGetUserInteraction. Some types of user interactions are used as a signal to ResourceDispatcherHostImpl. Prior to https://crrev.com/1735833002, scrolling was not one of them, and part of that CL's work explicitly filtered out MouseWheel events from being passed to ResourceDispatcherHostImpl. It also changed user-initiated navigations to call the new DidGetUserInteraction method with the blink::WebInputEvent::Undefined type. However, only a limited subset of user-initiated navigations were passed through this method: Ctrl-R/refresh button reloads, omnibox navigations, and NTP/bookmark navigations. Other user-initiated navigations such as back/forward buttons were omitted. https://crrev.com/1776843003 introduced wheel gesture events that generalised touch and mouse scrolling into one concept. https://crrev.com/1748553002 updated the user interaction code to use the new GestureScrollBegin event in place of MouseWheel events, but did not update the type check for forwarding to ResourceDispatcherHostImpl. https://crrev.com/1964863002 introduced NavigationHandle::IsRendererInitiated, which returns true if a navigation was initiated by the renderer process, and false if it was initiated by the browser process (i.e. it was user-initiated). This is a broader scope that the existing user-initiated navigations signaled through DidGetUserInteraction, namely including back/forward navigations. This CL improves on the user gesture handling in WebContentsImpl by: * removing user-initiated navigations from DidGetUserInteraction, and updating clients to listen to Did{Start/Finish}Navigation and check NavigationHandle::IsRendererInitiated. This includes more types of user-initiated navigations. * restoring the user gesture signal to ResourceDispatcherHostImpl back to how it was prior to https://crrev.com/1748553002 - listening to keydown, mouse click, taps, and certain user-initiated navigations. BUG=827659 Change-Id: I639270b21446104f22c8ae9b8b939eb96af3cabd Reviewed-on: https://chromium-review.googlesource.com/1125703 Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Reviewed-by: Sébastien Marchand <sebmarchand@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Jialiu Lin <jialiul@chromium.org> Reviewed-by: Mustafa Emre Acer <meacer@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Dominick Ng <dominickn@chromium.org> Cr-Commit-Position: refs/heads/master@{#575857}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .