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

Unified Diff: cc/layers/scrollbar_layer_impl_base.cc

Issue 2816063003: Replace layer id with Element id for tracking scrollbar animation controllers (Closed)
Patch Set: Address reviewer comments, pull element_id.h change to another patch 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
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.h ('k') | cc/layers/scrollbar_layer_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/scrollbar_layer_impl_base.cc
diff --git a/cc/layers/scrollbar_layer_impl_base.cc b/cc/layers/scrollbar_layer_impl_base.cc
index da53036fea0a07cd555c932d769ce32092f6aa19..e9c5514d5f9022fd7c57c9466f7f7d2ba449a586 100644
--- a/cc/layers/scrollbar_layer_impl_base.cc
+++ b/cc/layers/scrollbar_layer_impl_base.cc
@@ -36,20 +36,24 @@ void ScrollbarLayerImplBase::PushPropertiesTo(LayerImpl* layer) {
LayerImpl::PushPropertiesTo(layer);
DCHECK(layer->ToScrollbarLayer());
layer->ToScrollbarLayer()->set_is_overlay_scrollbar(is_overlay_scrollbar_);
- layer->ToScrollbarLayer()->SetScrollLayerId(ScrollLayerId());
+ layer->ToScrollbarLayer()->SetScrollInfo(ScrollLayerId(),
+ scroll_element_id());
}
ScrollbarLayerImplBase* ScrollbarLayerImplBase::ToScrollbarLayer() {
return this;
}
-void ScrollbarLayerImplBase::SetScrollLayerId(int scroll_layer_id) {
- if (scroll_layer_id_ == scroll_layer_id)
+void ScrollbarLayerImplBase::SetScrollInfo(int scroll_layer_id,
+ ElementId scroll_element_id) {
+ if (scroll_layer_id_ == scroll_layer_id &&
+ scroll_element_id == scroll_element_id)
pdr. 2017/04/20 02:53:42 Oops, "scroll_element_id == scroll_element_id" ins
return;
layer_tree_impl()->UnregisterScrollbar(this);
scroll_layer_id_ = scroll_layer_id;
+ scroll_element_id_ = scroll_element_id;
layer_tree_impl()->RegisterScrollbar(this);
}
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.h ('k') | cc/layers/scrollbar_layer_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698