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

Unified Diff: cc/layers/layer_impl.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
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index bd7b9fee0a6cb7f3d08943423a4c62aa070b366a..6bee362b4cbae88f77bf7cd12cfa9f7e44324db9 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -312,6 +312,10 @@ bool LayerImpl::IsSnapped() {
void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
DCHECK(layer->IsActive());
+ // The ElementId should be set first because other setters depend on it such
+ // as LayerImpl::SetScrollClipLayer.
+ layer->SetElementId(element_id_);
+
layer->offset_to_transform_parent_ = offset_to_transform_parent_;
layer->main_thread_scrolling_reasons_ = main_thread_scrolling_reasons_;
layer->user_scrollable_horizontal_ = user_scrollable_horizontal_;
@@ -346,7 +350,6 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->SetBounds(bounds_);
layer->SetScrollClipLayer(scroll_clip_layer_id_);
- layer->SetElementId(element_id_);
layer->SetMutableProperties(mutable_properties_);
// If the main thread commits multiple times before the impl thread actually

Powered by Google App Engine
This is Rietveld 408576698