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

Issue 617618 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Scrollbars in screenshots

Project Member Reported by eseckler@chromium.org, Jun 6 2016

Issue description

Determine what kind of controls for scrollbar style/visibility in screenshots are needed + implement that functionality.

For example, the viewport itself likely shouldn't show scrollbars. What about e.g. embedded frames?

Note: It is also possible to style/hide scrollbars through webkit-specific css pseudo classes (which could be set e.g. by injecting JavaScript into the target page).
 
I think you're going to want to use the mock theme or the aura theme for scrollbars. Mock would work on all platforms which is nice but they're ugly. If you don't want them to appear at all I think you want overlay scrollbars. If you want something more complicated that means deeper engine changes and we'd have to decide if we want those so I'd start with a combination of something we already have. :)
We'd generally like to make this configurable for our users. For some users, mock scrollbars will be fine/ideal, but we'd also like to support taking screenshots without them showing anywhere. Overlay scrollbars are fine for this generally, except that they show on scrolling. (For us, programmatic scrolling is particularly relevant, e.g. to position the right contents into the window for screenshotting).

Maybe there's some way to make the timeout for overlay scrollbars configurable, so that we can effectively hide them immediately after scrolls?
Cc: halliwell@chromium.org
Owner: eseckler@chromium.org
Status: Started (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 5 2016

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

commit 025a020bd57294d44f907daef1badc5683e9220b
Author: eseckler <eseckler@chromium.org>
Date: Fri Aug 05 09:16:12 2016

Add flag to hide (native composited) scrollbars completely.

For headless chrome, we're interested in controlling the visibility of scrollbars in screenshots. As a first step, we would like to hide scrollbars completely. This patch adds a --enable-hidden-scrollbar flag, which utilizes non-animated overlay scrollbars. When enabled, the scrollbars never appear and are effectively hidden completely. This affects only native composited scrollbars (a future patch will add support for hiding native non-composited scrollbars in Blink).

BUG= 617618 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel

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

[modify] https://crrev.com/025a020bd57294d44f907daef1badc5683e9220b/cc/trees/layer_tree_host_impl_unittest.cc
[modify] https://crrev.com/025a020bd57294d44f907daef1badc5683e9220b/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/025a020bd57294d44f907daef1badc5683e9220b/content/renderer/gpu/render_widget_compositor.cc
[modify] https://crrev.com/025a020bd57294d44f907daef1badc5683e9220b/ui/native_theme/native_theme_switches.cc
[modify] https://crrev.com/025a020bd57294d44f907daef1badc5683e9220b/ui/native_theme/native_theme_switches.h

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 17 2016

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

commit 2b22b720242d5c9681a0b53cd56b542757ad7016
Author: eseckler <eseckler@chromium.org>
Date: Wed Aug 17 14:33:19 2016

Hide non-composited native scrollbars.

This is a follow up to crrev.com/2175163005, which hides
composited native scrollbars.

BUG= 617618 

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

[modify] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/content/child/runtime_features.cc
[add] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/third_party/WebKit/LayoutTests/fast/scrolling/hide-scrollbars-expected.html
[add] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/third_party/WebKit/LayoutTests/fast/scrolling/hide-scrollbars.html
[modify] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp
[modify] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlayMock.h
[modify] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp
[modify] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/third_party/WebKit/public/web/WebRuntimeFeatures.h
[modify] https://crrev.com/2b22b720242d5c9681a0b53cd56b542757ad7016/ui/native_theme/native_theme_switches.cc

Status: Fixed (was: Started)
We now have support for hiding native scrollbars via the --hide-scrollbars flag. Closing this bug, please file new bugs for additional features / bugs regarding this.
(Cross posting from email)

As the unofficial Chromium flags owner:

Flags must be limited-time options with a deprecation and removal plan.  What is the motivation for adding this flag, and the plan for removing it?

It is not acceptable to add this flag permanently, so hopefully that was not your intent.
Cc: pkasting@chromium.org
Eventually, it should become a more selective option controlled through an API e.g. at WebContents level, rather than flag. Filed another bug to track that:
https://bugs.chromium.org/p/chromium/issues/detail?id=639806

Sign in to add a comment