RESOLVED FIXED 49726
box-shadow radii stays the same regardless of any spread set
https://bugs.webkit.org/show_bug.cgi?id=49726
Summary box-shadow radii stays the same regardless of any spread set
Lea Verou
Reported 2010-11-18 05:12:20 PST
From Backgrounds & Borders: (http://www.w3.org/TR/2010/WD-css3-background-20100612/#the-box-shadow) "If a spread distance is defined, the shadow is expanded outward or contracted inward by an operation equivalent to applying twice the absolute value of the spread value to a blur operation as defined below and thresholding the result such that for a positive spread distance all non-transparent pixels are given the full shadow color and for a negative spread distance all non-opaque pixels are made transparent. The UA may approximate this operation by taking an outward outset of the specified amount normal to the original shadow perimeter. Alternatively the UA may approximate the transformed shadow perimeter shape by outsetting (insetting, for inner shadows) the shadow's straight edges by the spread distance and increasing (decreasing, for inner shadows) and flooring at zero the corner radii by the same amount. (The UA may even combine these methods, using one method for outer shadows and another for inner ones.)" In Gecko & Presto the corner radii is adjusted accordingly. In Webkit, it stays the same as the radii of the outer edge of the border. This only happens with outset shadows, as you can see in the 3rd div, inset shadows are rendered just fine. (Originally discovered by David DeSandro, although I did a search and I don't think there's another bug report on this.)
Attachments
Testcase with negative spread (512 bytes, text/html)
2010-12-21 20:23 PST, Simon Fraser (smfr)
no flags
Patch (219.69 KB, patch)
2011-01-20 05:10 PST, Hajime Morrita
no flags
Patch (122.77 KB, patch)
2011-03-30 15:39 PDT, Hajime Morrita
simon.fraser: review+
Simon Fraser (smfr)
Comment 1 2010-12-11 19:30:08 PST
Is this still an issue? It's hard to tell from the url.
Lea Verou
Comment 2 2010-12-12 03:00:04 PST
Yes it is.
Simon Fraser (smfr)
Comment 3 2010-12-21 20:23:19 PST
*** Bug 51386 has been marked as a duplicate of this bug. ***
Simon Fraser (smfr)
Comment 4 2010-12-21 20:23:38 PST
Created attachment 77182 [details] Testcase with negative spread
Hajime Morrita
Comment 5 2010-12-23 22:15:45 PST
*** Bug 49913 has been marked as a duplicate of this bug. ***
Hajime Morrita
Comment 6 2011-01-20 05:10:47 PST
Hajime Morrita
Comment 7 2011-01-20 05:14:38 PST
Hi mitz, as discussed at Bug 27417, I change the border-radius behavior in this patch. Could you take a look when you have time?
Hajime Morrita
Comment 8 2011-01-23 17:19:13 PST
ping?
Simon Fraser (smfr)
Comment 9 2011-03-28 12:40:06 PDT
Patch no longer applies.
Simon Fraser (smfr)
Comment 10 2011-03-28 12:42:06 PDT
*** Bug 57258 has been marked as a duplicate of this bug. ***
Hajime Morrita
Comment 11 2011-03-30 15:39:27 PDT
Hajime Morrita
Comment 12 2011-03-30 15:40:31 PDT
Hi Simon, thank you for trying this! I just updated the patch to ToT. Could you take a review for this when you have time? Thanks in advance.
Simon Fraser (smfr)
Comment 13 2011-03-30 15:56:32 PDT
Comment on attachment 87630 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=87630&action=review > LayoutTests/fast/box-shadow/spread-multiple-inset.html:1 > +<html> Could you fix the test so that the boxes don't overlap?
Hajime Morrita
Comment 14 2011-03-30 16:35:28 PDT
(In reply to comment #13) > (From update of attachment 87630 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=87630&action=review > > > LayoutTests/fast/box-shadow/spread-multiple-inset.html:1 > > +<html> > > Could you fix the test so that the boxes don't overlap? Sure! I'll fix this and land the patch shortly.
Hajime Morrita
Comment 15 2011-03-30 16:56:41 PDT
Simon Fraser (smfr)
Comment 16 2011-04-08 13:49:16 PDT
I think this may have regressed the 6th box in LayoutTests/fast/box-shadow/inset-box-shadows.html
Simon Fraser (smfr)
Comment 17 2011-04-08 13:50:18 PDT
I filed bug 58162.
Note You need to log in before you can comment on or make changes to this bug.