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

Unified Diff: Source/core/rendering/CompositedLayerMapping.cpp

Issue 58543002: Use a boolean hasCompositedLayerMapping() accessor instead of the pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 1 month 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: Source/core/rendering/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/CompositedLayerMapping.cpp b/Source/core/rendering/CompositedLayerMapping.cpp
index 8a061b5a8dcc0642bbc6967acc61b5ae58051c86..228a13f0c85c162cd9adea8d8d0813493f62eeaa 100644
--- a/Source/core/rendering/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/CompositedLayerMapping.cpp
@@ -469,7 +469,7 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration()
m_graphicsLayer->setContentsClippingMaskLayer(m_childClippingMaskLayer.get());
if (m_owningLayer->reflectionInfo()) {
- if (m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping()) {
+ if (m_owningLayer->reflectionInfo()->reflectionLayer()->hasCompositedLayerMapping()) {
GraphicsLayer* reflectionLayer = m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping()->mainGraphicsLayer();
m_graphicsLayer->setReplicatedByLayer(reflectionLayer);
}
@@ -556,7 +556,7 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry()
// We compute everything relative to the enclosing compositing layer.
IntRect ancestorCompositingBounds;
if (compAncestor) {
- ASSERT(compAncestor->compositedLayerMapping());
+ ASSERT(compAncestor->hasCompositedLayerMapping());
ancestorCompositingBounds = pixelSnappedIntRect(compAncestor->compositedLayerMapping()->compositedBounds());
}
@@ -705,7 +705,7 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry()
m_backgroundLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer());
}
- if (m_owningLayer->reflectionInfo() && m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping()) {
+ if (m_owningLayer->reflectionInfo() && m_owningLayer->reflectionInfo()->reflectionLayer()->hasCompositedLayerMapping()) {
CompositedLayerMapping* reflectionCompositedLayerMapping = m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping();
reflectionCompositedLayerMapping->updateGraphicsLayerGeometry();
@@ -1357,7 +1357,7 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent)
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = normalFlowList->at(i)->layer();
- if (!curLayer->compositedLayerMapping()
+ if (!curLayer->hasCompositedLayerMapping()
&& (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(curLayer)))
return true;
}
@@ -1372,7 +1372,7 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent)
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = negZOrderList->at(i)->layer();
- if (!curLayer->compositedLayerMapping()
+ if (!curLayer->hasCompositedLayerMapping()
&& (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(curLayer)))
return true;
}
@@ -1382,7 +1382,7 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent)
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = posZOrderList->at(i)->layer();
- if (!curLayer->compositedLayerMapping()
+ if (!curLayer->hasCompositedLayerMapping()
&& (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(curLayer)))
return true;
}

Powered by Google App Engine
This is Rietveld 408576698