Index: Source/WebCore/rendering/RenderLayerBacking.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderLayerBacking.cpp (revision 104364) |
+++ Source/WebCore/rendering/RenderLayerBacking.cpp (working copy) |
@@ -361,9 +361,6 @@ |
if (!renderer()->animation()->isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity)) |
updateLayerOpacity(renderer()->style()); |
- m_owningLayer->updateVisibilityStatus(); |
- m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent()); |
- |
RenderStyle* style = renderer()->style(); |
m_graphicsLayer->setPreserves3D(style->transformStyle3D() == TransformStyle3DPreserve3D && !renderer()->hasReflection()); |
m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == BackfaceVisibilityVisible); |
@@ -792,15 +789,14 @@ |
return false; |
RenderStyle* style = renderObject->style(); |
- bool isVisible = m_owningLayer->hasVisibleContent(); |
// Reject anything that has a border, a border-radius or outline, |
// or any background (color or image). |
// FIXME: we could optimize layers for simple backgrounds. |
- if (isVisible && hasBoxDecorationsOrBackground(renderObject)) |
+ if (hasBoxDecorationsOrBackground(renderObject)) |
return false; |
- if (isVisible && m_owningLayer->hasOverflowControls()) |
+ if (m_owningLayer->hasOverflowControls()) |
return false; |
// If we have got this far and the renderer has no children, then we're ok. |
@@ -832,21 +828,21 @@ |
return false; |
// Check to see if all the body's children are compositing layers. |
- if (hasVisibleNonCompositingDescendants()) |
+ if (hasNonCompositingDescendants()) |
return false; |
return true; |
} |
// Check to see if all the renderer's children are compositing layers. |
- if (isVisible && hasVisibleNonCompositingDescendants()) |
+ if (hasNonCompositingDescendants()) |
return false; |
return true; |
} |
// Conservative test for having no rendered children. |
-bool RenderLayerBacking::hasVisibleNonCompositingDescendants() const |
+bool RenderLayerBacking::hasNonCompositingDescendants() const |
{ |
// Some HTML can cause whitespace text nodes to have renderers, like: |
// <div> |
@@ -863,25 +859,13 @@ |
} |
} |
- if (Vector<RenderLayer*>* normalFlowList = m_owningLayer->normalFlowList()) { |
- size_t listSize = normalFlowList->size(); |
- for (size_t i = 0; i < listSize; ++i) { |
- RenderLayer* curLayer = normalFlowList->at(i); |
- if (!curLayer->isComposited() && curLayer->hasVisibleContent()) |
- return true; |
- } |
- } |
- |
if (m_owningLayer->isStackingContext()) { |
- if (!m_owningLayer->hasVisibleDescendant()) |
- return false; |
- |
// Use the m_hasCompositingDescendant bit to optimize? |
if (Vector<RenderLayer*>* negZOrderList = m_owningLayer->negZOrderList()) { |
size_t listSize = negZOrderList->size(); |
for (size_t i = 0; i < listSize; ++i) { |
RenderLayer* curLayer = negZOrderList->at(i); |
- if (!curLayer->isComposited() && curLayer->hasVisibleContent()) |
+ if (!curLayer->isComposited()) |
return true; |
} |
} |
@@ -890,12 +874,21 @@ |
size_t listSize = posZOrderList->size(); |
for (size_t i = 0; i < listSize; ++i) { |
RenderLayer* curLayer = posZOrderList->at(i); |
- if (!curLayer->isComposited() && curLayer->hasVisibleContent()) |
+ if (!curLayer->isComposited()) |
return true; |
} |
} |
} |
+ if (Vector<RenderLayer*>* normalFlowList = m_owningLayer->normalFlowList()) { |
+ size_t listSize = normalFlowList->size(); |
+ for (size_t i = 0; i < listSize; ++i) { |
+ RenderLayer* curLayer = normalFlowList->at(i); |
+ if (!curLayer->isComposited()) |
+ return true; |
+ } |
+ } |
+ |
return false; |
} |