| Index: Source/core/rendering/RenderLayerBacking.cpp
|
| diff --git a/Source/core/rendering/RenderLayerBacking.cpp b/Source/core/rendering/RenderLayerBacking.cpp
|
| index 5a16fab63c2b8c1f7d4ce94fb24d7b6615220379..a0f76968043339707e6a1ad456d7010092fdc67e 100644
|
| --- a/Source/core/rendering/RenderLayerBacking.cpp
|
| +++ b/Source/core/rendering/RenderLayerBacking.cpp
|
| @@ -694,7 +694,7 @@ void RenderLayerBacking::updateGraphicsLayerGeometry()
|
| m_backgroundLayer->setOffsetFromRenderer(m_graphicsLayer->offsetFromRenderer());
|
| }
|
|
|
| - if (m_owningLayer->reflectionLayer() && m_owningLayer->reflectionLayer()->isComposited()) {
|
| + if (m_owningLayer->reflectionLayer() && m_owningLayer->reflectionLayer()->backing()) {
|
| RenderLayerBacking* reflectionBacking = m_owningLayer->reflectionLayer()->backing();
|
| reflectionBacking->updateGraphicsLayerGeometry();
|
|
|
| @@ -1192,9 +1192,16 @@ float RenderLayerBacking::compositingOpacity(float rendererOpacity) const
|
| if (!curr->isStackingContainer())
|
| continue;
|
|
|
| - // If we found a compositing layer, we want to compute opacity
|
| - // relative to it. So we can break here.
|
| - if (curr->isComposited())
|
| + // If we found a composited layer, regardless of whether it actually
|
| + // paints into it, we want to compute opacity relative to it. So we can
|
| + // break here.
|
| + //
|
| + // FIXME: with grouped backings, a composited descendant will have to
|
| + // continue past the grouped (squashed) layers that its parents
|
| + // may contribute to. This whole confusion can be avoided by
|
| + // specifying explicitly the composited ancestor where we would
|
| + // stop accumulating opacity.
|
| + if (curr->compositingState() == PaintsIntoOwnBacking || curr->compositingState() == HasOwnBackingButPaintsIntoAncestor)
|
| break;
|
|
|
| finalOpacity *= curr->renderer()->opacity();
|
| @@ -1332,7 +1339,7 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent)
|
| size_t listSize = normalFlowList->size();
|
| for (size_t i = 0; i < listSize; ++i) {
|
| RenderLayer* curLayer = normalFlowList->at(i);
|
| - if (!curLayer->isComposited()
|
| + if (!curLayer->backing()
|
| && (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(curLayer)))
|
| return true;
|
| }
|
| @@ -1347,7 +1354,7 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent)
|
| size_t listSize = negZOrderList->size();
|
| for (size_t i = 0; i < listSize; ++i) {
|
| RenderLayer* curLayer = negZOrderList->at(i);
|
| - if (!curLayer->isComposited()
|
| + if (!curLayer->backing()
|
| && (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(curLayer)))
|
| return true;
|
| }
|
| @@ -1357,7 +1364,7 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent)
|
| size_t listSize = posZOrderList->size();
|
| for (size_t i = 0; i < listSize; ++i) {
|
| RenderLayer* curLayer = posZOrderList->at(i);
|
| - if (!curLayer->isComposited()
|
| + if (!curLayer->backing()
|
| && (curLayer->hasVisibleContent() || hasVisibleNonCompositingDescendant(curLayer)))
|
| return true;
|
| }
|
| @@ -1368,6 +1375,9 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent)
|
| }
|
|
|
| // Conservative test for having no rendered children.
|
| +// FIXME: By name the implementation is correct. But the code that uses this function means something
|
| +// very slightly different - the implementation needs to also include composited descendants that
|
| +// don't paint into their own backing, and instead paint into this backing.
|
| bool RenderLayerBacking::hasVisibleNonCompositingDescendantLayers() const
|
| {
|
| return hasVisibleNonCompositingDescendant(m_owningLayer);
|
|
|