RESOLVED WONTFIX 162030
makeRGBAFromNSColor should use CalibratedRGB
https://bugs.webkit.org/show_bug.cgi?id=162030
Summary makeRGBAFromNSColor should use CalibratedRGB
Beth Dakin
Reported 2016-09-15 13:00:27 PDT
makeRGBAFromNSColor should use the NSColor's colorSpace instead of hardcoding NSDeviceRGBColorSpace rdar://problem/28314183
Attachments
Patch (1.25 KB, patch)
2016-09-15 13:03 PDT, Beth Dakin
simon.fraser: review-
Patch (1.20 KB, patch)
2016-09-15 13:12 PDT, Beth Dakin
thorton: review-
Beth Dakin
Comment 1 2016-09-15 13:03:01 PDT
Simon Fraser (smfr)
Comment 2 2016-09-15 13:05:58 PDT
Comment on attachment 288986 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=288986&action=review > Source/WebCore/platform/graphics/mac/ColorMac.mm:60 > - NSColor *rgbColor = [c colorUsingColorSpaceName:NSDeviceRGBColorSpace]; > + NSColor *rgbColor = [c colorUsingColorSpaceName:c.colorSpaceName]; This is wrong. This call is explicitly trying to convert from an arbitrary colorspace (e.g. CalibratedGray) to RGB. So it should use CalibratedRGB, not DeviceRGB.
Beth Dakin
Comment 3 2016-09-15 13:12:22 PDT
Simon Fraser (smfr)
Comment 4 2016-09-15 13:21:04 PDT
Patch looks correct but I'd love to see a test.
Tim Horton
Comment 5 2016-09-15 13:31:03 PDT
(In reply to comment #4) > Patch looks correct but I'd love to see a test. I don't think it is. And I don't think it fixes the problem Beth wants to fix, either.
Beth Dakin
Comment 6 2016-09-15 13:38:02 PDT
I'm going to WONTFIX this for now since getting this right is going to be a much bigger effort to actually keep track of colorspaces.
Note You need to log in before you can comment on or make changes to this bug.