Index: Source/core/rendering/RenderBlockFlow.cpp |
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp |
index a786bb86aec1bad446dfa02dacd0e0e4a78e2d48..45ddedc4efb7340974bfa4451919dbaa52266d4c 100644 |
--- a/Source/core/rendering/RenderBlockFlow.cpp |
+++ b/Source/core/rendering/RenderBlockFlow.cpp |
@@ -358,8 +358,16 @@ void RenderBlockFlow::layoutBlock(bool relayoutChildren) |
// we overflow or not. |
updateScrollInfoAfterLayout(); |
- if (m_repaintLogicalTop != m_repaintLogicalBottom && (style()->visibility() == VISIBLE || enclosingLayer()->hasVisibleContent())) |
- setShouldInvalidateOverflowForPaint(true); |
+ if (m_repaintLogicalTop != m_repaintLogicalBottom) { |
+ bool hasVisibleContent = style()->visibility() == VISIBLE; |
+ if (!hasVisibleContent) { |
+ RenderLayer* layer = enclosingLayer(); |
+ layer->updateDescendantDependentFlags(); |
+ hasVisibleContent = layer->hasVisibleContent(); |
+ } |
+ if (hasVisibleContent) |
+ setShouldInvalidateOverflowForPaint(true); |
+ } |
clearNeedsLayout(); |
} |