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

Unified Diff: cc/animation/scrollbar_animation_controller_linear_fade.cc

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Draft for review. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/animation/scrollbar_animation_controller_linear_fade.cc
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.cc b/cc/animation/scrollbar_animation_controller_linear_fade.cc
index 863959b84c27691f9afe1cca9628b399fc3b04e9..049b87396a51ec42d4f5fd3c8515996a3b428f2e 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade.cc
+++ b/cc/animation/scrollbar_animation_controller_linear_fade.cc
@@ -112,15 +112,17 @@ float ScrollbarAnimationControllerLinearFade::OpacityAtTime(
void ScrollbarAnimationControllerLinearFade::ApplyOpacityToScrollbars(
float opacity) {
- ScrollbarLayerImplBase* horizontal_scrollbar =
- scroll_layer_->horizontal_scrollbar_layer();
- if (horizontal_scrollbar)
- horizontal_scrollbar->SetOpacity(opacity);
-
- ScrollbarLayerImplBase* vertical_scrollbar =
- scroll_layer_->vertical_scrollbar_layer();
- if (vertical_scrollbar)
- vertical_scrollbar->SetOpacity(opacity);
+ 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->is_overlay_scrollbar())
+ scrollbar->SetOpacity(opacity);
+ }
}
} // namespace cc
« no previous file with comments | « no previous file | cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc » ('j') | cc/layers/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698