RESOLVED FIXED 23512
cgColor() should have 'copy' or 'create' in the name (or return a RetainPtr)
https://bugs.webkit.org/show_bug.cgi?id=23512
Summary cgColor() should have 'copy' or 'create' in the name (or return a RetainPtr)
Simon Fraser (smfr)
Reported 2009-01-23 20:49:37 PST
cgColor() returns a retained object, but the name doesn't communicate that. Bad!
Attachments
Patch (7.69 KB, patch)
2009-02-26 06:41 PST, Jeremy Moskovich
eric: review+
PLATFORM(WIN_OS) (7.69 KB, patch)
2009-02-27 10:18 PST, Jeremy Moskovich
simon.fraser: review+
Simon Fraser (smfr)
Comment 1 2009-01-23 21:52:28 PST
Also the implementation of Color(CGColorRef); is totally missing!
Simon Fraser (smfr)
Comment 2 2009-01-24 10:37:24 PST
Odd. ColorCG.cpp exists, but is not in the Xcode project. It also has an implementation of cgColor() that uses the platform color space.
Jeremy Moskovich
Comment 3 2009-02-26 06:41:13 PST
Created attachment 28014 [details] Patch Rename to createCGColor() per-irc conversation. This also fixes https://bugs.webkit.org/show_bug.cgi?id=24197
Eric Seidel (no email)
Comment 4 2009-02-26 11:37:41 PST
Comment on attachment 28014 [details] Patch Yay! I like this change. Of course I might get yelled at by bdash for my continued disparate understanding of PLATFORM(MAC) vs. PLATFORM(DARWIN). :(
Darin Adler
Comment 5 2009-02-26 11:41:23 PST
DARWIN really seems wrong to me for the uses of CMProfileRef. For now, maybe !WIN_OS would be better, since the more limited version of CG is the one on Windows.
Jeremy Moskovich
Comment 6 2009-02-27 10:18:53 PST
Created attachment 28078 [details] PLATFORM(WIN_OS) Fix per Darin's comments.
Simon Fraser (smfr)
Comment 7 2009-02-27 10:23:02 PST
Comment on attachment 28078 [details] PLATFORM(WIN_OS) r=me
David Levin
Comment 8 2009-03-01 16:42:41 PST
Comitted as r41345.
Note You need to log in before you can comment on or make changes to this bug.