From e8d28702c3fdb25e0e049f60a258b56bdce673ea Mon Sep 17 00:00:00 2001 From: Frank Liberato Date: Wed, 17 Jul 2024 10:06:28 -0700 Subject: [PATCH] [pip] preferInitialWindowPlacement Add `preferInitialWindowPlacement` to DocumentPictureInPictureOptions to provide a hint to the UA that the bounds of any previously opened pip window probably shouldn't be re-used. See https://github.com/WICG/document-picture-in-picture/pull/119 and https://chromestatus.com/feature/5183881532932096 for more details. Change-Id: I3c3cf468046f4e08cbedbde93532e4b34e12a29a Bug: 312495380 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5608743 Reviewed-by: Philip Rogers Commit-Queue: Frank Liberato Reviewed-by: Tommy Steimel Auto-Submit: Frank Liberato Cr-Commit-Position: refs/heads/main@{#1328934} --- ...initial-window-placement-manual.https.html | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 document-picture-in-picture/prefer-initial-window-placement-manual.https.html diff --git a/document-picture-in-picture/prefer-initial-window-placement-manual.https.html b/document-picture-in-picture/prefer-initial-window-placement-manual.https.html new file mode 100644 index 00000000000000..16ba7f4f59b2f6 --- /dev/null +++ b/document-picture-in-picture/prefer-initial-window-placement-manual.https.html @@ -0,0 +1,25 @@ + +Test that using documentPictureInPicture's preferInitialWindowPlacement + parameter does not cache the window bounds + +

+ This tests that a document picture-in-picture window opened with the `preferInitialWindowPlacement` + parameter set to `true` does not cache the previous window bounds when it is closed and reopened. +

    +
  1. Click on the "Open document picture-in-picture window" button below.
  2. +
  3. Note its approximate position and size.
  4. +
  5. Move and resize the window.
  6. +
  7. Close the window.
  8. +
  9. Click the "Open document picture-in-picture window" button again.
  10. +
  11. Check that it opens in its original position and size, not where you resized / moved it to.
  12. +
+

+ + +