Skip to content

Commit 0bc7d34

Browse files
authored
[Editorial] Drop "div" around IDL sections (#517)
The use of `<div>` around sections that define IDL seems to confuse ReSpec as it takes out the headings included in that section from the table of contents. If that's intended, the right way to exclude headings from the table of contents would be to flag the headings with a `notoc` class: https://respec.org/docs/#notoc-class The `<div>` seem useless in any case. This update gets rid of them. <!-- This comment and the below content is programmatically generated. You may add a comma-separated list of anchors you'd like a direct link to below (e.g. #idl-serializers, #idl-sequence): Don't remove this comment or modify anything below this line. If you don't want a preview generated for this pull request, just replace the whole of this comment's content by "no preview" and remove what's below. --> *** <a href="https://pr-preview.s3.amazonaws.com/w3c/encrypted-media/pull/517.html" title="Last updated on Nov 15, 2023, 9:40 AM UTC (162030b)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/encrypted-media/517/0b2d5e3...162030b.html" title="Last updated on Nov 15, 2023, 9:40 AM UTC (162030b)">Diff</a>
1 parent fb47688 commit 0bc7d34

File tree

1 file changed

+39
-43
lines changed

1 file changed

+39
-43
lines changed

encrypted-media-respec.html

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ <h3>Permissions Policy Integration</h3>
658658
<section>
659659
<h3><dfn>Navigator</dfn> Extension: <code>requestMediaKeySystemAccess()</code></h3>
660660

661-
<div><pre class="idl">[Exposed=Window]
661+
<pre class="idl">[Exposed=Window]
662662
partial interface Navigator {
663663
[SecureContext] Promise&lt;MediaKeySystemAccess&gt; requestMediaKeySystemAccess (DOMString keySystem, sequence&lt;MediaKeySystemConfiguration&gt; supportedConfigurations);
664664
};</pre><section><h2>Methods</h2><dl class="methods" data-dfn-for="Navigator" data-link-for="Navigator"><dt><dfn><code>requestMediaKeySystemAccess</code></dfn></dt><dd>
@@ -731,7 +731,7 @@ <h3><dfn>Navigator</dfn> Extension: <code>requestMediaKeySystemAccess()</code></
731731
</td></tr><tr><td class="prmName">supportedConfigurations</td><td class="prmType"><code>sequence&lt;MediaKeySystemConfiguration&gt;</code></td><td class="prmNullFalse"><span role="img" aria-label="False"></span></td><td class="prmOptFalse"><span role="img" aria-label="False"></span></td><td class="prmDesc">
732732
A sequence of <a>MediaKeySystemConfiguration</a> configurations to try in order.
733733
The first element with a satisfiable configuration will be used.
734-
</td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;MediaKeySystemAccess&gt;</code></div></dd></dl></section></div>
734+
</td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;MediaKeySystemAccess&gt;</code></div></dd></dl></section>
735735

736736
<section>
737737
<h4>Algorithms</h4>
@@ -1265,7 +1265,7 @@ <h5>Get Consent Status</h5>
12651265
<section>
12661266
<h3><a>MediaKeySystemConfiguration</a> dictionary</h3>
12671267

1268-
<div><pre class="idl">enum MediaKeysRequirement {
1268+
<pre class="idl">enum MediaKeysRequirement {
12691269
"required",
12701270
"optional",
12711271
"not-allowed"
@@ -1294,9 +1294,9 @@ <h3><a>MediaKeySystemConfiguration</a> dictionary</h3>
12941294
<dt>When returned by a <a>MediaKeySystemAccess</a> object</dt>
12951295
<dd>CDM instances created by the object MUST NOT use this feature.</dd>
12961296
</dl>
1297-
</td></tr></tbody></table></div>
1297+
</td></tr></tbody></table>
12981298

1299-
<div><pre class="idl">dictionary MediaKeySystemConfiguration {
1299+
<pre class="idl">dictionary MediaKeySystemConfiguration {
13001300
DOMString label = "";
13011301
sequence&lt;DOMString&gt; initDataTypes = [];
13021302
sequence&lt;MediaKeySystemMediaCapability&gt; audioCapabilities = [];
@@ -1352,7 +1352,6 @@ <h3><a>MediaKeySystemConfiguration</a> dictionary</h3>
13521352

13531353
<section>
13541354
<h3><dfn>MediaKeySystemMediaCapability</dfn> dictionary</h3>
1355-
<div>
13561355
<pre class="idl">dictionary MediaKeySystemMediaCapability {
13571356
DOMString contentType = "";
13581357
DOMString? encryptionScheme = null;
@@ -1435,7 +1434,7 @@ <h2>Dictionary <a class="idlType">MediaKeySystemMediaCapability</a> Members</h2>
14351434
</div>
14361435
</dd>
14371436
</dl>
1438-
</section></div>
1437+
</section>
14391438

14401439
<p>In order for the capability represented by this object to be considered supported, <a def-id="capability-contentType"></a> MUST NOT be the empty string and its entire value, including all codecs, MUST be supported with <a def-id="capability-robustness"></a>.</p>
14411440
<p class="note">If any of a set of codecs is acceptable, use a separate instances of this dictionary for each codec.</p>
@@ -1447,7 +1446,7 @@ <h2>Dictionary <a class="idlType">MediaKeySystemMediaCapability</a> Members</h2>
14471446
<h2><dfn>MediaKeySystemAccess</dfn> Interface</h2>
14481447
<p>The MediaKeySystemAccess object provides access to a <a def-id="keysystem"></a>.</p>
14491448

1450-
<div><pre class="idl">[Exposed=Window, SecureContext] interface MediaKeySystemAccess {
1449+
<pre class="idl">[Exposed=Window, SecureContext] interface MediaKeySystemAccess {
14511450
readonly attribute DOMString keySystem;
14521451
MediaKeySystemConfiguration getConfiguration ();
14531452
Promise&lt;MediaKeys&gt; createMediaKeys ();
@@ -1515,7 +1514,7 @@ <h2><dfn>MediaKeySystemAccess</dfn> Interface</h2>
15151514
</li>
15161515
<li><p>Return <var>promise</var>.</p></li>
15171516
</ol>
1518-
<div><em>No parameters.</em></div><div><em>Return type: </em><code>Promise&lt;MediaKeys&gt;</code></div></dd></dl></section></div>
1517+
<div><em>No parameters.</em></div><div><em>Return type: </em><code>Promise&lt;MediaKeys&gt;</code></div></dd></dl></section>
15191518
</section>
15201519

15211520

@@ -1529,7 +1528,7 @@ <h2><dfn>MediaKeys</dfn> Interface</h2>
15291528
<p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [[WEBIDL]] type mapping errors.</p>
15301529
<p>The steps of an algorithm are always aborted when rejecting a promise.</p>
15311530

1532-
<div><pre class="idl">enum MediaKeySessionType {
1531+
<pre class="idl">enum MediaKeySessionType {
15331532
"temporary",
15341533
"persistent-license"
15351534
};</pre>
@@ -1562,18 +1561,17 @@ <h2><dfn>MediaKeys</dfn> Interface</h2>
15621561
See <a def-id="session-storage"></a>.
15631562
</p>
15641563
</td></tr>
1565-
</tbody></table></div>
1566-
1567-
<div>
1568-
<pre class="idl">
1569-
[Exposed=Window, SecureContext] interface MediaKeys {
1570-
MediaKeySession createSession (optional MediaKeySessionType sessionType = "temporary");
1571-
Promise&lt;MediaKeyStatus&gt; getStatusForPolicy (optional MediaKeysPolicy policy = {});
1572-
Promise&lt;boolean&gt; setServerCertificate (BufferSource serverCertificate);
1573-
};
1574-
</pre>
1564+
</tbody></table>
1565+
1566+
<pre class="idl">
1567+
[Exposed=Window, SecureContext] interface MediaKeys {
1568+
MediaKeySession createSession (optional MediaKeySessionType sessionType = "temporary");
1569+
Promise&lt;MediaKeyStatus&gt; getStatusForPolicy (optional MediaKeysPolicy policy = {});
1570+
Promise&lt;boolean&gt; setServerCertificate (BufferSource serverCertificate);
1571+
};
1572+
</pre>
15751573

1576-
<section id="">
1574+
<section>
15771575
<h2>Methods</h2>
15781576
<dl class="methods" data-dfn-for="MediaKeys" data-link-for="MediaKeys">
15791577
<dt><dfn><code>createSession</code></dfn></dt><dd>
@@ -1730,9 +1728,8 @@ <h2>Methods</h2>
17301728
</dd>
17311729
</dl>
17321730
</section>
1733-
</div>
17341731

1735-
<section id="">
1732+
<section>
17361733
<h3>Algorithms</h3>
17371734
<section id="is-persistent-session-type">
17381735
<h4>Is persistent session type?</h4>
@@ -1825,7 +1822,7 @@ <h2><dfn>MediaKeySession</dfn> Interface</h2>
18251822
<p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [[WEBIDL]] type mapping errors.</p>
18261823
<p>The following steps of an algorithm are always aborted when rejecting a promise.</p>
18271824

1828-
<div><pre class="idl">enum MediaKeySessionClosedReason {
1825+
<pre class="idl">enum MediaKeySessionClosedReason {
18291826
"internal-error",
18301827
"closed-by-application",
18311828
"release-acknowledged",
@@ -1859,9 +1856,9 @@ <h2><dfn>MediaKeySession</dfn> Interface</h2>
18591856
If the closed session is still needed for some reason, the application developer should consider some strategy to reduce the number of sessions needed or proactively close unneeded sessions.
18601857
</p>
18611858
</div>
1862-
</td></tr></tbody></table></div>
1859+
</td></tr></tbody></table>
18631860

1864-
<div><pre class="idl">[Exposed=Window, SecureContext] interface MediaKeySession : EventTarget {
1861+
<pre class="idl">[Exposed=Window, SecureContext] interface MediaKeySession : EventTarget {
18651862
readonly attribute DOMString sessionId;
18661863
readonly attribute unrestricted double expiration;
18671864
readonly attribute Promise&lt;MediaKeySessionClosedReason&gt; closed;
@@ -2346,14 +2343,14 @@ <h2><dfn>MediaKeySession</dfn> Interface</h2>
23462343
</li>
23472344
<li><p>Return <var>promise</var>.</p></li>
23482345
</ol>
2349-
<div><em>No parameters.</em></div><div><em>Return type: </em><code>Promise&lt;undefined&gt;</code></div></dd></dl></section></div>
2346+
<div><em>No parameters.</em></div><div><em>Return type: </em><code>Promise&lt;undefined&gt;</code></div></dd></dl></section>
23502347

23512348
<section>
23522349
<h2><dfn>MediaKeyStatusMap</dfn> Interface</h2>
23532350
<p>The MediaKeyStatusMap object is a read-only map of <a def-id="key-id">key IDs</a> to the current status of the associated key.</p>
23542351
<p>A key's status is independent of whether the key is currently being used and of media data.</p>
23552352
<p class="note">For example, if a key has output requirements that cannot currently be met, the key's status should be <a def-id="status-output-downscaled"></a> or <a def-id="status-output-restricted"></a>, as appropriate, regardless of whether that key has been or is currently needed to decrypt media data.</p>
2356-
<div><pre class="idl">[Exposed=Window, SecureContext] interface MediaKeyStatusMap {
2353+
<pre class="idl">[Exposed=Window, SecureContext] interface MediaKeyStatusMap {
23572354
iterable&lt;BufferSource,MediaKeyStatus&gt;;
23582355
readonly attribute unsigned long size;
23592356
boolean has (BufferSource keyId);
@@ -2398,9 +2395,8 @@ <h2>Methods</h2>
23982395
order than the first <var>m</var> octets of <var>B</var> or those octets are equal and <var>m</var> &lt; <var>n</var>.
23992396
</p>
24002397
</section>
2401-
</div>
24022398

2403-
<div><pre class="idl">enum MediaKeyStatus {
2399+
<pre class="idl">enum MediaKeyStatus {
24042400
"usable",
24052401
"expired",
24062402
"released",
@@ -2444,15 +2440,15 @@ <h2>Methods</h2>
24442440
</td></tr><tr><td><dfn><code id="idl-def-MediaKeyStatus.internal-error">internal-error</code></dfn></td><td>
24452441
The key is not currently <a def-id="usable-for-decryption"></a> because of an error in the CDM unrelated to the other values.
24462442
This value is not actionable by the application.
2447-
</td></tr></tbody></table></div>
2443+
</td></tr></tbody></table>
24482444
</section>
24492445

24502446
<section>
24512447
<h3><a>MediaKeyMessageEvent</a></h3>
24522448
<p>The MediaKeyMessageEvent object is used for the <a def-id="message"></a> event.</p>
24532449
<p>Events are constructed as defined in <a def-id="constructing-events"></a> [[DOM]].</p>
24542450

2455-
<div><pre class="idl">enum MediaKeyMessageType {
2451+
<pre class="idl">enum MediaKeyMessageType {
24562452
"license-request",
24572453
"license-renewal",
24582454
"license-release",
@@ -2462,9 +2458,9 @@ <h3><a>MediaKeyMessageEvent</a></h3>
24622458
<table class="simple" data-dfn-for="MediaKeyMessageType" data-link-for="MediaKeyMessageType"><tbody><tr><th colspan="2">Enumeration description</th></tr><tr><td><dfn><code id="idl-def-MediaKeyMessageType.license-request">license-request</code></dfn></td><td>The message contains a request for a new license.</td></tr><tr><td><dfn><code id="idl-def-MediaKeyMessageType.license-renewal">license-renewal</code></dfn></td><td>The message contains a request to renew an existing license.</td></tr><tr><td><dfn><code id="idl-def-MediaKeyMessageType.license-release">license-release</code></dfn></td><td>The message contains a <a def-id="record-of-license-destruction"></a>.</td></tr><tr><td><dfn><code id="idl-def-MediaKeyMessageType.individualization-request">individualization-request</code></dfn></td><td>
24632459
The message contains a request for <a href="#app-assisted-individualization">App-Assisted Individualization</a> (or re-individualization).<br>
24642460
As with all other messages, any identifiers in the message MUST be <a href="#per-origin-per-profile-identifiers">distinctive per origin and profile</a> and MUST NOT be <a def-id="distinctive-permanent-identifier-maybe-plural"></a>.
2465-
</td></tr></tbody></table></div>
2461+
</td></tr></tbody></table>
24662462

2467-
<div><pre class="idl">[Exposed=Window, SecureContext]
2463+
<pre class="idl">[Exposed=Window, SecureContext]
24682464
interface MediaKeyMessageEvent : Event {
24692465
constructor(DOMString type, MediaKeyMessageEventInit eventInitDict);
24702466
readonly attribute MediaKeyMessageType messageType;
@@ -2482,18 +2478,18 @@ <h3><a>MediaKeyMessageEvent</a></h3>
24822478
</p>
24832479
</dd><dt><dfn><code>message</code></dfn> of type <span class="idlAttrType">{{ArrayBuffer}}</span>, readonly </dt><dd>
24842480
The message from the CDM. Messages are Key System-specific.
2485-
</dd></dl></section></div>
2481+
</dd></dl></section>
24862482

24872483
<section>
24882484
<h4><dfn>MediaKeyMessageEventInit</dfn></h4>
2489-
<div><pre class="idl" data-cite="DOM">dictionary MediaKeyMessageEventInit : EventInit {
2485+
<pre class="idl" data-cite="DOM">dictionary MediaKeyMessageEventInit : EventInit {
24902486
required MediaKeyMessageType messageType;
24912487
required ArrayBuffer message;
24922488
};</pre><section><h2>Dictionary <a class="idlType">MediaKeyMessageEventInit</a> Members</h2><dl class="dictionary-members" data-dfn-for="MediaKeyMessageEventInit" data-link-for="MediaKeyMessageEventInit"><dt><dfn><code>messageType</code></dfn> of type <span class="idlMemberType"><a>MediaKeyMessageType</a></span></dt><dd>
24932489
The type of the message.
24942490
</dd><dt><dfn><code>message</code></dfn> of type <span class="idlMemberType">{{ArrayBuffer}}</span></dt><dd>
24952491
The message.
2496-
</dd></dl></section></div>
2492+
</dd></dl></section>
24972493
</section>
24982494
</section>
24992495

@@ -2867,7 +2863,7 @@ <h2><dfn>HTMLMediaElement</dfn> Extensions</h2>
28672863
<p>For methods that return a promise, all errors are reported asynchronously by rejecting the returned Promise. This includes [[WEBIDL]] type mapping errors.</p>
28682864
<p>The steps of an algorithm are always aborted when rejecting a promise.</p>
28692865

2870-
<div><pre class="idl">[Exposed=Window] partial interface HTMLMediaElement {
2866+
<pre class="idl">[Exposed=Window] partial interface HTMLMediaElement {
28712867
[SecureContext] readonly attribute MediaKeys? mediaKeys;
28722868
attribute EventHandler onencrypted;
28732869
attribute EventHandler onwaitingforkey;
@@ -2938,14 +2934,14 @@ <h2><dfn>HTMLMediaElement</dfn> Extensions</h2>
29382934
</ol>
29392935
<table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">mediaKeys</td><td class="prmType"><code>MediaKeys</code></td><td class="prmNullTrue"><span role="img" aria-label="True"></span></td><td class="prmOptFalse"><span role="img" aria-label="False"></span></td><td class="prmDesc">
29402936
A <!-- Restore when https://github.com/w3c/respec/issues/893 is fixed. <a> -->MediaKeys<!-- </a> --> object.
2941-
</td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;undefined&gt;</code></div></dd></dl></secion></div>
2937+
</td></tr></tbody></table><div><em>Return type: </em><code>Promise&lt;undefined&gt;</code></div></dd></dl></section>
29422938

29432939
<section>
29442940
<h3><a>MediaEncryptedEvent</a></h3>
29452941
<p>The MediaEncryptedEvent object is used for the <a def-id="encrypted"></a> event.</p>
29462942
<p>Events are constructed as defined in <a def-id="constructing-events"></a> [[DOM]].</p>
29472943

2948-
<div><pre class="idl">[Exposed=Window]
2944+
<pre class="idl">[Exposed=Window]
29492945
interface MediaEncryptedEvent : Event {
29502946
constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict = {});
29512947
readonly attribute DOMString initDataType;
@@ -2956,18 +2952,18 @@ <h3><a>MediaEncryptedEvent</a></h3>
29562952
Indicates the <a def-id="initialization-data-type"></a> of the <a def-id="initialization-data"></a> contained in the <a def-id="encrypted-event-initdata-attribute"></a> attribute.
29572953
</dd><dt><dfn><code>initData</code></dfn> of type <span class="idlAttrType">{{ArrayBuffer}}</span>, readonly , nullable</dt><dd>
29582954
The <a def-id="initialization-data"></a> for the event.
2959-
</dd></dl></section></div>
2955+
</dd></dl></section>
29602956

29612957
<section>
29622958
<h4><dfn>MediaEncryptedEventInit</dfn></h4>
2963-
<div><pre class="idl" data-cite="DOM">dictionary MediaEncryptedEventInit : EventInit {
2959+
<pre class="idl" data-cite="DOM">dictionary MediaEncryptedEventInit : EventInit {
29642960
DOMString initDataType = "";
29652961
ArrayBuffer? initData = null;
29662962
};</pre><section><h2>Dictionary <a class="idlType">MediaEncryptedEventInit</a> Members</h2><dl class="dictionary-members" data-dfn-for="MediaEncryptedEventInit" data-link-for="MediaEncryptedEventInit"><dt><dfn><code>initDataType</code></dfn> of type <span class="idlMemberType">{{DOMString}}</span>, defaulting to <code>""</code></dt><dd>
29672963
The <a def-id="initialization-data-type"></a>.
29682964
</dd><dt><dfn><code>initData</code></dfn> of type <span class="idlMemberType">{{ArrayBuffer}}</span>, nullable, defaulting to <code>null</code></dt><dd>
29692965
The <a def-id="initialization-data"></a>.
2970-
</dd></dl></section></div>
2966+
</dd></dl></section>
29712967
</section>
29722968
</section>
29732969

0 commit comments

Comments
 (0)