Intent to Ship: Document picture-in-picture: propagate user activation

153 views
Skip to first unread message

Tommy Steimel

unread,
May 7, 2024, 5:33:01 PMMay 7
to blink-dev

Contact emails

ste...@chromium.orglibe...@chromium.org

Explainer

None

Specification

https://github.com/WICG/document-picture-in-picture/pull/117

Design docs


https://docs.google.com/document/d/1vtjK3iMEAjcfDCu-qZOYg2zAtTbhohmCX77T1Eu3usQ/edit?usp=sharing

Summary

This makes user activations in a document picture-in-picture window usable inside its opener window and vice versa. This makes it more ergonomic to use user-activation-gated APIs, since often event handlers in the document picture-in-picture window are actually run in the opener's context, so the opener's context needs access to the user gesture.



Blink component

Blink>Media>PictureInPicture

TAG review

https://github.com/w3ctag/design-reviews/issues/798#issuecomment-2096837171

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/670#issuecomment-2096824367)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/41#issuecomment-2096824691)

Web developers: No signals

Other signals:

Ergonomics

This should improve the ergnomics of user-activation-gated APIs in document picture-in-picture windows, as the website no longer needs to ensure that the user gesture occurred in the same context as the code that is calling the API.



Activation

N/A



Security

One potential risk is that the website could use the same gesture as two gestures (by using it in the opener and in the picture-in-picture window). We mitigate this by ensuring that consuming user activation in one uses it in the other.



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?

N/A



Debuggability

N/A



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

No

Document picture-in-picture is only available on desktop platforms



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

Yes

document-picture-in-picture/propagate-user-activation-from-opener.https.html document-picture-in-picture/propagate-user-activation-to-opener.https.html



Flag name on chrome://flags

document-picture-in-picture-user-activation

Finch feature name

DocumentPictureInPictureUserActivation

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/331246719

Sample links


https://steimelchrome.github.io/document-pip/user-gesture.html

Estimated milestones

Shipping on desktop126


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

N/A

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5185710702460928?gate=5078256593403904

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAE-AwApczWrtoZNMqtAJx-%2BNAxVF9Kqim2h1HBrAD3ukXTKgWA%40mail.gmail.com

This intent message was generated by Chrome Platform Status.

Yoav Weiss (@Shopify)

unread,
May 8, 2024, 11:11:24 AMMay 8
to blink-dev, Tommy Steimel
LGTM1

On Tuesday, May 7, 2024 at 11:33:01 PM UTC+2 Tommy Steimel wrote:

Daniel Bratell

unread,
May 8, 2024, 11:56:49 AMMay 8
to Yoav Weiss (@Shopify), blink-dev, Tommy Steimel

LGTM2

/Daniel

--
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/8e5d025d-9351-47d4-a79a-f7f23c88851dn%40chromium.org.

Mike Taylor

unread,
May 8, 2024, 12:39:39 PMMay 8
to Daniel Bratell, Yoav Weiss (@Shopify), blink-dev, Tommy Steimel
Reply all
Reply to author
Forward
0 new messages