Bug 210454
| Summary: | Implement rAF-aligned Pointer/Mouse/Touch events | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Dean Jackson <dino> |
| Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | 709922234, a_protyasha, caleb, daxpedda, gsnedders, juberti, karlcow, luke, maggotfish, rniwa, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=264002 | ||
Dean Jackson
Implement rAF-aligned UI events.
See
- https://w3c.github.io/pointerevents/ and wording on coalescing and aligning
- https://www.chromestatus.com/feature/6192761317359616
- Firefox also implemented it even though the page above doesn't currently mention that
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/61734836>
Ryosuke Niwa
I don't follow this. What is being coalesced and how?
Simon Fraser (smfr)
You can coalesce multiple pointermove and pointerrawupdate events in the same event loop:
https://w3c.github.io/pointerevents/#dfn-coalesced-event-list
Ryosuke Niwa
(In reply to Simon Fraser (smfr) from comment #3)
> You can coalesce multiple pointermove and pointerrawupdate events in the
> same event loop:
> https://w3c.github.io/pointerevents/#dfn-coalesced-event-list
But how does this integrate with the event loop? The spec doesn't seem to say anything about how events are coalesced.
Simon Fraser (smfr)
https://github.com/w3c/pointerevents/issues/328
Sam Sneddon [:gsnedders]
AIUI, there's no actual definition about how the coalescing happens. The spec has this because at least Android and iOS do this, and it's basically left down to the browser how often to actually fire events. Clearly, the browser can't fire events more often than it gets them from the OS.
In the iOS case, see https://developer.apple.com/documentation/uikit/touches_presses_and_gestures/handling_touches_in_your_view/getting_high-fidelity_input_with_coalesced_touches
In short:
> UIKit usually delivers touches to your app at around 60 Hz, but some devices are capable of recording touch information at up to 240 Hz.
Karl Dubost
A section has been added about coalesced events
https://w3c.github.io/pointerevents/#coalesced-events
aka getCoalescedEvents()
Abrar Rahman Protyasha
We've landed `PointerEvent.getCoalescedEvents()` in 281520@main, but pointer events are not rAF-aligned still.
I'll retitle this bug so we don't conflate the two things.