makeRGBAFromNSColor should use the NSColor's colorSpace instead of hardcoding NSDeviceRGBColorSpace rdar://problem/28314183
Created attachment 288986 [details] Patch
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.
Created attachment 288988 [details] Patch
Patch looks correct but I'd love to see a test.
(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.
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.