Chromium Code Reviews| Index: Source/core/paint/DeprecatedPaintLayer.cpp |
| diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp |
| index 35816c7fce8fc8f7916048454bae7897b8e2df9d..02ad94396689f533436f40f847a807018973cfed 100644 |
| --- a/Source/core/paint/DeprecatedPaintLayer.cpp |
| +++ b/Source/core/paint/DeprecatedPaintLayer.cpp |
| @@ -594,6 +594,8 @@ void DeprecatedPaintLayer::dirtyVisibleContentStatus() |
| m_visibleContentStatusDirty = true; |
| if (parent()) |
| parent()->dirtyAncestorChainVisibleDescendantStatus(); |
| + if (!isSelfPaintingLayer()) |
| + parent()->dirtyVisibleContentStatus(); |
|
chrishtr
2015/06/25 17:26:50
compositing/contents-opaque/visibility-hidden.html
|
| } |
| void DeprecatedPaintLayer::potentiallyDirtyVisibleContentStatus(EVisibility visibility) |
| @@ -664,12 +666,12 @@ void DeprecatedPaintLayer::updateDescendantDependentFlags() |
| m_hasVisibleContent = false; |
| LayoutObject* r = layoutObject()->slowFirstChild(); |
| while (r) { |
| - if (r->style()->visibility() == VISIBLE && !r->hasLayer()) { |
| + if (r->style()->visibility() == VISIBLE && (!r->hasLayer() || !r->enclosingLayer()->isSelfPaintingLayer())) { |
| m_hasVisibleContent = true; |
| break; |
| } |
| LayoutObject* layoutObjectFirstChild = r->slowFirstChild(); |
| - if (layoutObjectFirstChild && !r->hasLayer()) { |
| + if (layoutObjectFirstChild && (!r->hasLayer() || !r->enclosingLayer()->isSelfPaintingLayer())) { |
| r = layoutObjectFirstChild; |
| } else if (r->nextSibling()) { |
| r = r->nextSibling(); |
| @@ -1150,6 +1152,10 @@ void DeprecatedPaintLayer::addChild(DeprecatedPaintLayer* child, DeprecatedPaint |
| child->stackingNode()->dirtyStackingContextZOrderLists(); |
| } |
| + // Non-self-painting children paint into this layer, so the visible contents status of this layer is affected. |
| + if (!child->isSelfPaintingLayer()) |
| + dirtyVisibleContentStatus(); |
| + |
| dirtyAncestorChainVisibleDescendantStatus(); |
| dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); |