Bug 44619

Summary: drawGDIGlyphs checks if the offset is empty incorrectly causing problems with the shadow
Product: WebKit Reporter: Alejandro G. Castro <alex>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Proposed patch mitz: review+

Description Alejandro G. Castro 2010-08-25 10:15:35 PDT
From the comment:

https://bugs.webkit.org/show_bug.cgi?id=44603#c5

(In reply to comment #2)
> After changing the names I've realized that this condition could be wrong but the old name could make it seem correct:
> 
> +            drawIntoBitmap = !offset.isEmpty() || blur;
> 
> It is in this file: WebCore/platform/graphics/win/FontCGWin.cpp static void drawGDIGlyphs
> 
> Could someone check if in Windows negative offsets of the text actually work, or no offsets but blurring. We could open a new bug in this case.

I’ve asked someone to check, and indeed in <data:text/html,%3Cdiv%20style=%22-webkit-font-smoothing:%20none%22%3E%3Cdiv%20style=%22text-shadow:%202px%202px%20red%22%3Etest%3C/div%3E%3Cdiv%20style=%22text-shadow:%20-2px%20-2px%20red%22%3Etest%3C/div%3E%3C/div%3E> the bottom line is missing the shadow. Good catch!
Comment 1 Alejandro G. Castro 2010-08-26 01:39:06 PDT
Created attachment 65534 [details]
Proposed patch

I can not test the patch but I guess at least it can be used as a initial point.
Comment 2 Alejandro G. Castro 2010-08-27 02:23:35 PDT
landed r66192, closing bug