Bug 31382 - Make -webkit-color-correction work with shadows
Summary: Make -webkit-color-correction work with shadows
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-11 15:39 PST by Beth Dakin
Modified: 2009-11-11 17:51 PST (History)
1 user (show)

See Also:


Attachments
Patch (29.25 KB, patch)
2009-11-11 15:55 PST, Beth Dakin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2009-11-11 15:39:18 PST
New CSS feature -webkit-color-correction does not currently work with box-shadow or text-shadow. This should be rectified!
Comment 1 Beth Dakin 2009-11-11 15:55:26 PST
Created attachment 43015 [details]
Patch

A few things about this patch:

1. As I mention in the Changelog, this doesn't fix canvas shadows. I will fix those when I fix canvas <https://bugs.webkit.org/show_bug.cgi?id=31319>
2. I did not make a new variable on the state for the shadow ColorSpace. This is not necessary with the way things are currently implemented. Furthermore, I realized that it is probably silly to have both a strokeColorSpace and a fillColorSpace -- I am pretty certain that even when the colors are different, stroke and fill will have the same ColorSpace, right? Anyway, it seems like these could be collapsed into one variable. I did not do that with the patch, but I am considering it. Maybe now or maybe later, what do you think?
Comment 2 Simon Fraser (smfr) 2009-11-11 16:25:21 PST
Comment on attachment 43015 [details]
Patch

> Index: WebCore/platform/graphics/cg/GraphicsContextCG.cpp
> ===================================================================

> +    CGColorRef cgColor = NULL;

Should be 0, not NULL. It would be nice to rewrite this using RetainPtrs at some point.
Comment 3 Simon Fraser (smfr) 2009-11-11 17:07:38 PST
Comment on attachment 43015 [details]
Patch

r++++++
Comment 4 Beth Dakin 2009-11-11 17:51:31 PST
Yay! Committed fix with revision 50852.