Intent to Ship: Remove PointerEvent.getCoalescedEvents() from insecure contexts

392 views
Skip to first unread message

Mustaq Ahmed

unread,
Jul 16, 2024, 2:52:13 PMJul 16
to blink-dev

Contact emails

[email protected]

Explainer

None

Specification

https://w3c.github.io/pointerevents/#pointerevent-interface

Summary

The Pointer Events Working Group made PointerEvent.getCoalescedEvents() restricted to secure contexts 4+ years ago, which removed the API from insecure contexts. Chrome originally shipped the old behavior and didn't follow the spec change immediately because of compat concerns. We are now removing it from insecure contexts because Chrome usage in insecure contexts turned out to be very low.



Blink component

Blink>Input

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Interop: This will improves Interop, making Chrome fully match Firefox (and the spec). Compat: There is a bit of risk because the usage is non-zero (~0.0004% as of 2024-07-16). This usage stat is expected to include non-breaking JS enumerations. https://chromestatus.com/metrics/feature/timeline/popularity/4598



Gecko: Shipped/Shipping

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



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

Yes

Is this feature fully tested by web-platform-tests?

Yes

https://wpt.fyi/results/pointerevents?label=master&label=experimental&aligned&q=pointerevents%2Fpointerevent_constructor



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/40928769

Estimated milestones

Shipping on desktop129
Shipping on Android129
Shipping on WebView129


Anticipated spec changes

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).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4941651093749760?gate=5095189648244736

This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Jul 16, 2024, 6:30:37 PMJul 16
to Mustaq Ahmed, blink-dev
On Wed, Jul 17, 2024 at 6:52 AM Mustaq Ahmed <[email protected]> wrote:

Contact emails

[email protected]

Explainer

None

Specification

https://w3c.github.io/pointerevents/#pointerevent-interface

Summary

The Pointer Events Working Group made PointerEvent.getCoalescedEvents() restricted to secure contexts 4+ years ago, which removed the API from insecure contexts. Chrome originally shipped the old behavior and didn't follow the spec change immediately because of compat concerns. We are now removing it from insecure contexts because Chrome usage in insecure contexts turned out to be very low.



Blink component

Blink>Input

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

Interop: This will improves Interop, making Chrome fully match Firefox (and the spec). Compat: There is a bit of risk because the usage is non-zero (~0.0004% as of 2024-07-16). This usage stat is expected to include non-breaking JS enumerations. https://chromestatus.com/metrics/feature/timeline/popularity/4598



Gecko: Shipped/Shipping

WebKit: No signal

Can you ask for WebKit's position? Or maye there's at least a pointer to working group discussions they participated in?
 

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

None



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

Yes

Is this feature fully tested by web-platform-tests?

Yes

https://wpt.fyi/results/pointerevents?label=master&label=experimental&aligned&q=pointerevents%2Fpointerevent_constructor



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

None

Our process requires a Finch feature in general. And this sort of potentially-risky removal seems like the kind of thing that benefits from a Finch feature, so that it can be remotely reverted if it causes terrible regressions.
 


Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/40928769

Estimated milestones

Shipping on desktop129
Shipping on Android129
Shipping on WebView129


Anticipated spec changes

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).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4941651093749760?gate=5095189648244736

This intent message was generated by Chrome Platform Status.

--
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 [email protected].
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAB0cuO6UzHtEJdgeZGMChev-UbP0N5ts4AuJ9mKtr-aLWYbKWw%40mail.gmail.com.

Mustaq Ahmed

unread,
Jul 17, 2024, 7:19:21 AMJul 17
to Domenic Denicola, blink-dev
Can you ask for WebKit's position? Or maye there's at least a pointer to working group discussions they participated in?

- Safari doesn't yet support PointerEvent.getCoalescedEvents(), so we can't ask for their position on secure/non-secure context differences:
https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents#browser_compatibility

