Skip to content

[cssom-view] Make colorDepth/pixelDepth return useful information again #993

@mounirlamouri

Description

@mounirlamouri

Context: this is related to the Screen interface, in particular the colorDepth and pixelDepth

Some bug history:

I am suggesting that we do the following changes:

  • colorDepth and pixelDepth continue to return the same value;
  • colorDepth and pixelDepth should return the number of bits allocated to colors on the output device or an approximation to the best of the UA's knowledge;
  • 24 is to be used as a default value for privacy considerations or when the UA can't find the value;
  • the color MQ should return a consistent values with colorDepth and pixelDepth (eg. 8 when the properties return 24 or 10 when 30 is returned by the properties)

We could also recommend 24 to be used if the value would be below 24. However, Blink already exposes monochrome in the color MQ so there might be benefit of keeping consistency between APIs in some cases where the value would be below 24.

The purpose for this change is for websites to be able to detect whether it is worth providing content that would require high color depth output.

The main concern would be fingerprinting. The treat seems fairly weak compared to the current fingerprinting surface on the Web. It will most likely add one or two bits of entropy (24/30/48) which can probably be linked to other properties of the display (CSS color gamut, screen size, etc), thus likely reducing the practical benefit for fingerprinting.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions