Fix for pixel-moving CSS filters with clipping.

When using a "pixel-moving" filter (ie., drop-shadow or blur), we
disable the normal clip operation, since we want to want to render
the full results of the element pre-clip for filtering. Clipping is
then applied just before drawing the filtered result.

However, we shouldn't disable *all* clipping recursively, since we
want children which clip themselves to still continue to be clipped.
The fix is to pass the original (unmodified) paintingInfo to
paintChildren().

BUG=350411

Review URL: https://codereview.chromium.org/476953003

git-svn-id: svn://svn.chromium.org/blink/trunk@180361 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7721ef57
<!DOCTYPE html>
<style>
.container {
-webkit-filter: drop-shadow(5px 5px 5px black);
}
.circle-mask {
border-radius: 80px;
overflow: hidden;
width: 100px;
height: 100px;
}
.green-box {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div class="container">
<div class="circle-mask">
<div class="green-box"></div>
</div>
</div>
<!DOCTYPE html>
<style>
.container {
-webkit-filter: drop-shadow(5px 5px 5px black);
}
.circle-mask {
border-radius: 80px;
overflow: hidden;
width: 100px;
height: 100px;
position: absolute;
}
.green-box {
width: 100px;
height: 100px;
background-color: green;
}
</style>
<div class="container">
<div class="circle-mask">
<div class="green-box"></div>
</div>
</div>
......@@ -1855,7 +1855,7 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
}
if (shouldPaintNegZOrderList)
paintChildren(NegativeZOrderChildren, context, localPaintingInfo, paintFlags);
paintChildren(NegativeZOrderChildren, context, paintingInfo, paintFlags);
if (shouldPaintOwnContents) {
paintForegroundForFragments(layerFragments, context, transparencyLayerContext, paintingInfo.paintDirtyRect, haveTransparency,
......@@ -1866,7 +1866,7 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
paintOutlineForFragments(layerFragments, context, localPaintingInfo, paintBehavior, paintingRootForRenderer, paintFlags);
if (shouldPaintNormalFlowAndPosZOrderLists)
paintChildren(NormalFlowChildren | PositiveZOrderChildren, context, localPaintingInfo, paintFlags);
paintChildren(NormalFlowChildren | PositiveZOrderChildren, context, paintingInfo, paintFlags);
if (shouldPaintOverlayScrollbars)
paintOverflowControlsForFragments(layerFragments, context, localPaintingInfo, paintFlags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment