Intent to Ship: PointerEvent.getCoalescedEvents

45 views
Skip to first unread message

Navid Zolghadr

unread,
Jan 16, 2017, 4:16:04 PM1/16/17
to blink-dev

Contact emails
nzol...@chromium.org, dtap...@chromium.org


Spec
https://w3c.github.io/pointerevents/extension.html

Summary
An API to return all the coalesced events of the received events in javascript. This API enables apps like drawing app to draw smoother curves using the precise history of points.
Intent to implement discussion.


Motivation
Coalescing already happens inside the input pipeline when the main thread is busy. In order to provide granularity to applications it is necessary to provide an enhanced API.


Likewise it is desired to align some input events with the document lifecycle; i.e. firing events just before rAF. In this model the frequency at which events are delivered to javascript is decreased causing an increase in coalesced events. The loss of precision is an undesirable side effect and this API overcomes that.


The Android platform already follows something similar aligning events to a vsync signal and provides an API in its SDK to retrieve prior events consumed by the touch driver.

Interoperability risk
Firefox: Public support
Edge: They were okay with this as well in the working group meetings.
Safari: No public signals
Web developers: Positive (discussions in PEWG at TPAC 2016)

Compatibility risk
This is a new API and by itself it is not a breaking change.

Ongoing technical constraints
There were some discussions in the design doc and we have prototyped a few solutions to get some idea about difficulties but there was no particularly blocking issue at this point.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux,
Chrome OS, Android, and Android WebView)? Yes


OWP launch tracking bug
https://crbug.com/656781


Link to entry on the Chrome Platform Status
https://www.chromestatus.com/features/5853451217010688


Requesting approval to ship

Yes (to enable by default for M58).


Rick Byers

unread,
Jan 16, 2017, 4:55:50 PM1/16/17
to Navid Zolghadr, blink-dev
I support shipping this API (but since I was involved in it's design my vote doesn't count).

Note that Firefox and Edge have both expressed interest in implementing this API but aren't able to provide any concrete timeframe (which is why this is 'extensions', not Pointer Events Level 2).

In addition to Android, iOS and Windows also have similar native APIs.  See the spec issue for discussion and details.

TAMURA, Kent

unread,
Jan 24, 2017, 1:48:06 AM1/24/17
to Rick Byers, Navid Zolghadr, blink-dev
LGTM1.

--
TAMURA Kent
Software Engineer, Google


Philip Jägenstedt

unread,
Jan 24, 2017, 6:17:19 AM1/24/17
to TAMURA, Kent, Rick Byers, Navid Zolghadr, blink-dev
LGTM2

I'm curious if it's possible to test this with existing automated or manual tests in web-platform-tests, or if it requires a proper input automation API?

Jochen Eisinger

unread,
Jan 24, 2017, 6:26:44 AM1/24/17
to Philip Jägenstedt, TAMURA, Kent, Rick Byers, Navid Zolghadr, blink-dev
lgtm3
Reply all
Reply to author
Forward
0 new messages