From ee5ab2990a6bfbefe094f70c02e4e1bbd9cef370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Daoust?= Date: Tue, 14 Jan 2020 14:44:13 +0100 Subject: [PATCH 1/2] Fix cross-spec links and references Minor editorial updates to fix a few broken links and correct references: - Drop custom definitions that are no longer needed - Replace "triggered by user activation" with new user activation model (see https://github.com/whatwg/html/issues/5129) - Use back ticks for values instead of var shorthand - Drop link to feature name in Feature Policy (term no longer exists) --- index.bs | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/index.bs b/index.bs index 96a4b82..2bfaa11 100644 --- a/index.bs +++ b/index.bs @@ -3,7 +3,7 @@ Title: Picture-in-Picture Shortname: picture-in-picture Level: 1 Status: ED -ED: https://w3c.github.io/picture-in-picture +ED: https://w3c.github.io/picture-in-picture/ Favicon: https://raw.githubusercontent.com/google/material-design-icons/master/action/2x_web/ic_picture_in_picture_alt_black_48dp.png Group: mediawg Markup Shorthands: markdown yes @@ -18,18 +18,8 @@ Abstract: content sites, or applications on their device.
-spec: Feature Policy; urlPrefix: https://wicg.github.io/feature-policy/#
-    type: dfn
-        text: default allowlist
-        text: feature name
-        text: policy-controlled feature
 spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/
     type: dfn
-        urlPrefix: infrastructure.html
-            text: in parallel
-            text: reflect
-        urlPrefix: interaction.html
-            text: triggered by user activation
         urlPrefix: media.html
             text: media element event task source
 spec: Remote-Playback; urlPrefix: https://w3c.github.io/remote-playback/#dfn-
@@ -183,7 +173,7 @@ run the following steps:
 
 1. If Picture-in-Picture support is `false`, throw a
     {{NotSupportedError}} and abort these steps.
-2. If the document is not allowed to use the policy-controlled feature
+2. If the document is not allowed to use the policy-controlled feature
     named `"picture-in-picture"`, throw a {{SecurityError}} and abort these
     steps.
 3. If |video|'s {{readyState}} attribute is {{HAVE_NOTHING}}, throw a
@@ -192,9 +182,9 @@ run the following steps:
     these steps.
 5. OPTIONALLY, if the {{disablePictureInPicture}} attribute is present on
     |video|, throw an {{InvalidStateError}} and abort these steps.
-6. If |userActivationRequired| is `true` and the algorithm is not
-    triggered by user activation, throw a {{NotAllowedError}} and
-    abort these steps.
+6. If |userActivationRequired| is `true` and the relevant global object
+    of this does not have transient activation, throw a
+    {{NotAllowedError}} and abort these steps.
 7. If |video| is {{pictureInPictureElement}}, abort these steps.
 8. If |playingRequired| is `true` and |video| is {{paused}}, abort these steps.
 9. Set {{pictureInPictureElement}} to |video|.
@@ -203,7 +193,7 @@ run the following steps:
 11. Queue a task to fire an event with the name
     {{enterpictureinpicture}} using {{EnterPictureInPictureEvent}} at the
     |video| with its {{bubbles}} attribute initialized to `true` and its
-    {{pictureInPictureWindow}} attribute initialized to
+    {{EnterPictureInPictureEvent/pictureInPictureWindow}} attribute initialized to
     Picture-in-Picture window.
 
 It is RECOMMENDED that video frames are not rendered in the page and in the
@@ -437,18 +427,18 @@ interface PictureInPictureWindow : EventTarget {
 
 A {{PictureInPictureWindow}} instance represents a Picture-in-Picture
 window associated with an {{HTMLVideoElement}}. When instantiated, an
-instance of {{PictureInPictureWindow}} has its |state| set to |opened|.
+instance of {{PictureInPictureWindow}} has its |state| set to `opened`.
 
 When the close window algorithm with an instance of
-{{PictureInPictureWindow}} is invoked, its |state| is set to |closed|.
+{{PictureInPictureWindow}} is invoked, its |state| is set to `closed`.
 
 The {{width}} attribute MUST return the width in CSS pixels of the
 Picture-in-Picture window associated with {{pictureInPictureElement}} if
-the |state| is |opened|. Otherwise, it MUST return 0.
+the |state| is `opened`. Otherwise, it MUST return 0.
 
 The {{height}} attribute MUST return the height in CSS pixels of the
 Picture-in-Picture window associated with {{pictureInPictureElement}} if
-the |state| is |opened|. Otherwise, it MUST return 0.
+the |state| is `opened`. Otherwise, it MUST return 0.
 
 When the size of the Picture-in-Picture window associated with
 {{pictureInPictureElement}} changes, the user agent MUST queue a task to
@@ -501,7 +491,7 @@ This specification defines a policy-controlled feature that controls
 whether the request Picture-in-Picture algorithm may return a
 {{SecurityError}} and whether {{pictureInPictureEnabled}} is `true` or `false`.
 
-The feature name for this feature is `"picture-in-picture"`.
+The feature name for this feature is `"picture-in-picture"`.
 
 The default allowlist for this feature is `*`.
 

From f4b49022fff416c0c9f71b332db6af1affdd3766 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Daoust?= 
Date: Tue, 14 Jan 2020 17:34:31 +0100
Subject: [PATCH 2/2] Adjust text on policy-controlled feature

---
 index.bs | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/index.bs b/index.bs
index 2bfaa11..26fc22e 100644
--- a/index.bs
+++ b/index.bs
@@ -487,11 +487,10 @@ specification may allow PIP-ing arbitrary HTML content.
 
 ## Feature Policy ## {#feature-policy}
 
-This specification defines a policy-controlled feature that controls
-whether the request Picture-in-Picture algorithm may return a
-{{SecurityError}} and whether {{pictureInPictureEnabled}} is `true` or `false`.
-
-The feature name for this feature is `"picture-in-picture"`.
+This specification defines a policy-controlled feature named
+`"picture-in-picture"` that controls whether the request Picture-in-Picture
+algorithm may return a {{SecurityError}} and whether
+{{pictureInPictureEnabled}} is `true` or `false`.
 
 The default allowlist for this feature is `*`.