Bug 234997 - Basic color with alpha doesn't match other browsers on non-sRGB monitors
Summary: Basic color with alpha doesn't match other browsers on non-sRGB monitors
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-07 17:59 PST by Sam Weinig
Modified: 2022-01-14 18:00 PST (History)
2 users (show)

See Also:


Attachments
Test using boxes (1007 bytes, application/xhtml+xml)
2022-01-07 18:00 PST, Sam Weinig
no flags Details
Test using boxes (1007 bytes, text/html)
2022-01-07 18:00 PST, Sam Weinig
no flags Details
Test using boxes (400 bytes, text/html)
2022-01-07 18:02 PST, Sam Weinig
no flags Details
Test using rgb() instead (458 bytes, text/html)
2022-01-07 18:10 PST, Sam Weinig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2022-01-07 17:59:26 PST
The test css/css-color/t425-hsla-basic-a.xht is failing due to some issue with how we handle hsla() colors. With a simpler test that doesn't use text, it is easier to see that we don't match other browsers.
Comment 1 Sam Weinig 2022-01-07 18:00:02 PST Comment hidden (obsolete)
Comment 2 Sam Weinig 2022-01-07 18:00:57 PST Comment hidden (obsolete)
Comment 3 Sam Weinig 2022-01-07 18:02:42 PST
Created attachment 448655 [details]
Test using boxes
Comment 4 Sam Weinig 2022-01-07 18:10:21 PST
Created attachment 448656 [details]
Test using rgb() instead
Comment 5 Sam Weinig 2022-01-07 18:10:54 PST
Don't think this is hsla() related. But rather something about how we draw.
Comment 6 Sam Weinig 2022-01-07 18:39:58 PST
Looks like this is likely due to using the display colorspace as our working color space for our CGContextRefs. As such, this is not a problem on sRGB displays.

We should try to see if we can use extended-srgb as we do on iOS, but it will likely be a bit costly due to the lack of a dedicated scaler. But it is an experiment worth doing.
Comment 7 Radar WebKit Bug Importer 2022-01-14 18:00:18 PST
<rdar://problem/87627670>