| Summary: | REGRESSION (iOS 13.4): Inset box-shadow rendering bug | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andrea <andrea.verlicchi> | ||||||||||
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | bfulgham, changseok, dylan, esprehn+autocc, ews-watchlist, glenn, ilari, kondapallykalyan, me, pdr, simon.fraser, thatguy, webkit-bug-importer, ysuzuki, zalan | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | Safari 13 | ||||||||||||
| Hardware: | iPhone / iPad | ||||||||||||
| OS: | iOS 13 | ||||||||||||
| URL: | https://codepen.io/smfr/pen/QWbRbmW | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Andrea
2020-04-02 14:35:07 PDT
Reproduces on macOS too. Looks like absolute value of the box-shadow spread is not important, but rather the proportion to the width of the element that the inset box-shadow is applied to. I was able to reproduce this issue with a thinner box and a lower spread radius. Some additional notes: The colour of the bar is dependent on the colour of the box shadow; alpha values are ignored. The width of the bar is dependent on (but not exactly) the blur radius of the box-shadow. Hope this helps whoever's working on the issue. Appears to be a regression of r252689, specifically these two lines: LayoutUnit xOffset = 2 * paintRect.width() + std::max<LayoutUnit>(0, shadowOffset.width()) + shadowPaintingExtent + 2 * shadowSpread + LayoutUnit(1); LayoutSize extraOffset(xOffset.ceil(), 0); The previous code was subtracting 2 * shadowSpread, but the patch changed it to adding 2 * shadowSpread. Patch attached. Created attachment 399427 [details]
Code patch only
Created attachment 399459 [details]
Patch
Comment on attachment 399459 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=399459&action=review > Source/WebCore/rendering/RenderBoxModelObject.cpp:2398 > - LayoutUnit xOffset = paintRect.width() + std::max<LayoutUnit>(0, shadowOffset.width()) + shadowPaintingExtent + 2 * shadowSpread + LayoutUnit(1); > + LayoutUnit xOffset = paintRect.width() + std::max<LayoutUnit>(0, shadowOffset.width()) + shadowPaintingExtent - 2 * shadowSpread + LayoutUnit(1); The bug is about inset shadows, but this is the Normal shadow code path, so this can't be the right fix. Created attachment 399500 [details]
Patch
Oops, you're right. Fixed. Committed r269242: <https://trac.webkit.org/changeset/269242> All reviewed patches have been landed. Closing bug and clearing flags on attachment 399500 [details]. |