Bug 44603 - shadowSize parameter is used to pass shadow offset in the GraphicsContext::setShadow and getShadow functions
Summary: shadowSize parameter is used to pass shadow offset in the GraphicsContext::se...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 05:44 PDT by Alejandro G. Castro
Modified: 2010-08-26 00:24 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (29.41 KB, patch)
2010-08-25 05:46 PDT, Alejandro G. Castro
no flags Details | Formatted Diff | Diff
Proposed patch (28.06 KB, patch)
2010-08-25 07:59 PDT, Alejandro G. Castro
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2010-08-25 05:44:01 PDT
Currently the shadowSize parameter of the setShadow and getShadow functions of GraphicsContext is used to pass the offset of the shadow specified in the style of the elements.
Comment 1 Alejandro G. Castro 2010-08-25 05:46:59 PDT
Created attachment 65404 [details]
Proposed patch

Replace the names in the APIs and the locations where the functions are used.
Comment 2 Alejandro G. Castro 2010-08-25 05:58:51 PDT
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.
Comment 3 Early Warning System Bot 2010-08-25 06:03:00 PDT
Attachment 65404 [details] did not build on qt:
Build output: http://queues.webkit.org/results/3806070
Comment 4 Alejandro G. Castro 2010-08-25 07:59:56 PDT
Created attachment 65419 [details]
Proposed patch
Comment 5 mitz 2010-08-25 09:30:34 PDT
(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 6 Alejandro G. Castro 2010-08-25 10:16:24 PDT
Thanks for the test :). Opened a bug for the other issue: bug 44619.

I'll land this patch tomorrow.
Comment 7 Alejandro G. Castro 2010-08-26 00:24:50 PDT
Landed http://trac.webkit.org/changeset/66082