Skip to content

Commit

Permalink
Fix cross-spec links and references
Browse files Browse the repository at this point in the history
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 whatwg/html#5129)
- Use back ticks for values instead of var shorthand
- Drop link to feature name in Feature Policy (term no longer exists)
  • Loading branch information
tidoust committed Jan 14, 2020
1 parent 4db5e80 commit ee5ab29
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,18 +18,8 @@ Abstract: content sites, or applications on their device.
</pre>

<pre class="anchors">
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-
Expand Down Expand Up @@ -183,7 +173,7 @@ run the following steps:

1. If <a>Picture-in-Picture support</a> is `false`, throw a
{{NotSupportedError}} and abort these steps.
2. If the document is not allowed to use the <a>policy-controlled feature</a>
2. If the document is not <a>allowed to use</a> the <a>policy-controlled feature</a>
named `"picture-in-picture"`, throw a {{SecurityError}} and abort these
steps.
3. If |video|'s {{readyState}} attribute is {{HAVE_NOTHING}}, throw a
Expand All @@ -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
<a>triggered by user activation</a>, throw a {{NotAllowedError}} and
abort these steps.
6. If |userActivationRequired| is `true` and the <a>relevant global object</a>
of <a>this</a> does not have <a>transient activation</a>, 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|.
Expand All @@ -203,7 +193,7 @@ run the following steps:
11. <a>Queue a task</a> to <a>fire an event</a> 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
<a>Picture-in-Picture window</a>.

It is RECOMMENDED that video frames are not rendered in the page and in the
Expand Down Expand Up @@ -437,18 +427,18 @@ interface PictureInPictureWindow : EventTarget {

A {{PictureInPictureWindow}} instance represents a <a>Picture-in-Picture
window</a> 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 <dfn>close window algorithm</dfn> 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 <a lt=px value>CSS pixels</a> of the
<a>Picture-in-Picture window</a> 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 <a lt=px value>CSS pixels</a> of the
<a>Picture-in-Picture window</a> 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 <a>Picture-in-Picture window</a> associated with
{{pictureInPictureElement}} changes, the user agent MUST <a>queue a task</a> to
Expand Down Expand Up @@ -501,7 +491,7 @@ This specification defines a <a>policy-controlled feature</a> that controls
whether the <a>request Picture-in-Picture algorithm</a> may return a
{{SecurityError}} and whether {{pictureInPictureEnabled}} is `true` or `false`.

The <a>feature name</a> for this feature is `"picture-in-picture"`.
The feature name for this feature is `"picture-in-picture"`.

The <a>default allowlist</a> for this feature is `*`.

Expand Down

0 comments on commit ee5ab29

Please sign in to comment.