`gen_UiEvent.rs`: `page_x` and `page_y` should return `f64` instead of `i32`
lpotthast opened this issue · comments
Lukas Potthast commented
Describe the Bug
The page_x
and page_y
functions from gen_UiEvent.rs
provide i32
values.
But the MDN page (MouseEvent) states that these should both be:
A floating-point number of pixels from the left edge of the document at which the mouse was clicked, [...]
This property was originally specified in the Touch Events specification as a long integer, but was redefined in the CSSOM View Module to be a double-precision floating-point number to allow for subpixel precision.
Expected Behavior
The functions to return f64
, conforming to the double-precision floating-point number
statement.
If the browser wouldn't support subpixel precision, full integers would still be represented.
daxpedda commented
This is a duplicate of #2079.
TLDR: This is a known bug, but requires a breaking change to fix.
Liam Murphy commented