New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 8 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 672921



Sign in to add a comment

Control swipe-navigation on Mac and Cros using overscroll-behavior

Project Member Reported by sunyunjia@chromium.org, Sep 5 2017

Issue description

This is a feature improvement of scroll-boundary-behavior. In short, it allows web developers to use a css value to specify whether default overscroll behaviors (swipe-navigation in this bug) will be generated. More details can be found at https://wicg.github.io/scroll-boundary-behavior/

Currently behind a flag, scroll-boundary-behavior can control scroll propagation in inner elements and pull-to-refresh on android.

It should support controlling swipe-navigation on Mac and Chrome OS as well.

 
Labels: M-64
Description: Show this description
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/397a1f595ec1fddea298385a48250d02267525f2

commit 397a1f595ec1fddea298385a48250d02267525f2
Author: Sandra Sun <sunyunjia@chromium.org>
Date: Thu Oct 26 23:31:47 2017

Use scroll-boundary-behavior to control swipe-navigation on Mac.

This is a feature improvement of scroll-boundary-behavior. In short, it
allows web developers to use a css value to specify whether default
overscroll behaviors (swipe-navigation in this patch) will be generated.
Details can be found at https://wicg.github.io/scroll-boundary-behavior/

This patch uses scroll-boundary-behavior to control swipe-navigation on
Mac. This is implemented by overriding DidOverscroll in
RenderWidgetHostViewMac from RenderWidgetHostViewBase. By looking at the
ScrollBoundaryBehavior value in DidOverscrollParams, the
MacHistorySwiper decides whether to navigate or not.

Bug:  762023 
Change-Id: If9fdff4ea362e318d41ad81c2718a25161efc417
Reviewed-on: https://chromium-review.googlesource.com/650828
Commit-Queue: Sandra Sun <sunyunjia@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Reviewed-by: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512010}
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_delegate.mm
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.h
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/content/browser/renderer_host/render_widget_host_view_mac.h
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/content/public/browser/render_widget_host_view_mac_delegate.h
[modify] https://crrev.com/397a1f595ec1fddea298385a48250d02267525f2/content/shell/browser/renderer_host/shell_render_widget_host_view_mac_delegate.mm

Cc: moh...@chromium.org
mohsen@ mentioned to me that CrOs has a WIP pull-to-refresh feature. We should work with them to make sure overscroll-behavior (a.k.a. scroll-boundary-behavior) can also be used to disable that similar to how it works for Android P2R.

mohsen@: can you please point out where CrOS p2r resides?
to be clear, overscroll-behavior for CrOS p2r does not need to be in M64 but we should try to have it ready when that feature is ready to be shipped. Perhaps we should have a separate bug for it ? 

Comment 6 by moh...@chromium.org, Oct 30 2017

Thanks majidvp@. content::OverscrollController [1] is responsible for controlling both overscroll navigation and pull-to-refresh on CrOS (actually, all Aura platforms).

Note that overscroll navigation is enabled by default. However, we are working on a new "simple" UI which can be enabled by setting --overscroll-history-navigation flag to "Simple". Pull-to-refresh can be enabled by setting --overscroll-history-navigation flag to "Simple" AND --pull-to-refresh flag to "Enabled" (yes, pull-to-refresh is dependent on "simple" overscroll navigation!).

[1] https://cs.chromium.org/chromium/src/content/browser/renderer_host/overscroll_controller.h
Summary: Control swipe-navigation on Mac and Cros using overscroll-behavior (was: Control swipe-navigation on Mac and Cros using scroll-boundary-behavior)
Cc: msrchandra@chromium.org tdres...@chromium.org
 Issue 369982  has been merged into this issue.
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cbd6da4f62ffc58abc242d14028a55a9d2f93195

commit cbd6da4f62ffc58abc242d14028a55a9d2f93195
Author: Sandra Sun <sunyunjia@chromium.org>
Date: Fri Jan 05 17:22:12 2018

Use overscroll-behavior to control swipe-navigation on CrOS

Use overscroll-behavior css property on viewport defining element to
control overscroll navigation. This patch enables this for CrOS swipe
navigation. Details can be found at
https://wicg.github.io/overscroll-behavior/

This is implemented by plumbing OverscrollBehavior to
OverscrollWindowAnimation by OnOverscrollBehaviorUpdate(). By looking
at the OverscrollBehavior value, the OverscrollWindowAnimation decides
whether to navigate or not.

Bug:  762023 
Change-Id: I47e50fec12a7f508ffa04c2e53376101fc1b98be
Reviewed-on: https://chromium-review.googlesource.com/740184
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Commit-Queue: Sandra Sun <sunyunjia@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527306}
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/renderer_host/overscroll_controller.cc
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/renderer_host/overscroll_controller.h
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/renderer_host/overscroll_controller_delegate.h
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/web_contents/aura/gesture_nav_simple.h
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/web_contents/aura/overscroll_window_animation.cc
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/web_contents/aura/overscroll_window_animation.h
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/web_contents/aura/overscroll_window_animation_unittest.cc
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/web_contents/aura/overscroll_window_delegate_unittest.cc
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/web_contents/web_contents_view_aura.cc
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/browser/web_contents/web_contents_view_aura.h
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/test/mock_overscroll_controller_delegate_aura.h
[modify] https://crrev.com/cbd6da4f62ffc58abc242d14028a55a9d2f93195/content/test/test_overscroll_delegate.h

Status: Fixed (was: Started)
Blocking: 672921

Sign in to add a comment