Intent to Ship: High-precision coordinates, i.e., fractional coordinates, of PointerEvents in Nightly builds

128 views
Skip to first unread message

Masayuki Nakano

unread,
Dec 12, 2024, 2:56:19 AM12/12/24
to dev-pl...@mozilla.org

We shipped high-precision coordinates, i.e., fractional coordinates, of PointerEvents in Nightly builds.

Summary: `screenX`, `screenY`, `clientX`, `clientY`, `pageX`, `pageY`, `offsetX` and `offsetY` of DOM events are now changed from `long` to `double`. And these values may be fractional values if the event is a `PointerEvent` whose type is NOT `click`, `auxclick` nor `contextmenu`.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1680669

Specification: CSS OM <https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface> and PointerEvents <https://w3c.github.io/pointerevents/#event-coordinates>

Platform coverage: All

Preference: `dom.event.pointer.fractional_coordinates.enabled`

DevTools bug: N/A

Other browsers: Chrome already supports this. Safari seems supporting it only for trusted events and only in preview builds.

web-platform-tests: trusted: <https://wpt.fyi/results/pointerevents/pointerevent_fractional_coordinates.html%3Fmouse?label=experimental&label=master&aligned>, untrusted: <https://wpt.fyi/results/pointerevents/pointerevent_fractional_coordinates_untrusted.html?label=experimental&label=master&aligned>

-- 
Masayuki Nakano <masa...@d-toybox.com>
Working on DOM, Events, editor and IME handling for Gecko

Masayuki Nakano

unread,
Jan 6, 2025, 4:15:57 AMJan 6
to dev-pl...@mozilla.org
Now, the fractional coordinates are enabled by default in all channels.
First version of supporting it is 135.
Reply all
Reply to author
Forward
0 new messages