Bug 187244

Summary: [cairo] Doesn't paint box-shadow with zero blur-radius
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: WebKitGTKAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, mcatanzaro, zan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
current GTK's inset-expected.png failing to draw some box-shadow
none
WIP patch
none
inset-expected.png after this change
none
Patch none

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.