Index: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
index 5fb632f3340bba1fa95377e07e6af8f1517f8c82..99f71edc64fdffa3d7b21c21efefb1525b23a9c4 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp |
@@ -2207,7 +2207,6 @@ void CompositedLayerMapping::UpdateShouldFlattenTransform() { |
// well as the mutable properties for all layers may change according to the |
// rules above so we update those values here. |
void CompositedLayerMapping::UpdateElementIdAndCompositorMutableProperties() { |
- int element_id = 0; |
uint32_t primary_mutable_properties = CompositorMutableProperty::kNone; |
uint32_t scroll_mutable_properties = CompositorMutableProperty::kNone; |
@@ -2234,7 +2233,6 @@ void CompositedLayerMapping::UpdateElementIdAndCompositorMutableProperties() { |
animating_style->HasCompositorProxy()) { |
uint32_t compositor_mutable_properties = |
animating_element->CompositorMutableProperties(); |
- element_id = DOMNodeIds::IdForNode(owning_node); |
primary_mutable_properties = (CompositorMutableProperty::kOpacity | |
CompositorMutableProperty::kTransform) & |
compositor_mutable_properties; |
@@ -2243,14 +2241,9 @@ void CompositedLayerMapping::UpdateElementIdAndCompositorMutableProperties() { |
compositor_mutable_properties; |
} |
- if (animating_style && animating_style->ShouldCompositeForCurrentAnimations()) |
- element_id = DOMNodeIds::IdForNode(owning_node); |
- |
- CompositorElementId compositor_element_id; |
- if (element_id) { |
- compositor_element_id = CompositorElementIdFromDOMNodeId( |
- element_id, CompositorElementIdNamespace::kPrimary); |
- } |
+ CompositorElementId compositor_element_id = |
+ CompositorElementIdFromPaintLayerId( |
+ owning_layer_.UniqueId(), CompositorElementIdNamespace::kPrimary); |
graphics_layer_->SetElementId(compositor_element_id); |
graphics_layer_->SetCompositorMutableProperties(primary_mutable_properties); |
@@ -2374,12 +2367,9 @@ bool CompositedLayerMapping::UpdateScrollingLayers( |
scrolling_contents_layer_ = |
CreateGraphicsLayer(kCompositingReasonLayerForScrollingContents); |
- if (Node* owning_node = owning_layer_.GetLayoutObject().GetNode()) { |
- scrolling_contents_layer_->SetElementId( |
- CompositorElementIdFromDOMNodeId( |
- DOMNodeIds::IdForNode(owning_node), |
- CompositorElementIdNamespace::kScroll)); |
- } |
+ scrolling_contents_layer_->SetElementId( |
+ CompositorElementIdFromPaintLayerId( |
+ owning_layer_.UniqueId(), CompositorElementIdNamespace::kScroll)); |
scrolling_layer_->AddChild(scrolling_contents_layer_.get()); |