Intent to Ship: Document picture-in-picture: add option to hide back-to-tab button

353 views
Skip to first unread message

Tommy Steimel

unread,
Mar 13, 2024, 1:12:34 PMMar 13
to blink-dev

Contact emails

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

Explainer

None

Specification

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

Summary

This adds a new parameter ("allowReturnToOpener") to the document picture-in-picture API that, when set to false, hints to the user agent that they should not show a button in the picture-in-picture window that allows the user to return to the opener. While having a button to return content to the opener always makes sense in the video picture-in-picture case (the video stream can be returned to the video element in the opener tab), this is not always the case for document picture-in-picture experiences. This gives developers more control over the user experience when they determine that such a button does not make sense for their use case.



Blink component

Blink>Media>PictureInPicture

TAG review

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

TAG review status

Pending

Risks



Interoperability and Compatibility

None



Gecko: No signal (https://github.com/mozilla/standards-positions/issues/670#issuecomment-1967919675) Added comment to existing standards position issue for document picture-in-picture. No response yet

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/41#issuecomment-1967918830) Added comment to existing standards position issue for document picture-in-picture. No response yet

Web developers: Positive (https://github.com/WICG/document-picture-in-picture/issues/113) We have received feature requests for the ability to hide the "back to tab" button from the document picture-in-picture window.

Other signals:

Ergonomics

N/A



Activation

N/A



Security

N/A



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, as this is not available on Android



Debuggability

N/A



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

No

The document picture-in-picture API is not supported on Android



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

No

The document picture-in-picture feature itself is fully tested on WPT, but this additional parameter isn't since it's a hint to the user agent and therefore any actual changes happen in the embedder



Flag name on chrome://flags

None

Finch feature name

None

Non-finch justification

Small change to existing API



Requires code in //chrome?

False

Sample links


https://steimelchrome.github.io/document-pip/hide-back-to-tab-button.html

Estimated milestones

Shipping on desktop124


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/6223347936657408

This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Mar 13, 2024, 9:53:22 PMMar 13
to Tommy Steimel, blink-dev
I found an issue with the API design here that might result in a backward-incompatible change: https://github.com/WICG/document-picture-in-picture/issues/115

With my spec mentor hat on, sorry for not catching it sooner!

--
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/CAE-AwAqR%2BNBOJT4h9YRkdOB9ksbPYgFCfP5JvmTKuCbFA-4-cQ%40mail.gmail.com.

Tommy Steimel

unread,
Mar 14, 2024, 1:16:49 PMMar 14
to Domenic Denicola, blink-dev

Domenic Denicola

unread,
Mar 14, 2024, 9:42:35 PMMar 14
to Tommy Steimel, Domenic Denicola, blink-dev
Awesome, thanks for the quick turnaround time! With that change, LGTM1.

Mike Taylor

unread,
Mar 15, 2024, 9:15:27 AMMar 15
to Domenic Denicola, Tommy Steimel, blink-dev

Is there any reason to not convert https://steimelchrome.github.io/document-pip/hide-back-to-tab-button.html into a manual WPT? Manual tests aren't ideal, but something seems better than nothing.

Tommy Steimel

unread,
Mar 15, 2024, 10:41:00 AMMar 15
to Mike Taylor, Domenic Denicola, blink-dev
I didn't realize you could do that. So if I make a manual WPT test, I can make it depend on code in //chrome?

Mike Taylor

unread,
Mar 15, 2024, 10:52:01 AMMar 15
to Tommy Steimel, Domenic Denicola, blink-dev

If a human can observe the expected behavior by clicking on a button and noticing the lack of the return to tab button, then effectively yes.

Tommy Steimel

unread,
Mar 15, 2024, 1:13:57 PMMar 15
to Mike Taylor, Domenic Denicola, blink-dev
Got it, thanks! Adding one in crrev.com/c/5375045

Mike Taylor

unread,
Mar 15, 2024, 4:21:31 PMMar 15
to Tommy Steimel, Domenic Denicola, blink-dev

Thank you! LGTM2

Chris Harrelson

unread,
Mar 15, 2024, 4:47:13 PMMar 15
to Mike Taylor, Tommy Steimel, Domenic Denicola, blink-dev
Reply all
Reply to author
Forward
0 new messages