haikuwebkit/LayoutTests/css3/filters/blur-clipped-by-ancestor.html

29 lines
496 B
HTML
Raw Permalink Normal View History

Blur filter escapes an enclosing overflow:hidden https://bugs.webkit.org/show_bug.cgi?id=155029 Reviewed by Zalan Bujtas. Source/WebCore: The clipping that was applied when drawing the results of filters was wrong for two reasons. First, it used localPaintingInfo which has already been contaminated when setting up the filters. When painting the result, we need to use the original paintingInfo, to get the right paintDirtyRect. Secondly, when setting up the clip to paint the filter result, it was relying on layerFragments[0].backgroundRect. However, that was also contaminated by filter setup, since calculateRects() intersects with paintDirtyRect to compute that backgroundRect, and that paintDirtyRect came from filterPainter->repaintRect(). Fix this second issue by re-running collectFragments(), which computes a fragment backgroundRect using the original paintDirtyRect. Tests: css3/filters/blur-clipped-by-ancestor.html css3/filters/blur-clipped-with-overflow.html css3/filters/drop-shadow-with-overflow-hidden.html css3/filters/drop-shadow.html * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::clearResult): Unconditionally null these out. * rendering/FilterEffectRenderer.cpp: (WebCore::FilterEffectRendererHelper::beginFilterEffect): Typo fix. * rendering/FilterEffectRenderer.h: (WebCore::FilterEffectRendererHelper::FilterEffectRendererHelper): C++11 initialization. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::applyFilters): (WebCore::RenderLayer::paintLayerContents): * rendering/RenderLayer.h: const LayoutTests: * css3/filters/blur-clipped-by-ancestor-expected.html: Added. * css3/filters/blur-clipped-by-ancestor.html: Added. * css3/filters/blur-clipped-with-overflow-expected.html: Added. * css3/filters/blur-clipped-with-overflow.html: Added. * css3/filters/drop-shadow-expected.html: Added. * css3/filters/drop-shadow-with-overflow-hidden-expected.html: Added. * css3/filters/drop-shadow-with-overflow-hidden.html: Added. * css3/filters/drop-shadow.html: Added. Canonical link: https://commits.webkit.org/175323@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-30 04:13:16 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
.wrapper {
overflow: hidden;
height: 200px;
width: 200px;
margin: 50px;
border: 1px solid black;
}
.filtered {
width: 100%;
height: 100%;
background-color: black;
filter: blur(10px);
}
</style>
</head>
<body>
<div class="wrapper">
<div class="filtered">
</div>
</div>
</body>
</html>