<?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>17628</bug_id>
          
          <creation_ts>2012-06-28 10:17:05 +0000</creation_ts>
          <short_desc>delta attributes of WheelEvent should be double rather than float</short_desc>
          <delta_ts>2012-09-12 04:31:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - DOM3 Events</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>needsReview</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Masayuki Nakano">masayuki</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>bugs</cc>
    
    <cc>mike</cc>
    
    <cc>travil</cc>
    
    <cc>www-dom</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69482</commentid>
    <comment_count>0</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-06-28 10:17:05 +0000</bug_when>
    <thetext>I think that the type of deltaX, deltaY and deltaZ attributes of WheelEvent should be double rather than float.

If they are float, the initialized values of untrusted events and the result of the attributes cannot match easily.

For example:

var e = new WheelEvent(&quot;wheel&quot;, { deltaX: 1/3 });
alert(e.deltaX == 1/3);

The result could be false due to the fractional error.

float is useful when a lot of values are stored in arrays. However, delta values are not so. So, I think that the type of delta values should be double.

The example may not be a realistic situation. However, if web application developers met to this problem, they would feel strange.

Currently, I&apos;m working on implementing D3E WheelEvent on Gecko. We&apos;re using double for them.
https://bugzilla.mozilla.org/show_bug.cgi?id=719320</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72634</commentid>
    <comment_count>1</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-08-23 20:29:58 +0000</bug_when>
    <thetext>Double is fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72635</commentid>
    <comment_count>2</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-08-23 20:33:27 +0000</bug_when>
    <thetext>FYI, Gecko uses double already.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72636</commentid>
    <comment_count>3</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-08-23 20:36:21 +0000</bug_when>
    <thetext>Fixed in revision 237:

http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.237</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73672</commentid>
    <comment_count>4</comment_count>
    <who name="Masayuki Nakano">masayuki</who>
    <bug_when>2012-09-12 04:31:21 +0000</bug_when>
    <thetext>nit:

http://www.w3.org/TR/2012/WD-DOM-Level-3-Events-20120906/#events-WheelEvent
  readonly attribute double         deltaX;
  readonly attribute double         deltaY;
  readonly attribute double         deltaZ;
  readonly attribute unsigned long deltaMode;

The indentation is wrong. I guess that you just replaced &quot;float&quot; with &quot;double&quot;. The length is increased 1 character.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>