Bug 228315 - layout tests should be runnable with non-sRGB color profiles
Summary: layout tests should be runnable with non-sRGB color profiles
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 188320
  Show dependency treegraph
 
Reported: 2021-07-26 23:07 PDT by Cameron McCormack (:heycam)
Modified: 2021-09-27 16:53 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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>