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

Issue 606395 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 558575



Sign in to add a comment

[scroll anchoring] don't show overlay scrollbars on anchoring adjustments

Project Member Reported by ojan@chromium.org, Apr 25 2016

Issue description

Because we're just causing a scroll, the user sees the scrollbar moving around as the page is loading above the fold content. We should consider special casing scroll anchoring induced scrolls to not show overlay scrollbars.
 
Owner: ymalik@chromium.org
ymalik@ is this something that you can undertake?
Status: Assigned (was: Untriaged)
I kind of like it because it tells us if Scroll Anchoring is doing its thing but it's probably a distraction for everyone else.
Status: WontFix (was: Assigned)
Lets hold off on this until we get more feedback.
Labels: Hotlist-Input-Dev

Comment 6 by skobes@chromium.org, Mar 17 2017

Cc: sunn...@chromium.org
Owner: skobes@chromium.org
Status: Assigned (was: WontFix)
Summary: [scroll anchoring] don't show overlay scrollbars on anchoring adjustments (was: scrollbar jumps around when scroll anchoring)
Let's do this.  Shouldn't be too hard.

Comment 7 by skobes@chromium.org, Mar 21 2017

Cc: aelias@chromium.org jdduke@chromium.org
Labels: -Pri-3 OS-Chrome OS-Mac Pri-2
Some thoughts after investigating.  The layout changes that trigger scroll anchoring typically also change the size of the scroller's contents.  So there's not much point in fixing this unless we also stop showing scrollbars on content resizes.

It seems like showing on resize was a deliberate decision, at least to the point that we have a separate fade-out delay for it (LayerTreeSettings::scrollbar_fade_out_resize_delay).  But this was added in  issue 361141  for the purpose of preventing animations during page load.

@aelias / @jdduke, is there a reason we want to show scrollbars on resize, or can I eliminate this behavior?

Comment 8 by aelias@chromium.org, Mar 21 2017

The reason is to tell the user how much space is newly available to scroll.  It's relevant during initial page load where you can understand the progress of the load by watching the scrollbar shrink, or when reaching the end of "infinite scrollers" where it tells you the next content has loaded now.

But anyway, scroll anchoring changes both the size and the scroll offset, so even if you suppressed the unfade-on-resize behavior, you'd still be showing the scrollbar due to the offset.  So it still seems to me you'd want to add a special-case signal for scroll anchoring rather than altering the core logic.

Comment 9 by skobes@chromium.org, Mar 21 2017

> But anyway, scroll anchoring changes both the size and the scroll offset, so even if you suppressed the unfade-on-resize behavior, you'd still be showing the scrollbar due to the offset.

My problem is the other way around: I have a straightforward patch that suppresses showing on anchoring-induced offset changes, but it has little effect because of the resize.

Are you suggesting that we suppress show-on-resize only when there is a scroll anchoring adjustment in the same frame?  That seems weird.

We do have a progress bar during page load, which should be a better signal than scrollbar shrinkage.
> Are you suggesting that we suppress show-on-resize only when there is a scroll anchoring adjustment in the same frame?  That seems weird.

Yeah.  It doesn't seem that weird to me.  The resize show is only split out because of the different timing delay.  Originally, generically anything that would cause the scrollbar to change position or size would also cause it to show.

Comment 11 by ojan@chromium.org, Mar 21 2017

aelias: Can you point to examples where showing the scrollbar on resize is valuable? Also, does Android native do this? I'm having trouble finding an app that does.

I understand your description, but I can't seem to find pages where it happens much. When I do encounter it, I'm usually annoyed by it flashing while I'm trying to read.


Yeah, looks like Android native doesn't do it, it shows at time of creation and visibility change instead.  CC doesn't explicitly hear about navigations today so it wouldn't be totally trivial to reproduce the creation-time behavior though, assuming we want to treat navigations like creation.

I don't have an example of a case where it's particularly valuable.  It's quite possible the flashiness outweighs the usefulness of the information about the size of the page -- I wouldn't be opposed to changing it.  We could change it to match the native behavior, or if that's messy another option might be to have a threshold of sufficiently large size change as a percentage.
A navigation creates a new scrollbar layer, so as long as they start out visible we're ok there.

Comment 14 by ojan@chromium.org, Mar 21 2017

If we can't point to content that's significantly better, my preference would be to remove it, i.e. only show the scrollbar when the scroller is created or when the user scrolls.

Of course, if the scrollbar is already visible and the content changes size, we'd still resize the scrollbar.
Project Member

Comment 15 by bugdroid1@chromium.org, Mar 28 2017

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

commit 56451775d90238d9def5e9663771de8d0ca7ef6f
Author: skobes <skobes@chromium.org>
Date: Tue Mar 28 18:46:38 2017

Feed ScrollableArea::showOverlayScrollbars into ScrollbarAnimationController.

