| Index: Source/core/rendering/RenderBox.cpp
|
| diff --git a/Source/core/rendering/RenderBox.cpp b/Source/core/rendering/RenderBox.cpp
|
| index 0474d3bf906d94137232fa4511d291a8440de582..103f488c79d8e40c709ea8d956876260a2da0921 100644
|
| --- a/Source/core/rendering/RenderBox.cpp
|
| +++ b/Source/core/rendering/RenderBox.cpp
|
| @@ -1257,7 +1257,8 @@ static bool isCandidateForOpaquenessTest(RenderBox* childBox)
|
| if (!childBox->width() || !childBox->height())
|
| return false;
|
| if (RenderLayer* childLayer = childBox->layer()) {
|
| - if (childLayer->isComposited())
|
| + // FIXME: perhaps this could be less conservative?
|
| + if (childLayer->compositingState() != NotComposited)
|
| return false;
|
| // FIXME: Deal with z-index.
|
| if (!childStyle->hasAutoZIndex())
|
| @@ -1352,9 +1353,13 @@ void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paint
|
| if (!paintInfo.shouldPaintWithinRoot(this) || style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseClippingMask || paintInfo.context->paintingDisabled())
|
| return;
|
|
|
| - if (!layer() || !layer()->isComposited())
|
| + if (!layer() || layer()->compositingState() != PaintsIntoOwnBacking)
|
| return;
|
|
|
| + // We should never have this state in this function. A layer with a mask
|
| + // should have always created its own backing if it became composited.
|
| + ASSERT(layer()->compositingState() != HasOwnBackingButPaintsIntoAncestor);
|
| +
|
| LayoutRect paintRect = LayoutRect(paintOffset, size());
|
| paintInfo.context->fillRect(pixelSnappedIntRect(paintRect), Color::black);
|
| }
|
|
|