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

Unified Diff: cc/input/single_scrollbar_animation_controller_thinning.cc

Issue 2824693002: Refactor LayerTreeImpl's scrollbar map to be keyed on element ids (Closed)
Patch Set: rebase Created 3 years, 8 months 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/input/single_scrollbar_animation_controller_thinning.cc
diff --git a/cc/input/single_scrollbar_animation_controller_thinning.cc b/cc/input/single_scrollbar_animation_controller_thinning.cc
index d09dd054310a79351fb700d21d1b1276ce86289b..f09756ee5e636571e659691d1c146f6424b18bc3 100644
--- a/cc/input/single_scrollbar_animation_controller_thinning.cc
+++ b/cc/input/single_scrollbar_animation_controller_thinning.cc
@@ -17,23 +17,23 @@ namespace cc {
std::unique_ptr<SingleScrollbarAnimationControllerThinning>
SingleScrollbarAnimationControllerThinning::Create(
- int scroll_layer_id,
+ ElementId scroll_element_id,
ScrollbarOrientation orientation,
ScrollbarAnimationControllerClient* client,
base::TimeDelta thinning_duration) {
return base::WrapUnique(new SingleScrollbarAnimationControllerThinning(
- scroll_layer_id, orientation, client, thinning_duration));
+ scroll_element_id, orientation, client, thinning_duration));
}
SingleScrollbarAnimationControllerThinning::
SingleScrollbarAnimationControllerThinning(
- int scroll_layer_id,
+ ElementId scroll_element_id,
ScrollbarOrientation orientation,
ScrollbarAnimationControllerClient* client,
base::TimeDelta thinning_duration)
: client_(client),
is_animating_(false),
- scroll_layer_id_(scroll_layer_id),
+ scroll_element_id_(scroll_element_id),
orientation_(orientation),
captured_(false),
mouse_is_over_scrollbar_(false),
@@ -179,8 +179,7 @@ void SingleScrollbarAnimationControllerThinning::UpdateThumbThicknessScale() {
void SingleScrollbarAnimationControllerThinning::ApplyThumbThicknessScale(
float thumb_thickness_scale) {
- for (ScrollbarLayerImplBase* scrollbar :
- client_->ScrollbarsFor(scroll_layer_id_)) {
+ for (auto* scrollbar : client_->ScrollbarsFor(scroll_element_id_)) {
if (scrollbar->orientation() != orientation_)
continue;
if (!scrollbar->is_overlay_scrollbar())

Powered by Google App Engine
This is Rietveld 408576698