haikuwebkit/LayoutTests/fast/box-shadow/inset-spread-box-shadow-spl...

34 lines
655 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>
.container {
width: 6ch;
font-size: 100px;
font-family: Ahem;
outline: 1px solid gray;
overflow: hidden;
}
.shadowed {
color: transparent;
line-height: 160px;
border-radius: 80px;
box-shadow: black 0px 0px 0px 40px inset;
}
</style>
</head>
<body>
<div class="container">
<span class="shadowed">
000000000000
</span>
<span class="shadowed" style="margin-left: -4ex">
000000000000
</span>
<span class="shadowed" style="margin-left: -1ch">
0000000
</span>
</div>
</body>
</html>