Bug 187244 - [cairo] Doesn't paint box-shadow with zero blur-radius
Summary: [cairo] Doesn't paint box-shadow with zero blur-radius
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-02 02:40 PDT by Fujii Hironori
Modified: 2018-07-05 01:04 PDT (History)
4 users (show)

See Also:


Attachments
current GTK's inset-expected.png failing to draw some box-shadow (26.87 KB, image/png)
2018-07-02 02:40 PDT, Fujii Hironori
no flags Details
WIP patch (656 bytes, patch)
2018-07-02 02:47 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
inset-expected.png after this change (27.79 KB, image/png)
2018-07-02 02:49 PDT, Fujii Hironori
no flags Details
Patch (67.27 KB, patch)
2018-07-03 02:27 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-07-02 02:40:58 PDT
Created attachment 344086 [details]
current GTK's inset-expected.png failing to draw some box-shadow

[cairo] Doesn't paint box-shadow with zero blur-radius

fast/box-shadow/inset.html is the test case.
Comment 1 Fujii Hironori 2018-07-02 02:47:48 PDT
Created attachment 344087 [details]
WIP patch
Comment 2 Fujii Hironori 2018-07-02 02:49:06 PDT
Created attachment 344088 [details]
inset-expected.png after this change
Comment 3 Fujii Hironori 2018-07-02 02:57:18 PDT
This is the screenshot of the important blog for WebKitGTK+ after this fix :-)
https://photos.app.goo.gl/87b64JeZhJ1GDK2N7
Comment 4 Zan Dobersek 2018-07-02 06:10:27 PDT
(In reply to Fujii Hironori from comment #1)
> Created attachment 344087 [details]
> WIP patch

LGTM, but please make it reviewable.
Comment 5 Michael Catanzaro 2018-07-02 07:52:12 PDT
Thanks for fixing my blog!
Comment 6 Michael Catanzaro 2018-07-02 07:52:29 PDT
Comment on attachment 344087 [details]
WIP patch

View in context: https://bugs.webkit.org/attachment.cgi?id=344087&action=review

BTW, I'm really curious how you managed to debug this issue.

> Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:616
>      // We can't avoid ShadowBlur if the shadow has blur.
> -    if (color.isVisible() && blur)
> +    if (color.isVisible())

The comment needs to be updated now.
Comment 7 Fujii Hironori 2018-07-03 02:27:11 PDT
(In reply to Michael Catanzaro from comment #6)
> 
> BTW, I'm really curious how you managed to debug this issue.

I was just lucky. I was grepping "blur" and found the suspicious condition.
Comment 8 Fujii Hironori 2018-07-03 02:27:42 PDT
Created attachment 344169 [details]
Patch
Comment 9 Fujii Hironori 2018-07-03 20:19:16 PDT
Comment on attachment 344169 [details]
Patch

Clearing flags on attachment: 344169

Committed r233495: <https://trac.webkit.org/changeset/233495>
Comment 10 Fujii Hironori 2018-07-03 20:19:19 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Fujii Hironori 2018-07-05 01:04:24 PDT
It turned out this is not a right fix.
I filed bug 187336.