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

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

Issue 2141743002: Use node() when generating element id's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nit. Created 4 years, 5 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/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 4dc1e459864edb455fe666e15d22864f951ecedb..2b6e431e2b1ec666166fbcf7497d4da8761c4fc2 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -229,7 +229,7 @@ std::unique_ptr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compo
graphicsLayer->setCompositingReasons(reasons);
graphicsLayer->setSquashingDisallowedReasons(squashingDisallowedReasons);
- if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode())
+ if (Node* owningNode = m_owningLayer.layoutObject()->node())
graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode));
return graphicsLayer;
@@ -1547,7 +1547,7 @@ void CompositedLayerMapping::updateElementIdAndCompositorMutableProperties()
uint32_t primaryMutableProperties = CompositorMutableProperty::kNone;
uint32_t scrollMutableProperties = CompositorMutableProperty::kNone;
- Node* owningNode = m_owningLayer.layoutObject()->generatingNode();
+ Node* owningNode = m_owningLayer.layoutObject()->node();
Element* owningElement = nullptr;
if (owningNode && owningNode->isElementNode())
owningElement = toElement(owningNode);
@@ -1661,7 +1661,7 @@ bool CompositedLayerMapping::updateScrollingLayers(bool needsScrollingLayers)
// Inner layer which renders the content that scrolls.
m_scrollingContentsLayer = createGraphicsLayer(CompositingReasonLayerForScrollingContents);
- if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) {
+ if (Node* owningNode = m_owningLayer.layoutObject()->node()) {
m_scrollingContentsLayer->setElementId(createCompositorElementId(DOMNodeIds::idForNode(owningNode), CompositorSubElementId::Scroll));
m_scrollingContentsLayer->setCompositorMutableProperties(CompositorMutableProperty::kScrollLeft | CompositorMutableProperty::kScrollTop);
}

Powered by Google App Engine
This is Rietveld 408576698