This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The CSSOM View spec section 4.2 defines two properties on the Screen interface: pixelDepth and colorDepth. The spec is unclear/wrong on two counts: 1. pixelDepth and colorDepth are defined together, implying that they should always be the same. If they are always identical, then there is no point in having two properties. 2. Pixel depth and color depth do not always mean the same thing, depending on the display device.
reassign to myself; apparently i am not the default assignee for this component
How are they different?
(In reply to comment #2) > How are they different? colorDepth is (or is often interpreted as) bits per component, also called bits per sample; while pixelDepth often refers to the combination of bits for a pixel contributed by all applicable samples; so, e.g., RGBA4444 is 4 bits per sample, or colorDepth 4 but pixelDepth 16; see https://en.wikipedia.org/wiki/Color_depth for more discussion at present the definitions of both colorDepth and pixelDepth in Section 5.2 are wrong
Ah. Yes, they are different to the industry terms 'color depth' and 'pixel depth'. However, the current definition is interoperably implemented in Presto/Blink/WebKit/Gecko/IE, as far as I can tell. This is a case where the implementations predated the spec, I believe.
The implementations are broken. We fix broken implementations all the time. Do not close this bug again without addressing it substantively.
*** Bug 14071 has been marked as a duplicate of this bug. ***
In http://webdevdata.org/ data-dec2012 I see 3269 matches of "\.(color|pixel)Depth". Looking through the matches, it seems like basically all of them are for the purpose of tracking. Here's an example: document.write("<img src='http://counter.yadro.ru/hit;prian?r"+ escape(document.referrer)+((typeof(screen)=="undefined")?"": ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+ ";"+Math.random()+ "' width=1 height=1 alt=''>")
I made them always return 24. https://dvcs.w3.org/hg/csswg/rev/e87354ee3440