<?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>14326</bug_id>
          
          <creation_ts>2011-09-28 14:48:15 +0000</creation_ts>
          <short_desc>2d.imageData.object.round should be updated</short_desc>
          <delta_ts>2012-03-05 17:44:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>testsuite</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ms2ger">Ms2ger</reporter>
          <assigned_to name="Ms2ger">Ms2ger</assigned_to>
          <cc>excors</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>qkmiao</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57479</commentid>
    <comment_count>0</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2011-09-28 14:48:15 +0000</bug_when>
    <thetext>2d.imageData.object.round should test for

&quot;Round x to the nearest integer, choosing the even integer if it lies halfway between two.&quot;

as changed in &lt;http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.html.diff?r1=1.393;r2=1.394;f=h&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57631</commentid>
    <comment_count>1</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2011-10-02 15:12:38 +0000</bug_when>
    <thetext>http://dvcs.w3.org/hg/html/rev/1d201654fce1

Please review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65008</commentid>
    <comment_count>2</comment_count>
    <who name="Qiankun Miao">qkmiao</who>
    <bug_when>2012-03-05 05:30:09 +0000</bug_when>
    <thetext>As defined in latest spec (Editor&apos;s Draft 29 February 2012) at http://dev.w3.org/html5/2dcontext/#imagedata, the data of imagedata is initialized to a Uint8ClampedArray object which maps to a octet type in Web IDL.  
According to the mapping rule defined at http://dev.w3.org/2006/webapi/WebIDL/#es-octet, an attribute annotated with the [Clamp] extended attribute should handle as follows:
1. Round x to the nearest integer, choosing the even integer if it lies halfway between two.
2. Set x to min(max(x, 0), 2^8 − 1).
3. Return the IDL octet value that represents the same numeric value as x.

e.g.
0.499 -&gt; 0
0.5 -&gt; 0
0.501 -&gt; 1
1.499 -&gt; 1
1.5 -&gt; 2
1.501 -&gt; 2
2.5 -&gt; 2
3.5 -&gt; 4
252.5 -&gt; 252
253.5 -&gt; 254
254.5 -&gt; 254
256.5 -&gt; 255
-0.5 -&gt; 0
-1.5 -&gt; 0

So this test should be updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65025</commentid>
    <comment_count>3</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-03-05 17:44:08 +0000</bug_when>
    <thetext>Thanks, I&apos;ve updated the approved version.

http://dvcs.w3.org/hg/html/rev/c3f2f7da0bfb</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>