| Index: cc/animation/scrollbar_animation_controller_thinning.cc
|
| diff --git a/cc/animation/scrollbar_animation_controller_thinning.cc b/cc/animation/scrollbar_animation_controller_thinning.cc
|
| index ce196fbf955e61320af9a5669f011ced1437f185..0eb972a82208fcd941b6628b48ed7e87722556ad 100644
|
| --- a/cc/animation/scrollbar_animation_controller_thinning.cc
|
| +++ b/cc/animation/scrollbar_animation_controller_thinning.cc
|
| @@ -138,19 +138,18 @@ ScrollbarAnimationControllerThinning::ThumbThicknessScaleAtAnimationProgress(
|
|
|
| void ScrollbarAnimationControllerThinning::ApplyOpacityAndThumbThicknessScale(
|
| float opacity, float thumb_thickness_scale) {
|
| - ScrollbarLayerImplBase* horizontal_scrollbar =
|
| - scroll_layer_->horizontal_scrollbar_layer();
|
| - if (horizontal_scrollbar) {
|
| - horizontal_scrollbar->SetOpacity(opacity);
|
| - horizontal_scrollbar->set_thumb_thickness_scale_factor(
|
| - thumb_thickness_scale);
|
| - }
|
| -
|
| - ScrollbarLayerImplBase* vertical_scrollbar =
|
| - scroll_layer_->vertical_scrollbar_layer();
|
| - if (vertical_scrollbar) {
|
| - vertical_scrollbar->SetOpacity(opacity);
|
| - vertical_scrollbar->set_thumb_thickness_scale_factor(thumb_thickness_scale);
|
| + if (!scroll_layer_->scrollbars())
|
| + return;
|
| +
|
| + LayerImpl::ScrollbarSet* scrollbars = scroll_layer_->scrollbars();
|
| + for (LayerImpl::ScrollbarSet::iterator it = scrollbars->begin();
|
| + it != scrollbars->end();
|
| + ++it) {
|
| + ScrollbarLayerImplBase* scrollbar = *it;
|
| + if (scrollbar->opacity_can_animate()) {
|
| + scrollbar->SetOpacity(opacity);
|
| + scrollbar->set_thumb_thickness_scale_factor(thumb_thickness_scale);
|
| + }
|
| }
|
| }
|
|
|
|
|