New issue
Advanced search Search tips

Issue 724507 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression: Scrollbar doesn't appear with Rubberband effect

Project Member Reported by meh...@chromium.org, May 19 2017

Issue description

Chrome Version: 60.0.3104.0 Canary
OS: MacOS 10.12.5

What steps will reproduce the problem?
(1) Enable "Show scrollbars only automatically based on mouse or trackpad" in the OSX system settings;
(2) Visit a long page;
(3) Scroll to the top or end of the page and wait, that the scrollbar disappears;
(4) Now scroll again, so that the Rubberband effect appears.

What is the expected result?
The scrollbar should appear.

What happens instead?
The scrollbar doesn't appear.

Please use labels and text to provide additional information.
This is a regression. Works fine in Chrome Stable 58.0.3029.110. It is broken in latest Canary 60.0.3104.0.

A screencast is attached.

Thanks for fixing it in advance!
 
scrollbar_rubberband_issue.mov
18.9 MB Download

Comment 1 by meh...@chromium.org, May 19 2017

Labels: Needs-Bisect
Cc: jmukthavaram@chromium.org
Labels: -Needs-Bisect M-60 hasbisect
Able to reproduce the issue on Mac using latest Canary-60.0.3104.0.
Manual Bisect:
-------------
Good-60.0.3095.0-Revision-470437
Bad-60.0.3096.0-Revision-470759

Bisect Tool info: (Below with Python old script as the new bisect has the issue with above good ,bad range).
-----------------
You are probably looking for a change made after 470564 (known good), but no later than 470576 (first known bad).
CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/0cdd7d5c0f0c9e6410fc0d036382857535026701..83e22f1c302dc7af075be861e90be4e23d83a355

Could someone from dev team please look into this issue as we are unable to find the exact suspect from the above Change log.

Thank you..!!


Comment 3 by meh...@chromium.org, May 22 2017

Labels: ReleaseBlock-Stable
Owner: chaopeng@chromium.org
Status: Assigned (was: Untriaged)
Thanks for the regression range.

https://codereview.chromium.org/2870733002 is touching scrollbars and could be the culprit?!

chaopeng@: Can you please check, if your change is causing this regression? Thank you in advance!
Cc: chaopeng@chromium.org
Owner: pdr@chromium.org
I found this issue is from https://codereview.chromium.org/2867793002 by bisect. pdr@ PTAL. 

Comment 5 by pdr@chromium.org, May 26 2017

Cc: pdr@chromium.org
Owner: chaopeng@chromium.org
chaopeng, I bisected this manually and I think it is https://codereview.chromium.org/2870733002 after all. I synced to before it (b50f6446eb79c4aaaac0a5eefdf90d2b4a99ce54~1) and could not reproduce, and synced at your change (b50f6446eb79c4aaaac0a5eefdf90d2b4a99ce54) and could reproduce. I think this is your change after all.

It's very likely my change also affected elastic overflow scrollbars though. I'm new to this area of the compositor and have been making some big changes. Could you be hitting a different bug that was caused by my patch? Can you describe the behavior you used to bisect to my change?

Comment 7 by pdr@chromium.org, May 31 2017

chaopeng, I am out this week for jury duty (serving on a jury until June 2nd). Would you be able to investigate this while I'm out?
Yes, I already working on this.
This issue is caused by my patch (b50f6446eb79c4aaaac0a5eefdf90d2b4a99ce54). I assigned `settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY` for default which we assigned `LayerTreeSettings::NO_ANIMATOR` before.

Then in LayerTreeImpl::RegisterScrollbar[1] - LayerTreeHostImpl::RegisterScrollbarAnimationController[2] because we set scrollbar_animator=Android and isOverlayScrollbar returns true[3] we create ScrollbarAnimationController to handle scrollbar's opacity. So scrollbar has 0 opacity when overscroll[4].

[1] https://cs.chromium.org/chromium/src/cc/trees/layer_tree_impl.cc?rcl=05d5a8764e7541360793bdb1b1c06748121fa0d9&l=1709
[2] https://cs.chromium.org/chromium/src/cc/trees/layer_tree_host_impl.cc?rcl=05d5a8764e7541360793bdb1b1c06748121fa0d9&l=3744
[3] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm?rcl=df421e877181f53cf6e5aeb1611f88766efc3f5c&l=344
[4] https://cs.chromium.org/chromium/src/cc/input/scrollbar_animation_controller.cc?rcl=c3568295e5606b20908b6155fd3cd0052fdb53be&l=218
I have 2 option for  crbug.com/724507 :

