Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Issue 17550008: Make IsSolidColor() a property on CC scrollbar layers. (Closed)

Created:
7 years, 6 months ago by wjmaclean
Modified:
7 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, jam, apatrick_chromium, WRONG-USE-chromium
Visibility:
Public.

Description

Make IsSolidColor() a property on CC scrollbar layers. We need a mechanism to allow scrollbar layers to be "solid color" on a per-scrollbar-layer basis, rather than the current all-on-none situation controlled by a global parameter. This CL allows (1) forcing all scrollbar layers to be solid-color via a global parameter, or (2) marking individual scrollbar layers as solid-color via a constructor paremeter. Existing unit tests for solid-color scrollbar layers have been parameterized to test against both mechanisms. BUG=none

Patch Set 1 #

Total comments: 7

Patch Set 2 : Impl scrollbars use only is_solid_color value pushed from main thread. #

Patch Set 3 : Use DCHECK(layer_tree_host()) instead. #

Total comments: 5

Patch Set 4 : Add command line flag, remove need for DCHECK(). #

Total comments: 3

Patch Set 5 : Set color/thickness via command line also. #

Total comments: 1

Patch Set 6 : Use named constants for color/thickness strings. #

Patch Set 7 : Fix indentation of constant declarations. #

Total comments: 4

Patch Set 8 : Make color setting work properly. #

Total comments: 6

Patch Set 9 : Address Jochen's comments. #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -84 lines) Patch
M cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/base/switches.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M cc/base/switches.cc View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 2 comments Download
M cc/layers/scrollbar_layer.h View 1 2 3 4 5 6 7 8 4 chunks +6 lines, -2 lines 1 comment Download
M cc/layers/scrollbar_layer.cc View 1 2 3 4 5 6 7 8 8 chunks +16 lines, -11 lines 0 comments Download
M cc/layers/scrollbar_layer_impl.h View 1 4 chunks +7 lines, -2 lines 1 comment Download
M cc/layers/scrollbar_layer_impl.cc View 1 2 3 4 5 6 7 8 8 chunks +24 lines, -10 lines 3 comments Download
M cc/layers/scrollbar_layer_unittest.cc View 1 2 3 4 5 6 7 8 14 chunks +43 lines, -24 lines 0 comments Download
M cc/test/fake_scrollbar_layer.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -3 lines 0 comments Download
M cc/test/fake_scrollbar_layer.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 4 chunks +9 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_context.cc View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/content_startup_flags.cc View 1 2 3 4 5 6 2 chunks +14 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 2 chunks +36 lines, -3 lines 0 comments Download
M webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
wjmaclean
Please take a look and let me know if this seems sane. I made the ...
7 years, 6 months ago (2013-06-21 15:54:34 UTC) #1
aelias_OOO_until_Jul13
Do you have any plans to expose the solid color setting to Blink? https://codereview.chromium.org/17550008/diff/1/cc/layers/scrollbar_layer.cc File ...
7 years, 6 months ago (2013-06-21 23:34:34 UTC) #2
wjmaclean
Addressed comments, PTAL. https://codereview.chromium.org/17550008/diff/1/cc/layers/scrollbar_layer.cc File cc/layers/scrollbar_layer.cc (right): https://codereview.chromium.org/17550008/diff/1/cc/layers/scrollbar_layer.cc#newcode69 cc/layers/scrollbar_layer.cc:69: (layer_tree_host() && On 2013/06/21 23:34:35, aelias ...
7 years, 6 months ago (2013-06-24 14:06:41 UTC) #3
wjmaclean
On 2013/06/21 23:34:34, aelias wrote: > Do you have any plans to expose the solid ...
7 years, 6 months ago (2013-06-24 14:18:08 UTC) #4
aelias_OOO_until_Jul13
https://codereview.chromium.org/17550008/diff/1/cc/layers/scrollbar_layer.cc File cc/layers/scrollbar_layer.cc (right): https://codereview.chromium.org/17550008/diff/1/cc/layers/scrollbar_layer.cc#newcode69 cc/layers/scrollbar_layer.cc:69: (layer_tree_host() && On 2013/06/24 14:06:41, wjmaclean wrote: > On ...
7 years, 6 months ago (2013-06-25 06:54:57 UTC) #5
wjmaclean
On 2013/06/25 06:54:57, aelias wrote: > https://codereview.chromium.org/17550008/diff/1/cc/layers/scrollbar_layer.cc > File cc/layers/scrollbar_layer.cc (right): > > https://codereview.chromium.org/17550008/diff/1/cc/layers/scrollbar_layer.cc#newcode69 > ...
7 years, 6 months ago (2013-06-25 13:50:53 UTC) #6
wjmaclean
PTAL.
7 years, 6 months ago (2013-06-25 13:51:21 UTC) #7
aelias_OOO_until_Jul13
lgtm (although you'll also need jamesr@'s approval for OWNERS)
7 years, 6 months ago (2013-06-26 17:06:48 UTC) #8
enne (OOO)
https://codereview.chromium.org/17550008/diff/13001/cc/layers/scrollbar_layer.cc File cc/layers/scrollbar_layer.cc (right): https://codereview.chromium.org/17550008/diff/13001/cc/layers/scrollbar_layer.cc#newcode68 cc/layers/scrollbar_layer.cc:68: DCHECK(layer_tree_host()); This seems dangerous. cc::Layers can be detached from ...
7 years, 6 months ago (2013-06-26 17:39:05 UTC) #9
wjmaclean
https://codereview.chromium.org/17550008/diff/13001/cc/layers/scrollbar_layer.cc File cc/layers/scrollbar_layer.cc (right): https://codereview.chromium.org/17550008/diff/13001/cc/layers/scrollbar_layer.cc#newcode68 cc/layers/scrollbar_layer.cc:68: DCHECK(layer_tree_host()); On 2013/06/26 17:39:05, enne wrote: > This seems ...
7 years, 6 months ago (2013-06-26 18:16:00 UTC) #10
enne (OOO)
https://codereview.chromium.org/17550008/diff/13001/cc/layers/scrollbar_layer.cc File cc/layers/scrollbar_layer.cc (right): https://codereview.chromium.org/17550008/diff/13001/cc/layers/scrollbar_layer.cc#newcode68 cc/layers/scrollbar_layer.cc:68: DCHECK(layer_tree_host()); On 2013/06/26 18:16:00, wjmaclean wrote: > On 2013/06/26 ...
7 years, 6 months ago (2013-06-26 20:02:10 UTC) #11
aelias_OOO_until_Jul13
A new command line sounds fine to me. It can be appended in content/browser/android/content_startup_flags.cc
7 years, 6 months ago (2013-06-26 23:06:20 UTC) #12
wjmaclean
On 2013/06/26 23:06:20, aelias wrote: > A new command line sounds fine to me. It ...
7 years, 5 months ago (2013-06-27 13:15:51 UTC) #13
wjmaclean
On 2013/06/27 13:15:51, wjmaclean wrote: > On 2013/06/26 23:06:20, aelias wrote: > > A new ...
7 years, 5 months ago (2013-06-27 17:54:02 UTC) #14
enne (OOO)
lgtm. Thanks for the changes. That's a lot cleaner. https://codereview.chromium.org/17550008/diff/24001/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc File webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc (right): https://codereview.chromium.org/17550008/diff/24001/webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc#newcode17 webkit/renderer/compositor_bindings/web_scrollbar_layer_impl.cc:17: ...
7 years, 5 months ago (2013-06-27 18:01:54 UTC) #15
wjmaclean
Thanks. I'll wait to make sure it clears the Android bots before I try to ...
7 years, 5 months ago (2013-06-27 18:10:31 UTC) #16
wjmaclean
+Daniel Sievers for changes to content/browser/android/content_startup_flags.cc
7 years, 5 months ago (2013-06-28 13:16:20 UTC) #17
wjmaclean
-Daniel Sievers (unavailable) +Marcus Bulach for content/browser/android changes
7 years, 5 months ago (2013-06-28 16:12:14 UTC) #18
bulach
lgtm for content/browser/android
7 years, 5 months ago (2013-06-28 16:59:09 UTC) #19
aelias_OOO_until_Jul13
https://codereview.chromium.org/17550008/diff/24001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/17550008/diff/24001/content/renderer/gpu/render_widget_compositor.cc#newcode281 content/renderer/gpu/render_widget_compositor.cc:281: } else if (settings.use_pinch_virtual_viewport) { I don't think these ...
7 years, 5 months ago (2013-06-28 17:31:59 UTC) #20
wjmaclean
On 2013/06/28 17:31:59, aelias wrote: > https://codereview.chromium.org/17550008/diff/24001/content/renderer/gpu/render_widget_compositor.cc > File content/renderer/gpu/render_widget_compositor.cc (right): > > https://codereview.chromium.org/17550008/diff/24001/content/renderer/gpu/render_widget_compositor.cc#newcode281 > ...
7 years, 5 months ago (2013-06-28 17:34:17 UTC) #21
wjmaclean
I've added command line flags for color/thickness of the solid color scrollbars. aelias@ and buchas@ ...
7 years, 5 months ago (2013-06-28 19:48:22 UTC) #22
bulach
still lgtm, but one suggestion below: https://codereview.chromium.org/17550008/diff/38001/content/browser/android/content_startup_flags.cc File content/browser/android/content_startup_flags.cc (right): https://codereview.chromium.org/17550008/diff/38001/content/browser/android/content_startup_flags.cc#newcode67 content/browser/android/content_startup_flags.cc:67: thickness_string.append("=3"); nit: maybe ...
7 years, 5 months ago (2013-06-28 19:55:47 UTC) #23
wjmaclean
On 2013/06/28 19:55:47, bulach wrote: > still lgtm, but one suggestion below: > > https://codereview.chromium.org/17550008/diff/38001/content/browser/android/content_startup_flags.cc ...
7 years, 5 months ago (2013-06-28 20:08:20 UTC) #24
aelias_OOO_until_Jul13
lgtm provided you fix the problems below and double-check the color setting works before submitting. ...
7 years, 5 months ago (2013-06-28 22:07:57 UTC) #25
wjmaclean
Fixing and verifying now, new patch in a moment. https://codereview.chromium.org/17550008/diff/39023/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/17550008/diff/39023/content/renderer/gpu/render_widget_compositor.cc#newcode80 content/renderer/gpu/render_widget_compositor.cc:80: ...
7 years, 5 months ago (2013-06-29 01:00:37 UTC) #26
jochen (gone - plz use gerrit)
just some nits. You really want James to look at CC related changes, not me ...
7 years, 5 months ago (2013-06-30 08:13:07 UTC) #27
wjmaclean
jamesr@ ... can you please take a look? https://codereview.chromium.org/17550008/diff/51001/content/renderer/gpu/render_widget_compositor.cc File content/renderer/gpu/render_widget_compositor.cc (right): https://codereview.chromium.org/17550008/diff/51001/content/renderer/gpu/render_widget_compositor.cc#newcode80 content/renderer/gpu/render_widget_compositor.cc:80: static ...
7 years, 5 months ago (2013-07-02 13:50:30 UTC) #28
jamesr
https://codereview.chromium.org/17550008/diff/56001/cc/base/switches.cc File cc/base/switches.cc (right): https://codereview.chromium.org/17550008/diff/56001/cc/base/switches.cc#newcode134 cc/base/switches.cc:134: // Allow forcing of solid-color scrollbars what does it ...
7 years, 5 months ago (2013-07-03 21:26:24 UTC) #29
wjmaclean
7 years, 5 months ago (2013-07-04 17:17:32 UTC) #30
I propose that the approach in https://codereview.chromium.org/18341009/ is
superior to, and addresses the same issues as this one, and that we should close
this issue.

Powered by Google App Engine
This is Rietveld 408576698