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

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

Issue 59063003: Don't coerce pointers to compositor layer mappings to booleans. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaaaase 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..69b87702bc0b50834377ae98a19713f912799cc8 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()->compositingState() == PaintsIntoOwnBacking) {
GraphicsLayer* reflectionLayer = m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping()->mainGraphicsLayer();
m_graphicsLayer->setReplicatedByLayer(reflectionLayer);
}
@@ -705,8 +705,8 @@ void CompositedLayerMapping::updateGraphicsLayerGeometry()
m_backgroundLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer());
}
- if (m_owningLayer->reflectionInfo() && m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping()) {
- CompositedLayerMapping* reflectionCompositedLayerMapping = m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping();
+ if (m_owningLayer->reflectionInfo() && m_owningLayer->reflectionInfo()->reflectionLayer()->compositingState() == PaintsIntoOwnBacking) {
+ CompositedLayerMappingPtr reflectionCompositedLayerMapping = m_owningLayer->reflectionInfo()->reflectionLayer()->compositedLayerMapping();
reflectionCompositedLayerMapping->updateGraphicsLayerGeometry();
// The reflection layer has the bounds of m_owningLayer->reflectionLayer(),
@@ -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->compositingState() == NotComposited
shawnsingh 2013/11/05 10:20:27 I think this should be written as: if (curLayer-
Ian Vollick 2013/11/08 03:35:12 I agree with you on this, but it is a behavior cha
&& (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->compositingState() == NotComposited
&& (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->compositingState() == NotComposited
&& (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(curLayer)))
return true;
}

Powered by Google App Engine
This is Rietveld 408576698