1. Pump isMacOverlayScrollbar from blink to cc. Then not create ScrollbarAnimationController for MacOverlayScrollbar
2. In LayerTreeHostImpl::RegisterScrollbarAnimationController, we quick return for Mac PaintedScrollbarLayerImpl because Mac non Overlay Scrollbar will not hit LTHI::RegisterScrollbarAnimationController and Emulator Android Overlay Scrollbar will be SolidColorScrollbarLayerImpl.

Which one you think is better? bokan@ pdr@

Comment 11 by pdr@chromium.org, Jun 2 2017

This bug was caused because settings.scrollbar_animator is wrong on mac, but don't we have similar issues with settings.solid_color_scrollbar_color and the fade delay? In other words, when emulating android on mac, do we need to adjust more than just the scrollbar_animator setting?

There are currently two early-outs for creating the animation controller. It would be great if these could be unified behind a single function somehow:
1) In LayerTreeImpl::RegisterScrollbar we check scrollbar_layer->is_overlay_scrollbar()
2) In LayerTreeHostImpl::RegisterScrollbarAnimationController we check settings().scrollbar_animator

Could we remove the scrollbar settings entirely and plumb all of this info on the scrollbar layer? This is sort of your first option but would use more explicit settings (e.g., "bool disable_overscroll_fade()" instead of "bool is_mac_overlay_scrollbar()").
This is in the M60 branch so we'll need a short term fix we can merge back. Mac doesn't use the ScrollarAnimationController from CC (I think the assumption in your patch was that setting it to Android should be fine because of that) so maybe if we can prevent calling REgisterScrollbarAnimationController for PaintedScrollbarLayers on Mac that should be a quick fix.

For a non-bandaid solution, I think plumbing the info on each scrollbar layer is overkill, we never want to have a mix of these properties on a page so they really belong on the compositor. It seems like we should default Mac to NO_ANIMATOR as before but have DevTools change these settings to match Android only when it enters emulation. Come to think of it, I don't think that should be very hard so if that turns out to be fairly straightforward maybe we can just merge that back.

Comment 13 by pdr@chromium.org, Jun 2 2017

I really like the idea of changing layer tree settings. I thought we could not do that because they are for the entire layer tree and we may still need to show regular mac overlay scrollbars on the same page.
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 6 2017

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

commit 4795906652460b283e526e6745057d77f0133980
Author: chaopeng <chaopeng@chromium.org>
Date: Tue Jun 06 15:06:41 2017

Prevent create ScrollbarAnimationController for Mac Overlay Scrollbar

 crbug.com/724507  is caused by my patch
(crrev.com/b50f6446eb79c4aaaac0a5eefdf90d2b4a99ce54). I assigned
`settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY`
for default which we assigned `LayerTreeSettings::NO_ANIMATOR` before.
Which can give mobile emulator correct settings but in
LayerTreeImpl::RegisterScrollbar -
LayerTreeHostImpl::RegisterScrollbarAnimationController we create
ScrollbarAnimationController to handle scrollbar's opacity.

In this patch, we add GetScrollbarAnimator to ScrollbarLayerImplBase
and its subclasses. PaintedScrollbarLayerImpl::GetScrollbarAnimator can
always returns NO_ANIMATOR because AuraOverlayScrollbar is using
PaintedOverlayScrollbarLayerImpl, others can return based on
LayerTreeSettings. Then we can prevent create
ScrollbarAnimationController for Mac Overlay Scrollbar by checking
scrollbar's animator.

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

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

[modify] https://crrev.com/4795906652460b283e526e6745057d77f0133980/cc/layers/painted_scrollbar_layer_impl.cc
[modify] https://crrev.com/4795906652460b283e526e6745057d77f0133980/cc/layers/painted_scrollbar_layer_impl.h
[modify] https://crrev.com/4795906652460b283e526e6745057d77f0133980/cc/layers/scrollbar_layer_impl_base.cc
[modify] https://crrev.com/4795906652460b283e526e6745057d77f0133980/cc/layers/scrollbar_layer_impl_base.h
[modify] https://crrev.com/4795906652460b283e526e6745057d77f0133980/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/4795906652460b283e526e6745057d77f0133980/cc/trees/layer_tree_impl.cc

