| Index: Source/core/rendering/RenderLayer.cpp
|
| diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
|
| index 26f38033c20aa1af9f8a188b5dedb715329b760e..d4d3da94198f071f5a35bf11468ccd3ff291b60f 100644
|
| --- a/Source/core/rendering/RenderLayer.cpp
|
| +++ b/Source/core/rendering/RenderLayer.cpp
|
| @@ -5550,6 +5550,11 @@ bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
|
| if (paintsWithTransparency(PaintBehaviorNormal))
|
| return false;
|
|
|
| + // We can't use hasVisibleContent(), because that will be true if our renderer is hidden, but some child
|
| + // is visible and that child doesn't cover the entire rect.
|
| + if (renderer()->style()->visibility() != VISIBLE)
|
| + return false;
|
| +
|
| if (paintsWithFilters() && renderer()->style()->filter().hasFilterThatAffectsOpacity())
|
| return false;
|
|
|
| @@ -5565,8 +5570,15 @@ bool RenderLayer::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
|
|
|
| // FIXME: We currently only check the immediate renderer,
|
| // which will miss many cases.
|
| - return renderer()->backgroundIsKnownToBeOpaqueInRect(localRect)
|
| - || listBackgroundIsKnownToBeOpaqueInRect(posZOrderList(), localRect)
|
| + if (renderer()->backgroundIsKnownToBeOpaqueInRect(localRect))
|
| + return true;
|
| +
|
| + // We can't consult child layers if we clip, since they might cover
|
| + // parts of the rect that are clipped out.
|
| + if (renderer()->hasOverflowClip())
|
| + return false;
|
| +
|
| + return listBackgroundIsKnownToBeOpaqueInRect(posZOrderList(), localRect)
|
| || listBackgroundIsKnownToBeOpaqueInRect(negZOrderList(), localRect)
|
| || listBackgroundIsKnownToBeOpaqueInRect(normalFlowList(), localRect);
|
| }
|
|
|