Intent to Implement: PointerEvent.getCoalescedEvents

42 views
Skip to first unread message

Navid Zolghadr

unread,
Nov 22, 2016, 12:34:58 PM11/22/16
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.

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: No public signals (They were okay with this as well in the meetings but I couldn’t find a public link to mention)
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

No. The feature will be implemented behind experimental-web-platform-features


Rick Byers

unread,
Nov 26, 2016, 10:24:58 AM11/26/16
to Navid Zolghadr, blink-dev
On Tue, Nov 22, 2016 at 12:34 PM, Navid Zolghadr <nzol...@chromium.org> wrote:

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.

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: No public signals (They were okay with this as well in the meetings but I couldn’t find a public link to mention)


FWIW based on the minuted discussions we've had in the WG with Ted I think it's fine to call this "public support".  We can dig up a link to minutes (or ask Ted/Jacob) if anyone questions it. 

It's worth noting no that nobody else has a concrete timeframe for when they want to ship this.  This is why we're incubating the API instead of putting it into the PEL2 spec - we don't want it to block our efforts to get Pointer Events Level 2 to REC status (but will explore pull it in if a second implementation does happen to ship in time).
Reply all
Reply to author
Forward
0 new messages