commit | bbea8a99d2643b97d9dfe9d368cba6d129850a28 | [log] [tgz] |
---|---|---|
author | sunyunjia <sunyunjia@chromium.org> | Thu Aug 31 11:18:54 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Aug 31 11:18:54 2017 |
tree | f93f59730cc93979c8a4f09eb5e400aca90e5106 | |
parent | b65f4bf201bd2220bab6cf83887e071a714afcee [diff] |
Use scroll-boundary-behavior to control overscroll-refresh/glow on android. Overscroll navigation is a feature of Chrome. Users can pull verticallly to refresh the page on android, or swipe horizontally to browse history on desktop platform. Overscroll-glow is a visual effect indicating user that his scroll has passed the extent of the scroller. However, for some mobile web applications, navigation or glow does not make sense. This patch allows users to use a css attribute: scroll-boundary-behavior on the viewport defining element in order to control overscroll-navigation and overscroll-glow. On main thread, we set this property in OverscrollController, and on the compositor thread, we plumb this property to LayerTreeImpl. When overscroll happens, scroll-boundary-behavior is bundled in did_overscroll_params and is passed to OverscrollControllerAndroid::Overscrolled(). Thus, we make the decision of whether to pull-to-refresh and whether to glow on Overscrolled() as opposed to immediately after ScrollUpdateAck. Spec: https://wicg.github.io/scroll-boundary-behavior/ Design Doc: https://docs.google.com/a/google.com/document/d/1cqyeFamVmSu5EN5sBpQFB3Madm-41BtJEMDEbW1xdh4/edit?usp=sharing BUG=656801 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2884423003 Cr-Commit-Position: refs/heads/master@{#498816}
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 .