Bug 228315

Summary: layout tests should be runnable with non-sRGB color profiles
Product: WebKit Reporter: Cameron McCormack (:heycam) <heycam>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, jbedard, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 188320    

Description Cameron McCormack (:heycam) 2021-07-26 23:07:16 PDT
Currently if you write a layout test that compares say

  <div style="width: 100px; height: 100px; background-color: red;"></div>

with

  <div style="width: 100px; height: 100px; background-color: color(display-p3 1 0 0 0);"></div>

then the test will pass.  We should probably have a way to run a test in a way that doesn't cause wide gamut colors to get clamped down to sRGB.

On macOS, we switch the display to an sRGB color profile and run all tests in this mode, but it looks like it's not sufficient to leave a Display P3 display with its factory color profile for the tests to pass.
Comment 1 Radar WebKit Bug Importer 2021-07-26 23:07:47 PDT
<rdar://problem/81147970>