| Index: Source/core/paint/DeprecatedPaintLayer.cpp
|
| diff --git a/Source/core/paint/DeprecatedPaintLayer.cpp b/Source/core/paint/DeprecatedPaintLayer.cpp
|
| index 35816c7fce8fc8f7916048454bae7897b8e2df9d..6f5bdee05d3d6792ca247ddacf3b4d089af655e2 100644
|
| --- a/Source/core/paint/DeprecatedPaintLayer.cpp
|
| +++ b/Source/core/paint/DeprecatedPaintLayer.cpp
|
| @@ -594,6 +594,9 @@ void DeprecatedPaintLayer::dirtyVisibleContentStatus()
|
| m_visibleContentStatusDirty = true;
|
| if (parent())
|
| parent()->dirtyAncestorChainVisibleDescendantStatus();
|
| + // Non-self-painting layers paint into their ancestor layer, and count as part of the "visible contents" of the parent, so we need to dirty it.
|
| + if (!isSelfPaintingLayer())
|
| + parent()->dirtyVisibleContentStatus();
|
| }
|
|
|
| void DeprecatedPaintLayer::potentiallyDirtyVisibleContentStatus(EVisibility visibility)
|
| @@ -664,12 +667,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 +1153,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();
|
|
|
|
|