v130 ยท miscellaneous

Document picture-in-picture: add option to ignore window bounds cache

This adds a new parameter ("preferInitialWindowPlacement") to the document picture-in-picture API that, when set to true, hints to the user agent that it should not try to reuse the position or size of the previous document picture-in-picture from this site when opening this one.

concepts

  1. DocPiP bounds cache probe

    Open a DocPiP window with arbitrary dimensions and the new preferInitialWindowPlacement flag set or unset. Probe reports actual window size and tells you whether the cache was reused.

  2. Meeting โ†’ chat context switch

    The chromestatus motivation by name: VC window followed by an unrelated chat thread. Walks the three-step user journey, then lets you actually open the same sequence to feel the difference the flag makes.

  3. preferInitialWindowPlacement decision tree

    Four-question rubric from the explainer with per-question scoring. The page emits the exact requestWindow() snippet to ship, along with a tally explaining why each answer contributed to the final score. Skinable across the explainer's three classic scenarios.

  4. PiP Placement Demo

    Toggle preferInitialWindowPlacement and watch the PiP window appear at a fresh position vs the cached location. Simulates the stale-monitor scenario with a visual screen diagram and event log.

why it shipped

Often, a document picture-in-picture window will close and re-open multiple times for the same site, such as moving a video conference to and from PiP. The user agent is free to re-open the PiP window at its most recent size / location, so that it stays where the user last moved it and provides continuity between the PiP windows. However, if the new window is semantically unrelated to the previous window, such as if it is a new VC, then the developer can use this parameter provide a hint to the user agent that this window might be better opened in its default position / size instead.

references