- Here is a PEWG discussion started by @gsnedders from WebKit (I couldn't find any other related discussion Safari participated in):

> Our process requires a Finch feature in general. And this sort of potentially-risky removal seems like the kind of thing that benefits from a Finch feature, so that it can be remotely reverted if it causes terrible regressions.

Unfortunately we can't put this change behind a flag because Blink does not allow making [SecureContext] conditional.  I think it was supported in the past because "Blink IDL Extended Attributes" documentation still mentions [SecureContext=flag] as non-standard, but it doesn't even compile!

Mike Taylor

unread,
Jul 17, 2024, 11:20:49 AMJul 17
to Mustaq Ahmed, Domenic Denicola, blink-dev

On 7/17/24 10:18 AM, Mustaq Ahmed wrote:

Can you ask for WebKit's position? Or maye there's at least a pointer to working group discussions they participated in?

- Safari doesn't yet support PointerEvent.getCoalescedEvents(), so we can't ask for their position on secure/non-secure context differences:
https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents#browser_compatibility
That's OK - we ask for positions from them all the time for things they don't support.

- Here is a PEWG discussion started by @gsnedders from WebKit (I couldn't find any other related discussion Safari participated in):
To my knowledge, that was posted a few years before Sam started working at Apple.

Mustaq Ahmed

unread,
Jul 18, 2024, 9:00:26 AMJul 18
to Mike Taylor, Domenic Denicola, blink-dev
On Wed, Jul 17, 2024 at 2:20 PM Mike Taylor <[email protected]> wrote:

On 7/17/24 10:18 AM, Mustaq Ahmed wrote:

Can you ask for WebKit's position? Or maye there's at least a pointer to working group discussions they participated in?

- Safari doesn't yet support PointerEvent.getCoalescedEvents(), so we can't ask for their position on secure/non-secure context differences:
https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents#browser_compatibility
That's OK - we ask for positions from them all the time for things they don't support.

- Here is a PEWG discussion started by @gsnedders from WebKit (I couldn't find any other related discussion Safari participated in):
To my knowledge, that was posted a few years before Sam started working at Apple.

I missed this, sorry.  My corrected answer is: "I couldn't find any PEWG discussion on Coalesced Events where Safari participated".

Domenic Denicola

unread,
Jul 18, 2024, 7:32:04 PMJul 18
to Mustaq Ahmed, Mike Taylor, Domenic Denicola, blink-dev
LGTM1. It's a bit scary doing this without a Finch flag, but the usage is very low and such pages are already broken in Firefox.

Mike Taylor

unread,
Jul 22, 2024, 11:53:29 AMJul 22
to Mustaq Ahmed, blink-dev, Domenic Denicola

Could you also request the Enterprise bit?

In the meantime - I'd love to know more about `[SecureContext=flag]` not working - that capability was introduced to make these types of roll outs safer, IIRC. In the past I've had to write postmortems because I thought usage was low enough, but the breakage was in enterprise environments that disable telemetry... and didn't have a finch flag to quickly revert. :(

(I'm also not trying to send you on an impossible side-quest, but won't be sad if someone is nerd sniped into fixing what feels like a regression).

Mustaq Ahmed

unread,
Jul 31, 2024, 7:38:54 AMJul 31
to Mike Taylor, blink-dev, Domenic Denicola
On Mon, Jul 22, 2024 at 2:53 PM Mike Taylor <[email protected]> wrote:

Could you also request the Enterprise bit?

I missed flipping the bit after filling out the enterprise survey questions!  Done.

In the meantime - I'd love to know more about `[SecureContext=flag]` not working - that capability was introduced to make these types of roll outs safer, IIRC. In the past I've had to write postmortems because I thought usage was low enough, but the breakage was in enterprise environments that disable telemetry... and didn't have a finch flag to quickly revert. :(

(I'm also not trying to send you on an impossible side-quest, but won't be sad if someone is nerd sniped into fixing what feels like a regression).

Reached out to the team who might know about the change.

Chris Harrelson

unread,
Jul 31, 2024, 8:49:24 AMJul 31
to Mustaq Ahmed, Mike Taylor, blink-dev, Domenic Denicola

Philip Jägenstedt

unread,
Jul 31, 2024, 8:56:13 AMJul 31
to Chris Harrelson, Mustaq Ahmed, Mike Taylor, blink-dev, Domenic Denicola
LGTM3. If it is possible to use a finch flag for this removal, please do, but if not please keep an eye out for any regression and revert at the first sign of trouble. 

Reply all
Reply to author
Forward
0 new messages