W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2012

[Bug 17628] New: delta attributes of WheelEvent should be double rather than float

From: <bugzilla@jessica.w3.org>
Date: Thu, 28 Jun 2012 10:16:58 +0000
To: www-dom@w3.org
Message-ID: <bug-17628-4009@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17628

           Summary: delta attributes of WheelEvent should be double rather
                    than float
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM3 Events
        AssignedTo: schepers@w3.org
        ReportedBy: masayuki@d-toybox.com
         QAContact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org


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("wheel", { 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'm working on implementing D3E WheelEvent on Gecko. We're using
double for them.
https://bugzilla.mozilla.org/show_bug.cgi?id=719320

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 28 June 2012 10:17:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 28 June 2012 10:17:20 GMT