@@ -28130,10 +28130,10 @@ interface <dfn interface>HTMLPictureElement</dfn> : <span>HTMLElement</span> {
28130
28130
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
28131
28131
<dd><span>Global attributes</span></dd>
28132
28132
<dd><code data-x="attr-source-type">type</code></dd>
28133
- <dd><code data-x="attr-source-src">src</code> (in <code>video</code> or <code>audio</code>)</dd>
28133
+ <dd><code data-x="attr-source-media">media</code></dd>
28134
+ <dd><code data-x="attr-source-src">src</code> (in <code>audio</code> or <code>video</code>)</dd>
28134
28135
<dd><code data-x="attr-source-srcset">srcset</code> (in <code>picture</code>)</dd>
28135
28136
<dd><code data-x="attr-source-sizes">sizes</code> (in <code>picture</code>)</dd>
28136
- <dd><code data-x="attr-source-media">media</code> (in <code>picture</code>)</dd>
28137
28137
<dd><code data-x="attr-dim-width">width</code> (in <code>picture</code>)</dd>
28138
28138
<dd><code data-x="attr-dim-height">height</code> (in <code>picture</code>)</dd>
28139
28139
<dt><span
@@ -28166,6 +28166,17 @@ interface <dfn interface>HTMLSourceElement</dfn> : <span>HTMLElement</span> {
28166
28166
<p>The <dfn element-attr for="source" data-x="attr-source-type"><code>type</code></dfn> attribute
28167
28167
may be present. If present, the value must be a <span>valid MIME type string</span>.</p>
28168
28168
28169
+ <p>The <dfn element-attr for="source" data-x="attr-source-media"><code>media</code></dfn>
28170
+ attribute may also be present. If present, the value must contain a <span>valid media query
28171
+ list</span>. The user agent will skip to the next <code>source</code> element if the value does
28172
+ not <span data-x="matches the environment">match the environment</span>.</p>
28173
+
28174
+ <p class="note">The <code data-x="attr-source-media">media</code> attribute is only evaluated
28175
+ once during the <span data-x="concept-media-load-algorithm">resource selection algorithm</span>
28176
+ for <span data-x="media element">media elements</span>. In contrast, when using the
28177
+ <code>picture</code> element, the user agent will <a href="#img-environment-changes">react to
28178
+ changes in the environment</a>.</p>
28179
+
28169
28180
<p>The remainder of the requirements depend on whether the parent is a <code>picture</code>
28170
28181
element or a <span>media element</span>:</p>
28171
28182
@@ -28190,11 +28201,6 @@ interface <dfn interface>HTMLSourceElement</dfn> : <span>HTMLElement</span> {
28190
28201
attribute</span>, which contributes the <span>source size</span> to the <span>source set</span>,
28191
28202
if the <code>source</code> element is selected.</p>
28192
28203
28193
- <p>The <dfn element-attr for="source" data-x="attr-source-media"><code>media</code></dfn>
28194
- attribute may also be present. If present, the value must contain a <span>valid media query
28195
- list</span>. The user agent will skip to the next <code>source</code> element if the value does
28196
- not <span data-x="matches the environment">match the environment</span>.</p>
28197
-
28198
28204
<p>The <code>source</code> element supports <span>dimension attributes</span>. The
28199
28205
<code>img</code> element can use the <code data-x="attr-dim-width">width</code> and <code
28200
28206
data-x="attr-dim-height">height</code> attributes of a <code>source</code> element, instead of
@@ -28333,9 +28339,8 @@ interface <dfn interface>HTMLSourceElement</dfn> : <span>HTMLElement</span> {
28333
28339
</dl>
28334
28340
</div>
28335
28341
28336
- <p>The <code data-x="attr-source-srcset">srcset</code>, <code
28337
- data-x="attr-source-sizes">sizes</code>, and <code data-x="attr-source-media">media</code>
28338
- attributes must not be present.</p>
28342
+ <p>The <code data-x="attr-source-srcset">srcset</code> and <code
28343
+ data-x="attr-source-sizes">sizes</code> attributes must not be present.</p>
28339
28344
</dd>
28340
28345
</dl>
28341
28346
@@ -35715,6 +35720,11 @@ interface <dfn interface>MediaError</dfn> {
35715
35720
<span>synchronous section</span>, and jump down to the <i>failed with elements</i> step
35716
35721
below.</p></li>
35717
35722
35723
+ <li><p>⌛ If <var>candidate</var> has a <code data-x="attr-source-media">media</code>
35724
+ attribute whose value does not <span data-x="matches the environment">match the
35725
+ environment</span>, then end the <span>synchronous section</span>, and jump down to the
35726
+ <i>failed with elements</i> step below.</p></li>
35727
+
35718
35728
<li><p>⌛ Let <var>urlString</var> and <var>urlRecord</var> be the <span>resulting URL
35719
35729
string</span> and the <span>resulting URL record</span>, respectively, that would have
35720
35730
resulted from <span data-x="parse a url">parsing</span> the <span>URL</span> specified by
@@ -130649,11 +130659,11 @@ interface <dfn interface>External</dfn> {
130649
130659
<code>audio</code></td>
130650
130660
<td>empty</td>
130651
130661
<td><span data-x="global attributes">globals</span>;
130652
- <code data-x="attr-source-src">src</code>;
130653
130662
<code data-x="attr-source-type">type</code>;
130663
+ <code data-x="attr-source-media">media</code>;
130664
+ <code data-x="attr-source-src">src</code>;
130654
130665
<code data-x="attr-source-srcset">srcset</code>;
130655
130666
<code data-x="attr-source-sizes">sizes</code>;
130656
- <code data-x="attr-source-media">media</code>;
130657
130667
<code data-x="attr-dim-width">width</code>;
130658
130668
<code data-x="attr-dim-height">height</code></td>
130659
130669
<td><code>HTMLSourceElement</code></td>
@@ -131978,7 +131988,7 @@ interface <dfn interface>External</dfn> {
131978
131988
<th> <code data-x="">media</code>
131979
131989
<td> <code data-x="attr-link-media">link</code>;
131980
131990
<code data-x="attr-meta-media">meta</code>;
131981
- <code data-x="attr-source-media">source</code> (in <code>picture</code>) ;
131991
+ <code data-x="attr-source-media">source</code>;
131982
131992
<code data-x="attr-style-media">style</code>
131983
131993
<td> Applicable media
131984
131994
<td> <span>Valid media query list</span>
0 commit comments