Bug 147758

Summary: Shadows don't draw on fillText when using a gradient fill
Product: WebKit Reporter: Dean Jackson <dino>
Component: New BugsAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, gyuyoung.kim
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mmaxfield: review+

Description Dean Jackson 2015-08-06 17:18:15 PDT
Shadows don't draw on fillText when using a gradient fill
Comment 1 Dean Jackson 2015-08-06 17:25:45 PDT
Created attachment 258426 [details]
Patch
Comment 2 Dean Jackson 2015-08-06 17:27:32 PDT
        <rdar://problem/20860912>
Comment 3 Myles C. Maxfield 2015-08-06 18:18:46 PDT
Comment on attachment 258426 [details]
Patch

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

> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2384
> +            c->setLegacyShadow(shadowOffset, shadowRadius, shadowColor, shadowColorSpace);

In some cases, can't this shadow be drawn at the same time as the real text, simply by setting some state on the context? We should do that if it's possible.
Comment 4 Dean Jackson 2015-08-06 18:26:48 PDT
Comment on attachment 258426 [details]
Patch

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

>> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:2384
>> +            c->setLegacyShadow(shadowOffset, shadowRadius, shadowColor, shadowColorSpace);
> 
> In some cases, can't this shadow be drawn at the same time as the real text, simply by setting some state on the context? We should do that if it's possible.

That's what we normally do. But in this case the real text is drawn just after here, into a mask, and then the mask applies to a pattern or gradient. So this is why we need to draw the shadow separately, before.
Comment 5 Dean Jackson 2015-08-07 12:44:41 PDT
Committed r188148: <http://trac.webkit.org/changeset/188148>