Thanks for the fix. 

Jyothi, please verify in tonight's canary.
Labels: TE-Verified-M61 TE-Verified-61.0.3123.0
Tested the issue on Mac 10.12.4 using chrome version#61.0.3123.0 with the steps mentioned in comment #0.Observed that the scroll bar ( rubber band effect) appeared properly when we scroll the web page which is very long as per the intended behavior. Hence adding TE-Verified labels.

Please find the attached screen cast for the same.
Thank you..!!

724507.mp4
6.0 MB View Download
Labels: Merge-Request-60
Project Member

Comment 18 by sheriffbot@chromium.org, Jun 7 2017

Labels: -Merge-Request-60 Hotlist-Merge-Approved Merge-Approved-60
Your change meets the bar and is auto-approved for M60. Please go ahead and merge the CL to branch 3112 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Please merge the patch to M60 branch(3112),Beta RC cut is scheduled @ 4.00 PM PST today(06/07).

Project Member

Comment 20 by bugdroid1@chromium.org, Jun 7 2017

Labels: -merge-approved-60 merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4ed7edd91d41218b4f7c4786782164b20a48ab04

commit 4ed7edd91d41218b4f7c4786782164b20a48ab04
Author: David Bokan <bokan@chromium.org>
Date: Wed Jun 07 18:49:42 2017

Prevent create ScrollbarAnimationController for Mac Overlay Scrollbar

 crbug.com/724507  is caused by my patch
(crrev.com/b50f6446eb79c4aaaac0a5eefdf90d2b4a99ce54). I assigned
`settings.scrollbar_animator = cc::LayerTreeSettings::ANDROID_OVERLAY`
for default which we assigned `LayerTreeSettings::NO_ANIMATOR` before.
Which can give mobile emulator correct settings but in
LayerTreeImpl::RegisterScrollbar -
LayerTreeHostImpl::RegisterScrollbarAnimationController we create
ScrollbarAnimationController to handle scrollbar's opacity.

In this patch, we add GetScrollbarAnimator to ScrollbarLayerImplBase
and its subclasses. PaintedScrollbarLayerImpl::GetScrollbarAnimator can
always returns NO_ANIMATOR because AuraOverlayScrollbar is using
PaintedOverlayScrollbarLayerImpl, others can return based on
LayerTreeSettings. Then we can prevent create
ScrollbarAnimationController for Mac Overlay Scrollbar by checking
scrollbar's animator.

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

Review-Url: https://codereview.chromium.org/2918753002
Cr-Original-Commit-Position: refs/heads/master@{#477287}
Review-Url: https://codereview.chromium.org/2930763002 .
Cr-Commit-Position: refs/branch-heads/3112@{#227}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}

[modify] https://crrev.com/4ed7edd91d41218b4f7c4786782164b20a48ab04/cc/layers/painted_scrollbar_layer_impl.cc
[modify] https://crrev.com/4ed7edd91d41218b4f7c4786782164b20a48ab04/cc/layers/painted_scrollbar_layer_impl.h
[modify] https://crrev.com/4ed7edd91d41218b4f7c4786782164b20a48ab04/cc/layers/scrollbar_layer_impl_base.cc
[modify] https://crrev.com/4ed7edd91d41218b4f7c4786782164b20a48ab04/cc/layers/scrollbar_layer_impl_base.h
[modify] https://crrev.com/4ed7edd91d41218b4f7c4786782164b20a48ab04/cc/trees/layer_tree_host_impl.cc
[modify] https://crrev.com/4ed7edd91d41218b4f7c4786782164b20a48ab04/cc/trees/layer_tree_impl.cc

Status: Fixed (was: Assigned)
Merged back to 3112
Labels: TE-Verified-M60 TE-Verified-60.0.3112.24
Verified the fix on Mac 10.12.5 using Chrome beta version #60.0.3112.24 as per the comment #0.
Attaching screen cast for reference.
Observed that scrollbar appeared with rubberband effect as expected.
Hence, the fix is working as expected. Attaching the screencast for reference.
Adding the verified labels.

Thanks...!!
724507.mp4
13.6 MB View Download

Comment 23 by bokan@chromium.org, Jun 15 2017

Status: Verified (was: Fixed)
Marking as verified re:#22

Sign in to add a comment