No behavior change yet since every scroll currently hits SAC::DidScrollUpdate,
but this adds plumbing to let Blink make the decision.

BUG= 606395 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2770293003
Cr-Commit-Position: refs/heads/master@{#460178}

[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/blink/web_layer_impl.cc
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/blink/web_layer_impl.h
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/input/scrollbar_animation_controller.cc
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/input/scrollbar_animation_controller.h
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/layers/layer.cc
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/layers/layer.h
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/layers/layer_impl.cc
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/layers/layer_impl.h
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/trees/layer_tree_impl.cc
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/cc/trees/layer_tree_impl.h
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.h
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
[modify] https://crrev.com/56451775d90238d9def5e9663771de8d0ca7ef6f/third_party/WebKit/public/platform/WebLayer.h

Status: Started (was: Assigned)
Patches up:
[1] http://crrev.com/2841763002 Rename ScrollType helper and combine some redundant checks
[2] http://crrev.com/2835403002 Call ScrollableArea::ShowOverlayScrollbars for explicit scrolls only
[3] http://crrev.com/2838513003 ScrollAnimatorMac should post contentAreaScrolled only for explicit scrolls
[4] http://crrev.com/2834393003 Re-enable ScrollbarAnimationController::DidRequestShowFromMainThread
[5] http://crrev.com/2842553003 Call SAC::DidScrollUpdate only for compositor-triggered scrolls
[6] http://crrev.com/2838053002 Remove resize fade delay plumbing

(Comment #6 was wrong.)
Project Member

Comment 17 by bugdroid1@chromium.org, Apr 26 2017

Project Member

Comment 18 by bugdroid1@chromium.org, Apr 26 2017

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

commit bd0fcfc50787bed5d42f1c8fab247234c1a6a20e
Author: skobes <skobes@chromium.org>
Date: Wed Apr 26 06:13:09 2017

Call ScrollableArea::ShowOverlayScrollbars for explicit scrolls only.

We now call ShowOverlayScrollbars for user and programmatic scrolls, but not for
scroll anchoring scrolls or content area resizes.

In most cases the effects will not be observable until we update the show
triggers in the compositor (an upcoming patch).

BUG= 606395 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2835403002
Cr-Commit-Position: refs/heads/master@{#467252}

[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/core/frame/FrameView.cpp
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/core/frame/VisualViewport.cpp
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/platform/scroll/ScrollableArea.cpp
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/platform/scroll/ScrollbarTestSuite.h
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlayTest.cpp
[modify] https://crrev.com/bd0fcfc50787bed5d42f1c8fab247234c1a6a20e/third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Project Member

Comment 19 by bugdroid1@chromium.org, Apr 26 2017

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

commit 66aacfa671360982f234c0fbd3b186efe21ee763
Author: skobes <skobes@chromium.org>
Date: Wed Apr 26 23:40:39 2017

Re-enable ScrollbarAnimationController::DidRequestShowFromMainThread.

Disabling it didn't fix  http://crbug.com/706927 , but caused a new regression in
 http://crbug.com/715279 , while  http://crbug.com/712453  recovered for some other
reason.

BUG= 606395 ,  706927 ,  712453 ,  715279 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2834393003
Cr-Commit-Position: refs/heads/master@{#467513}

[modify] https://crrev.com/66aacfa671360982f234c0fbd3b186efe21ee763/cc/input/scrollbar_animation_controller.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Apr 28 2017

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

commit 697a467f819ce09da5209a3df13b8b92f33e35a4
Author: skobes <skobes@chromium.org>
Date: Fri Apr 28 02:54:17 2017

Call SAC::DidScrollUpdate only for compositor-triggered scrolls.

For everything else we should rely on SAC::DidRequestShowFromMainThread.

Additionally, ensure that show-from-main requests are processed in synchronous
compositing mode (which commits directly to the active tree).

BUG= 606395 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2842553003
Cr-Commit-Position: refs/heads/master@{#467855}

[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/cc/layers/scrollbar_layer_unittest.cc
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/cc/trees/layer_tree_host_impl.h
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/cc/trees/layer_tree_impl.cc
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/cc/trees/layer_tree_impl.h
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/third_party/WebKit/LayoutTests/paint/invalidation/border-radius-repaint-2-expected.png
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/third_party/WebKit/LayoutTests/paint/invalidation/border-radius-repaint-2.html
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/third_party/WebKit/LayoutTests/paint/invalidation/window-resize-no-layout-change1-expected.html
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/third_party/WebKit/LayoutTests/paint/invalidation/window-resize-no-layout-change1.html
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/third_party/WebKit/LayoutTests/paint/invalidation/window-resize-no-layout-change2-expected.html
[modify] https://crrev.com/697a467f819ce09da5209a3df13b8b92f33e35a4/third_party/WebKit/LayoutTests/paint/invalidation/window-resize-no-layout-change2.html

Status: Fixed (was: Started)

Sign in to add a comment