New issue
Advanced search Search tips

Issue 669670 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 307091



Sign in to add a comment

Overlay scrollbars shouldn't scale stroke when thinning.

Project Member Reported by bokan@chromium.org, Nov 29 2016

Issue description

Version: 57.0.2936.0
OS: ChromeOS

What steps will reproduce the problem?
(0) Ensure overlay scrollbars are turned on (chrome://flags)
(1) Visit https://material.io/
(2) Scroll the page to show the scrollbars over a dark area

What is the expected result?
The stroke on the scrollbar should be crip, same width as when the scrollbars are expanded

What happens instead?
When the scrollbars are thin, the stroke is scaled and antialiased so that it fades a bit.

I've attached zoomed in picture showing the difference in stroke between expanded and thinned. They should be the same.

 

Comment 1 by bokan@chromium.org, Nov 29 2016

Summary: Overlay scrollbars shouldn't scale stroke when thinning. (was: Overlay scrollbars should scale stroke when thinning.)

Comment 2 by bokan@chromium.org, Nov 29 2016

Owner: bokan@chromium.org

Comment 3 by bokan@chromium.org, Nov 29 2016

Status: Assigned (was: Available)

Comment 4 by skobes@chromium.org, Dec 21 2016

You forgot the attachment :)

Comment 5 by bokan@chromium.org, Dec 21 2016

Indeed, thanks.
Screenshot from 2016-12-21 14:01:10.png
5.5 KB View Download
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 22 2016

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

commit 65f5be3dadd8a0a752effd7073a12f9ecdb1c472
Author: bokan <bokan@chromium.org>
Date: Thu Dec 22 18:03:02 2016

Aura overlay scrollbars shouldn't invalidate thumb on scroll or enabled state.

We still invalidate the scroll controls on ScrollableArea, which is used if the
scrollbars are painted into the ScrollableArea itself, rather than composited
layers.

The thumbNeedsRepaint property on Scrollbar is used to repaint a scrollbar thumb
that's actually changed appearance. This isn't actually needed when the thumb
simply changes scroll offset. Nor is it needed when the enabled/disabled state
changes since the compositor knows how to hide them itself. Thus, a composited
scrollbar now needs to repaint only when the hovered or pressed state changes
or if there's a geometry change.

BUG= 669670 

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

[modify] https://crrev.com/65f5be3dadd8a0a752effd7073a12f9ecdb1c472/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/65f5be3dadd8a0a752effd7073a12f9ecdb1c472/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
[modify] https://crrev.com/65f5be3dadd8a0a752effd7073a12f9ecdb1c472/third_party/WebKit/Source/platform/scroll/ScrollbarTestSuite.h
[modify] https://crrev.com/65f5be3dadd8a0a752effd7073a12f9ecdb1c472/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
[modify] https://crrev.com/65f5be3dadd8a0a752effd7073a12f9ecdb1c472/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
[modify] https://crrev.com/65f5be3dadd8a0a752effd7073a12f9ecdb1c472/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h
[add] https://crrev.com/65f5be3dadd8a0a752effd7073a12f9ecdb1c472/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlayTest.cpp

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 2 2017

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

commit e7a058aa7db4c0fc172200fd16c800ec1b94d8e6
Author: bokan <bokan@chromium.org>
Date: Thu Mar 02 22:42:51 2017

Use nine-patch resource for drawing Aura overlay scrollbar thumb.

This patch factors out the nine-patch generation from NinePatchLayer
into a NinePatchGenerator and uses it to create a nine-patch scrollbar
layer that can change size without a repaint. This is used only in the
compositor. Scrollbars painted in Blink paint to the full required size.

The new scrollbar type is implemented in OverlayScrollbarLayer and Impl.
We add methods to NativeTheme to draw 9-patch versions of a theme part,
currently implemented for the scrollbar thumb for overlays in
NativeThemeAura. The NativeTheme provides two methods:

NinePatchCanvasSize() returns the size of the smallest canvas onto which
a nine patch part can be drawn.

NinePatchAperture() returns the rect in the canvas, whose size is
provided by the method above, which will be used as the middle patch in
the resource. Resizing the part will stretch only the middle patch in
both directions.

This is used mainly for the thinning animation in Aura overlay
scrollbars. We still need to repaint due to hover and pressed effects.
Technically, we could avoid repainting on size changes too but this would
require some additional work.

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

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

[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/BUILD.gn
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/blink/scrollbar_impl.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/blink/scrollbar_impl.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/blink/web_compositor_support_impl.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/blink/web_compositor_support_impl.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/blink/web_scrollbar_layer_impl.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/blink/web_scrollbar_layer_impl.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/input/scrollbar.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/layers/nine_patch_layer_impl.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/layers/nine_patch_layer_impl.h
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/layers/painted_overlay_scrollbar_layer.cc
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/layers/painted_overlay_scrollbar_layer.h
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/layers/painted_overlay_scrollbar_layer_impl.cc
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/layers/painted_overlay_scrollbar_layer_impl.h
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/quads/nine_patch_generator.cc
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/quads/nine_patch_generator.h
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/quads/nine_patch_generator_unittest.cc
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/test/data/overlay_scrollbar_scaled_down.png
[add] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/test/data/overlay_scrollbar_scaled_up.png
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/test/fake_scrollbar.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/test/fake_scrollbar.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/cc/trees/layer_tree_host_pixeltest_scrollbars.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/content/child/webthemeengine_impl_default.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/content/child/webthemeengine_impl_default.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/exported/WebScrollbarThemeGeometryNative.cpp
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/exported/WebScrollbarThemeGeometryNative.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/exported/WebScrollbarThemePainter.cpp
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/public/platform/WebCompositorSupport.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/public/platform/WebScrollbarThemeGeometry.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/public/platform/WebScrollbarThemePainter.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/third_party/WebKit/public/platform/WebThemeEngine.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/native_theme/native_theme.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/native_theme/native_theme_aura.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/native_theme/native_theme_aura.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/native_theme/native_theme_base.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/native_theme/native_theme_base.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/native_theme/native_theme_win.cc
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/native_theme/native_theme_win.h
[modify] https://crrev.com/e7a058aa7db4c0fc172200fd16c800ec1b94d8e6/ui/views/view_unittest.cc

Comment 8 by bokan@chromium.org, Mar 3 2017

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
Chrome OS 9532.0.0, 60.0.3092.0

Sign in to add a comment