From 939e630d48127ca704d7a060f805ceb2bee0885a Mon Sep 17 00:00:00 2001 From: Tommy Steimel Date: Thu, 8 Jun 2023 17:10:08 -0700 Subject: [PATCH] Remove copyStyleSheets --- README.md | 1 - spec.bs | 28 +++------------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index e1acfa0..0c2d32b 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,6 @@ async function enterPiP() { const pipOptions = { width: player.clientWidth, height: player.clientHeight, - copyStyleSheets: true, }; pipWindow = await documentPictureInPicture.requestWindow(pipOptions); diff --git a/spec.bs b/spec.bs index 94aff87..ab5e785 100644 --- a/spec.bs +++ b/spec.bs @@ -107,7 +107,6 @@ interface DocumentPictureInPicture : EventTarget { dictionary DocumentPictureInPictureOptions { [EnforceRange] unsigned long long width = 0; [EnforceRange] unsigned long long height = 0; - boolean copyStyleSheets = false; }; [Exposed=Window] @@ -214,18 +213,14 @@ problems. pixels. 14. Configure |pip traversable|'s active browsing context's window to float on top of other windows. -15. If |options|["{{DocumentPictureInPictureOptions/copyStyleSheets}}"] exists and - is true, then run the copy CSS Style Sheets to Document Picture-in-Picture algorithm - given this's relevant global object's navigable's - active document and |pip traversable|'s active document. -16. Set this's last-opened window to |pip traversable|'s active window. -17. Queue a global task on the +15. Set this's last-opened window to |pip traversable|'s active window. +16. Queue a global task on the DOM manipulation task source given this's relevant global object to fire an event named {{enter}} using {{DocumentPictureInPictureEvent}} on this with its {{DocumentPictureInPictureEvent/window}} attribute initialized to |pip traversable|'s active window. -18. Return |pip traversable|'s active window. +17. Return |pip traversable|'s active window. @@ -295,22 +290,6 @@ To close any existing picture-in-picture windows: exit Picture-in-Picture algorithm with |navigable|'s active document. -## Copy Style Sheets to Document Picture-in-Picture ## {#copy-style-sheets-to-document-picture-in-picture} - -The copy CSS Style Sheets to Document Picture-in-Picture algorithm -steps, given |source document| and |pip document| are: - 1. For each |sheet| of |source document|'s document or shadow root CSS style sheets: - 1. If |sheet|'s disabled - attribute is set, then continue. - 2. Create a new CSSStyleSheet |copied sheet|, which is a copy of |sheet|. - 3. Run the add a CSS style sheet steps with |copied sheet| and |pip document|. - -

-Copying CSS Style Sheets to Document Picture-in-Picture is a one-time copy, and -any further changes to |source document|'s document or shadow root CSS style sheets -will not be copied. -

- ## One PiP Window ## {#one-pip-window} Any top-level traversable must have at most one document @@ -429,7 +408,6 @@ function enterPiP() { const pipOptions = { width: player.clientWidth, height: player.clientHeight, - copyStyleSheets: true }; documentPictureInPicture.requestWindow(pipOptions).then((pipWin) => {