[csswg-drafts] [cssom-view] Make colorDepth/pixelDepth return useful information again

mounirlamouri has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [cssom-view] Make colorDepth/pixelDepth return useful information 
again ==
**Context:** this is related to the 
[Screen](https://drafts.csswg.org/cssom-view/#screen) interface, in 
particular the 
[colorDepth](https://drafts.csswg.org/cssom-view/#dom-screen-colordepth)
 and 
[pixelDepth](https://drafts.csswg.org/cssom-view/#dom-screen-pixeldepth)

**Some bug history:**
* https://www.w3.org/Bugs/Public/show_bug.cgi?id=17522
* https://www.w3.org/Bugs/Public/show_bug.cgi?id=14071

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.

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/993 using your GitHub 
account

Received on Tuesday, 31 January 2017 18:54:04 UTC