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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>23202</bug_id>
          
          <creation_ts>2009-01-08 17:52:31 -0800</creation_ts>
          <short_desc>rgba() and hsla() opacity doesn&apos;t end up as-specified in DOM</short_desc>
          <delta_ts>2023-02-18 06:30:38 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://farukat.es/bugs/webkit-rgba.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Faruk Ates">farukates</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>hyatt</cc>
    
    <cc>mitz</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>104980</commentid>
    <comment_count>0</comment_count>
    <who name="Faruk Ates">farukates</who>
    <bug_when>2009-01-08 17:52:31 -0800</bug_when>
    <thetext>When setting e.g. opacity: .42 on an element, retrieving that property in the DOM again returns 0.42 as expected.

This doesn&apos;t work for rgba() and hsla() values. E.g. specifying rgba(0,0,0, .42) returns rgba(0,0,0, 0.417969) in the DOM, the same for hsla().

This is inconsistent and unexpected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104981</commentid>
    <comment_count>1</comment_count>
      <attachid>26553</attachid>
    <who name="Faruk Ates">farukates</who>
    <bug_when>2009-01-08 17:56:19 -0800</bug_when>
    <thetext>Created attachment 26553
Same testcase file as URL: shows rgba() and opacity properties with inconsistent outcomes in the DOM

Adding the testcase as a file attachment as well for scenarios where my site might possibly be down or something similar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105007</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2009-01-09 00:53:10 -0800</bug_when>
    <thetext>This probably happens because opacity is stored as a float and the alpha component of a color is stored as a byte.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1934900</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-02-18 06:30:38 -0800</bug_when>
    <thetext>Using STP163, I get opacity and rgba as 0.42 in computed tab of Developer Tools? Do we need anything else or we can close this?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>26553</attachid>
            <date>2009-01-08 17:56:19 -0800</date>
            <delta_ts>2009-01-08 17:56:19 -0800</delta_ts>
            <desc>Same testcase file as URL: shows rgba() and opacity properties with inconsistent outcomes in the DOM</desc>
            <filename>webkit-rgba.html</filename>
            <type>text/html</type>
            <size>345</size>
            <attacher name="Faruk Ates">farukates</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cjxib2R5PgoKPGRpdiBzdHlsZT0iYmFja2dyb3VuZDpyZ2JhKDAsMCww
LCAuNDIpOyBvcGFjaXR5Oi40MiI+VGhpcyBpcyBhIDxjb2RlPmRpdjwvY29kZT4gd2l0aCA8Y29k
ZT5iYWNrZ3JvdW5kOiByZ2JhKDAsMCwwLCAuNDIpPC9jb2RlPiBhbmQgPGNvZGU+b3BhY2l0eTog
LjQyPC9jb2RlPiBvbiBpdC4gVGhlIG9wYWNpdHkgaXMgZm9yIGNvbXBhcmlzb247IGluc3BlY3Rp
bmcgdGhpcyBlbGVtZW50IHdpbGwgc2hvdyAwLjQxNzk2OSBmb3IgdGhlIHJnYmEoKSBwcm9wZXJ0
eSwgYnV0IDAuNDIgZm9yIHRoZSBvcGFjaXR5IHByb3BlcnR5LjwvZGl2PgoKPC9ib2R5Pgo8L2h0
bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>