Summary: | REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||
Component: | Layout and Rendering | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, glenn, koivisto, mitz, simon.fraser, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Regressed at http://trac.webkit.org/changeset/145680 Ah, there's a code path where paintFillLayer() paints the box shadow. Created attachment 201134 [details]
Patch
Created attachment 201136 [details]
Alternative patch
The simpler approach might be better. I'm not sure if it is semantically correct to consider box shadow in background extent. Comment on attachment 201136 [details] Alternative patch View in context: https://bugs.webkit.org/attachment.cgi?id=201136&action=review > Source/WebCore/rendering/RenderBox.cpp:1151 > + LayoutRect backgroundRect = pixelSnappedIntRect(style()->boxShadow() ? boxShadowExtent() : borderBoxRect()); I think it's confusing for a function called backgroundPaintedExtent() to return the box shadow extent, unless you rename it to boxDecorationExtent(). This patch also means that you'll always consult box shadows for obscuration, even when the background might be obscured and the shadow drawn separately. So I prefer my patch. |
Created attachment 201125 [details] Testcase There should be a box shadow on the parent of the gray box in the testcase, but it's missing.