Bug 305672

Summary: On some displays, CSS colors when used as layer backgrounds can still show as HDR
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=305683
Attachments:
Description Flags
Test none

Simon Fraser (smfr)
Reported 2026-01-16 15:52:30 PST
Created attachment 478057 [details] Test On a Studio Display, the left boxes in the attached testcase still show as HDR, even though we intend to clamp. `colorSpace.usesExtendedRange()` returns false for the Apple Studio Display, even though it has some HDR headroom. This causes `cachedSDRCGColorForColorspace()` and `createSDRCGColorForColorspace()` to not clamp as they should.
Attachments
Test (2.47 KB, text/html)
2026-01-16 15:52 PST, Simon Fraser (smfr)
no flags
Radar WebKit Bug Importer
Comment 1 2026-01-16 15:52:35 PST
Simon Fraser (smfr)
Comment 2 2026-01-16 15:53:38 PST
There has to be another HDR asset on the screen for that test case to show HDR.
Note You need to log in before you can comment on or make changes to this bug.