For untrusted (i.e. JS constructed) PointerEvents, the events returned by PointerEvent.getCoalescedEvents() and PointerEvent.getPredictedEvents() will maintain their original targets and offsetX/Y coordinates, instead of behaving like trusted events where these fields are affected by the parent (container) event.
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
Shipping on desktop | 128 |
Shipping on Android | 128 |
Shipping on WebView | 128 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneContact emails
mus...@chromium.org
Specification
https://w3c.github.io/pointerevents/#populating-and-maintaining-the-coalesced-and-predicted-events-lists
Summary
For untrusted (i.e. JS constructed) PointerEvents, the events returned by PointerEvent.getCoalescedEvents() and PointerEvent.getPredictedEvents() will maintain their original targets and offsetX/Y coordinates, instead of behaving like trusted events where these fields are affected by the parent (container) event.
Blink component
Blink>Input
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
None
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAB0cuO6ogVhba4bQpZH9GE3Mh%2B04qqpvvorgXRZ_AJ-FQjwobQ%40mail.gmail.com.
On Wed, Jul 17, 2024 at 4:25 PM Mustaq Ahmed <mus...@chromium.org> wrote:Contact emails
mus...@chromium.org
Specification
https://w3c.github.io/pointerevents/#populating-and-maintaining-the-coalesced-and-predicted-events-lists
Summary
For untrusted (i.e. JS constructed) PointerEvents, the events returned by PointerEvent.getCoalescedEvents() and PointerEvent.getPredictedEvents() will maintain their original targets and offsetX/Y coordinates, instead of behaving like trusted events where these fields are affected by the parent (container) event.
Blink component
Blink>Input
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
None
Can you expand on that? Isn't something that developers can somehow rely on?
Would this take us further away from WebKit interop? What's the current state of their implementation?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOmohSJyttfwuyqP-BtvOoUe5wEK5tkcgVRSz3%2B6RiaxBzK-sw%40mail.gmail.com.
On Fri, Jul 26, 2024 at 7:37 AM Yoav Weiss (@Shopify) <yoav...@chromium.org> wrote:On Wed, Jul 17, 2024 at 4:25 PM Mustaq Ahmed <mus...@chromium.org> wrote:Contact emails
mus...@chromium.org
Specification
https://w3c.github.io/pointerevents/#populating-and-maintaining-the-coalesced-and-predicted-events-lists
Summary
For untrusted (i.e. JS constructed) PointerEvents, the events returned by PointerEvent.getCoalescedEvents() and PointerEvent.getPredictedEvents() will maintain their original targets and offsetX/Y coordinates, instead of behaving like trusted events where these fields are affected by the parent (container) event.
Blink component
Blink>Input
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
None
Can you expand on that? Isn't something that developers can somehow rely on?Maybe in theory, but coalesced/predicted points are so niche, combined with constructed events, it seems really unlikely to me that anyone would notice.
On Fri, Jul 26, 2024 at 5:04 PM Rick Byers <rby...@chromium.org> wrote:On Fri, Jul 26, 2024 at 7:37 AM Yoav Weiss (@Shopify) <yoav...@chromium.org> wrote:On Wed, Jul 17, 2024 at 4:25 PM Mustaq Ahmed <mus...@chromium.org> wrote:Contact emails
mus...@chromium.org
Specification
https://w3c.github.io/pointerevents/#populating-and-maintaining-the-coalesced-and-predicted-events-lists
Summary
For untrusted (i.e. JS constructed) PointerEvents, the events returned by PointerEvent.getCoalescedEvents() and PointerEvent.getPredictedEvents() will maintain their original targets and offsetX/Y coordinates, instead of behaving like trusted events where these fields are affected by the parent (container) event.
Blink component
Blink>Input
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
None
Can you expand on that? Isn't something that developers can somehow rely on?Maybe in theory, but coalesced/predicted points are so niche, combined with constructed events, it seems really unlikely to me that anyone would notice.
Re WebKit support: they have started implementing getCoalescedEvents(), as per their update 2 days ago, yayy! Note that this PSA is about a corner case of that API, more below.---Re high use-counter: I agree with Rick that the use-counter is most likely dominated by JS enumeration for cloning purposes, and I guess an http archive analysis could confirm that.But more importantly, this PSA is not about the expected/common-sense usage of getCoalescedEvents() to "read" the low-level trusted events that are skipped by browser's RAF-aligned event dispatch. If the JS, for whatever reasons, dumps into an untrusted PointerEvent an arbitrary list of targets and offsetX/Y values ("arbitrary" in the sense that those values were not returned by a trusted event's getCoalescedEvents list), according to the spec the JS should be able to read back the values it wrote. We are not aware of any real use-case that could be affected by this change.