haikuwebkit/LayoutTests/fast/box-shadow/inset-box-shadow-fractional...

22 lines
448 B
HTML
Raw Permalink Normal View History

REGRESSION (r252161): Animation of box-shadow with border-radius set is flashy https://bugs.webkit.org/show_bug.cgi?id=211530 <rdar://problem/62570229> Reviewed by Zalan Bujtas. Source/WebCore: Drawing inset box shadows with spread was broken, and in some cases generated invalid rounded rects, causing inset shadows with border-radius to lose the radius. First, with split inlines, the spread was not getting removed from the excluded edges. Fix in the includeLogicalLeftEdge/includeLogicalRightEdge clauses, adding shiftXEdgeBy()/shiftYEdgeBy() helpers to LayoutRect to simplify logic. Second, when computing the rounded hole rect, we'd use the result of style.getRoundedInnerBorderFor() but that doesn't take shadow spread into account, so we'd build a rounded rect with a rect that accounted for spread, but radii computed without. That could result in unrenderable rounded rects. Fix by calling style.getRoundedInnerBorderFor() a second time if we have spread; this will fix up the radii for spread. Tests: fast/box-shadow/inset-box-shadow-fractional-radius.html fast/box-shadow/inset-shadow-split-inline.html fast/box-shadow/inset-spread-box-shadow-split-inline.html * platform/graphics/LayoutRect.h: (WebCore::LayoutRect::shiftXEdgeBy): (WebCore::LayoutRect::shiftYEdgeBy): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBoxShadow): LayoutTests: Some ref tests for inset shadows with border radius, with spread, and when on split inlines. * fast/box-shadow/inset-box-shadow-expected.html: * fast/box-shadow/inset-box-shadow-fractional-radius-expected.html: Added. * fast/box-shadow/inset-box-shadow-fractional-radius.html: Added. * fast/box-shadow/inset-box-shadow.html: * fast/box-shadow/inset-shadow-split-inline-expected.html: Added. * fast/box-shadow/inset-shadow-split-inline.html: Added. * fast/box-shadow/inset-spread-box-shadow-split-inline-expected.html: Added. * fast/box-shadow/inset-spread-box-shadow-split-inline.html: Added. Canonical link: https://commits.webkit.org/224500@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-05-07 21:02:37 +00:00
<!DOCTYPE html>
<html>
<head>
<style>
.box {
width: 400px;
height: 200px;
margin: 10px;
border: 10px solid blue;
border-radius: 110px;
box-shadow: black 0px 0px 0px 29.77px inset;
clip-path: inset(40px calc(100% - 60px) calc(100% - 60px) 40px);
transform-origin: top left;
transform: scale(3);
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>