[DOM3 Events] Type of deltaX, deltaY and deltaZ of WheelEvent should be float

Hello.

http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-WheelEvent

Current WheelEvent spec defines the type of deltaX, deltaY and detaZ as 
long. But I think they should be float.

On Windows, native mouse wheel event comes with delta value which means 
120 is one unit. The system settings of Windows specify how many lines 
or one page should be scrolled by 120. On Vista and later, the delta 
value of each native event may be less than 120. Therefore, it may mean 
non-integer lines or pages. E.g., 60 with one page scroll means half of 
a page. 30 with 1 line scroll means 0.333333... line scroll.

If we round up the delta value to integer, the scroll will be faster 
than other applications. On the other hand, if we round down the delta 
value, the scroll will be slower or stop (if delta < 1px).

-- 
Masayuki Nakano <masayuki@d-toybox.com>
Manager, Internationalization, Mozilla Japan.

Received on Wednesday, 2 February 2011 06:42:51 UTC