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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp

Issue 1973083002: Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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: third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
index 147be3bb66ff624d2dbd95c2c72bb5e50a57349e..c08de88a840d41801ea0c2b6c5755ca86a01527c 100644
--- a/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/PaintLayerCompositor.cpp
@@ -406,13 +406,9 @@ void PaintLayerCompositor::updateIfNeeded()
if (updateType != CompositingUpdateNone) {
if (RuntimeEnabledFeatures::compositorWorkerEnabled() && m_scrollLayer) {
if (Element* scrollingElement = m_layoutView.document().scrollingElement()) {
- uint64_t elementId = 0;
uint32_t mutableProperties = CompositorMutableProperty::kNone;
- if (scrollingElement->hasCompositorProxy()) {
- elementId = DOMNodeIds::idForNode(scrollingElement);
+ if (scrollingElement->hasCompositorProxy())
mutableProperties = (CompositorMutableProperty::kScrollLeft | CompositorMutableProperty::kScrollTop) & scrollingElement->compositorMutableProperties();
- }
- m_scrollLayer->setElementId(elementId);
m_scrollLayer->setCompositorMutableProperties(mutableProperties);
}
}
@@ -1050,6 +1046,8 @@ void PaintLayerCompositor::ensureRootLayer()
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_scrollLayer.get(), true);
+ m_scrollLayer->setElementId(createCompositorElementId(DOMNodeIds::idForNode(&m_layoutView.document()), CompositorSubElementId::Scroll));
+
// Hook them up
m_overflowControlsHostLayer->addChild(m_containerLayer.get());
m_containerLayer->addChild(m_scrollLayer.get());

Powered by Google App Engine
This is Rietveld 408576698