<?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>24978</bug_id>
          
          <creation_ts>2014-03-09 12:53:56 +0000</creation_ts>
          <short_desc>Section 10.3.1 doesn&apos;t specify the exact color format to which implementation should transform style</short_desc>
          <delta_ts>2014-05-11 12:49:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Browser Test/Tools WG</product>
          <component>WebDriver</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>20860</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrey Botalov">botalov.andrey</reporter>
          <assigned_to name="Browser Testing and Tools WG">public-browser-tools-testing</assigned_to>
          <cc>ato</cc>
    
    <cc>botalov.andrey</cc>
    
    <cc>dburns</cc>
    
    <cc>mike</cc>
          
          <qa_contact name="Browser Testing and Tools WG">public-browser-tools-testing</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102119</commentid>
    <comment_count>0</comment_count>
    <who name="Andrey Botalov">botalov.andrey</who>
    <bug_when>2014-03-09 12:53:56 +0000</bug_when>
    <thetext>Section 10.6.3 says:
Color property values must be standardized to rgba format, matching the regular expression: rgba(\d+,\s*\d+,\s*\d+\s*(,\s*(1|0(\.\d+)?)))

There are a number of issues with regexp above:
1. ( and ) should be escaped
2. It doesn&apos;t specify amount of spaces using which numerical values should be separated.
3. It doesn&apos;t define which format should be returned:
rgba(255, 0, 0, 1.0000)
rgba(255, 0, 0, 1.000)
rgba(255, 0, 0, 1.00)
rgba(255, 0, 0, 1.0)
rgba(255, 0, 0, 1)

I think spec should specify format strictly so there won&apos;t be driver incompatibilities.

What about?
rgba\(\d+, \d+, \d+, (?:1|0)\.\d+\)

but it doesn&apos;t fully solve issue 3 from the list above</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105508</commentid>
    <comment_count>1</comment_count>
    <who name="David Burns :automatedtester">dburns</who>
    <bug_when>2014-05-08 22:58:49 +0000</bug_when>
    <thetext>Fixed in https://dvcs.w3.org/hg/webdriver/rev/91659493b7b3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105528</commentid>
    <comment_count>2</comment_count>
    <who name="Andrey Botalov">botalov.andrey</who>
    <bug_when>2014-05-09 06:51:04 +0000</bug_when>
    <thetext>I think it would be better to specify format in a more strict way, i.e. if integers or percentages should be used. And if whitespaces should be present after commas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105539</commentid>
    <comment_count>3</comment_count>
    <who name="David Burns :automatedtester">dburns</who>
    <bug_when>2014-05-09 13:57:12 +0000</bug_when>
    <thetext>If there is a specification describing that we should use that, which CSS3-Color does. Not using that will cause a lot of work in user agents to describe something that already has been done and implemented. 

Since we have a standard as well implementors of local ends also know what to expect and can change according to the updates of the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105636</commentid>
    <comment_count>4</comment_count>
    <who name="Andreas Tolfsen">ato</who>
    <bug_when>2014-05-11 12:49:00 +0000</bug_when>
    <thetext>I believe it&apos;s defined in http://www.w3.org/TR/css3-color/#rgb-color.  The spec says:

“The format of an RGB value in the functional notation is ‘rgb(’ followed by a comma-separated list of three numerical values (either three integer values or three percentage values) followed by ‘)’. The integer value 255 corresponds to 100%, and to F or FF in the hexadecimal notation: rgb(255,255,255) = rgb(100%,100%,100%) = #FFF. White space characters are allowed around the numerical values.”

And goes on about normalizing the values:

“All RGB colors are specified in the sRGB color space (see [SRGB]). User agents may vary in the fidelity with which they represent these colors, but using sRGB provides an unambiguous and objectively measurable definition of what the color should be, which can be related to international standards (see [COLORIMETRY]).”

I suspect we will need an exhaustive tests for this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>