Commit 76328d06 authored by chrishtr@chromium.org's avatar chrishtr@chromium.org

Correctly ignore "self" for border radius clipping when painting the background phase or fragments.

This was broken in crrev.com/653303003.

There is no test for the latter, but that code is not live yet. Punting to 
mstensho@opera.com.

BUG=425030

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

git-svn-id: svn://svn.chromium.org/blink/trunk@184831 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 85722ee2
# This directly has manual tests that don't have to run with run-webkit-tests # This directly has manual tests that don't have to run with run-webkit-tests
crbug.com/359838 http/tests/ManualTests/ [ Skip ] crbug.com/359838 http/tests/ManualTests/ [ Skip ]
......
<!DOCTYPE html>
<div style="overflow: hidden; border-radius: 4px;">
<div style="border: 1px solid black; border-radius: 4px 0px 0px 4px; background: lightgray; width: 20px; height: 20px">
</div>
</div>
<!DOCTYPE html>
<div style="position: relative; overflow: hidden; border-radius: 4px;">
<div style="position: relative; overflow: hidden; border: 1px solid black; border-radius: 4px 0px 0px 4px; background: lightgray; width: 20px; height: 20px">
</div>
</div>
...@@ -688,7 +688,7 @@ void LayerPainter::paintBackgroundForFragments(const LayerFragments& layerFragme ...@@ -688,7 +688,7 @@ void LayerPainter::paintBackgroundForFragments(const LayerFragments& layerFragme
if (localPaintingInfo.clipToDirtyRect && needsToClip(localPaintingInfo, fragment.backgroundRect)) { if (localPaintingInfo.clipToDirtyRect && needsToClip(localPaintingInfo, fragment.backgroundRect)) {
clipRecorder = adoptPtr(new ClipRecorder(&m_renderLayer, context, DisplayItem::ClipLayerBackground, fragment.backgroundRect)); clipRecorder = adoptPtr(new ClipRecorder(&m_renderLayer, context, DisplayItem::ClipLayerBackground, fragment.backgroundRect));
applyRoundedRectClips(localPaintingInfo, context, fragment.backgroundRect, paintFlags, *clipRecorder); applyRoundedRectClips(localPaintingInfo, context, fragment.backgroundRect, paintFlags, *clipRecorder, DoNotIncludeSelfForBorderRadius); // Background painting will handle clipping to self.
} }
// Paint the background. // Paint the background.
...@@ -873,7 +873,8 @@ void LayerPainter::paintTransformedLayerIntoFragments(GraphicsContext* context, ...@@ -873,7 +873,8 @@ void LayerPainter::paintTransformedLayerIntoFragments(GraphicsContext* context,
OwnPtr<ClipRecorder> clipRecorder; OwnPtr<ClipRecorder> clipRecorder;
if (needsToClip(paintingInfo, clipRect)) { if (needsToClip(paintingInfo, clipRect)) {
clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), context, DisplayItem::ClipLayerFragmentParent, clipRect)); clipRecorder = adoptPtr(new ClipRecorder(m_renderLayer.parent(), context, DisplayItem::ClipLayerFragmentParent, clipRect));
LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(paintingInfo, context, clipRect, paintFlags, *clipRecorder, DoNotIncludeSelfForBorderRadius); // Child clipping mask painting will handle clipping to self. // FIXME: why should we have to deal with rounded rect clips here at all?
LayerPainter(*m_renderLayer.parent()).applyRoundedRectClips(paintingInfo, context, clipRect, paintFlags, *clipRecorder);
} }
paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragment.paginationOffset); paintLayerByApplyingTransform(context, paintingInfo, paintFlags, fragment.paginationOffset);
......
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