Chromium Code Reviews| Index: cc/scrollbar_layer.cc |
| diff --git a/cc/scrollbar_layer.cc b/cc/scrollbar_layer.cc |
| index 3d83aebf30f541d6036e683f2ef32d9363dd2fa7..3d1a9f82f61fc9f692ed9b44a64fdc33f775a77c 100644 |
| --- a/cc/scrollbar_layer.cc |
| +++ b/cc/scrollbar_layer.cc |
| @@ -19,11 +19,17 @@ namespace cc { |
| scoped_ptr<LayerImpl> ScrollbarLayer::CreateLayerImpl( |
| LayerTreeImpl* tree_impl) { |
| - return ScrollbarLayerImpl::Create( |
| - tree_impl, |
| - id(), |
| - ScrollbarGeometryFixedThumb::create(make_scoped_ptr(geometry_->clone()))) |
| - .PassAs<LayerImpl>(); |
| + scoped_ptr<LayerImpl> scroll_layer_impl = |
| + ScrollbarLayerImpl::Create( |
| + tree_impl, |
| + id(), |
| + ScrollbarGeometryFixedThumb::create( |
| + make_scoped_ptr(geometry_->clone()))).PassAs<LayerImpl>(); |
| + |
| + if (scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID) |
| + scroll_layer_impl->ToScrollbarLayer()->SetOpacity(0); |
|
enne (OOO)
2013/03/12 21:10:08
Why are opacity updates blocked and this is requir
wjmaclean
2013/03/12 22:02:22
The call to "ToScrollbarLayer()" is not necessary,
|
| + |
| + return scroll_layer_impl.Pass(); |
| } |
| scoped_refptr<ScrollbarLayer> ScrollbarLayer::Create( |
| @@ -61,6 +67,11 @@ void ScrollbarLayer::SetScrollLayerId(int id) { |
| SetNeedsFullTreeSync(); |
| } |
| +bool ScrollbarLayer::OpacityIsAnimating() const { |
| + return Layer::OpacityIsAnimating() || |
|
enne (OOO)
2013/03/12 21:10:08
Maybe just return Layer::OpacityIsAnimating || isO
wjmaclean
2013/03/12 22:02:22
Sure, though Clank also uses overlay scrollbars, a
|
| + scroll_layer_id_ == Layer::PINCH_ZOOM_ROOT_SCROLL_LAYER_ID; |
| +} |
| + |
| WebKit::WebScrollbar::Orientation ScrollbarLayer::Orientation() const { |
| return scrollbar_->orientation(); |
| } |