<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>17522</bug_id>
          
          <creation_ts>2012-06-16 23:25:29 +0000</creation_ts>
          <short_desc>pixelDepth and colorDepth do not mean the same thing.</short_desc>
          <delta_ts>2013-08-08 13:28:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM View</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Neils Christoffersen">neils.christoffersen</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>glenn</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69159</commentid>
    <comment_count>0</comment_count>
    <who name="Neils Christoffersen">neils.christoffersen</who>
    <bug_when>2012-06-16 23:25:29 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71811</commentid>
    <comment_count>1</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-08-03 05:55:22 +0000</bug_when>
    <thetext>reassign to myself; apparently i am not the default assignee for this component</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87652</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-05-14 14:52:19 +0000</bug_when>
    <thetext>How are they different?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89459</commentid>
    <comment_count>3</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2013-06-18 09:10:44 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89466</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-18 09:57:23 +0000</bug_when>
    <thetext>Ah. Yes, they are different to the industry terms &apos;color depth&apos; and &apos;pixel depth&apos;. 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89468</commentid>
    <comment_count>5</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2013-06-18 09:59:21 +0000</bug_when>
    <thetext>The implementations are broken. We fix broken implementations all the time. Do not close this bug again without addressing it substantively.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89470</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-18 10:02:42 +0000</bug_when>
    <thetext>*** Bug 14071 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89474</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-18 12:59:58 +0000</bug_when>
    <thetext>In http://webdevdata.org/ data-dec2012 I see 3269 matches of &quot;\.(color|pixel)Depth&quot;. Looking through the matches, it seems like basically all of them are for the purpose of tracking. Here&apos;s an example:

	document.write(&quot;&lt;img src=&apos;http://counter.yadro.ru/hit;prian?r&quot;+ escape(document.referrer)+((typeof(screen)==&quot;undefined&quot;)?&quot;&quot;: &quot;;s&quot;+screen.width+&quot;*&quot;+screen.height+&quot;*&quot;+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+&quot;;u&quot;+escape(document.URL)+ &quot;;&quot;+Math.random()+ &quot;&apos; width=1 height=1 alt=&apos;&apos;&gt;&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89573</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-06-19 08:54:33 +0000</bug_when>
    <thetext>I made them always return 24.

https://dvcs.w3.org/hg/csswg/rev/e87354ee3440</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>