[html5] r7771 - [e] (0) Cleanup Affected topics: HTML, HTML Syntax and Parsing, Rendering, Secur [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Mar 25 16:36:39 PDT 2013
Author: ianh
Date: 2013-03-25 16:36:37 -0700 (Mon, 25 Mar 2013)
New Revision: 7771
Modified:
complete.html
index
source
Log:
[e] (0) Cleanup
Affected topics: HTML, HTML Syntax and Parsing, Rendering, Security, Video Text Tracks
Modified: complete.html
===================================================================
--- complete.html 2013-03-25 23:18:45 UTC (rev 7770)
+++ complete.html 2013-03-25 23:36:37 UTC (rev 7771)
@@ -6945,25 +6945,22 @@
<h4 id=content-type-sniffing><span class=secno>2.6.4 </span>Determining the type of a resource</h4>
-<!--CLEANUP-->
<p>The <dfn id=content-type title=Content-Type>Content-Type metadata</dfn> of a resource must be obtained and
- interpreted in a manner consistent with the requirements of the MIME Sniffing specification.
- <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
+ interpreted in a manner consistent with the requirements of the MIME Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
<p>The <dfn id=content-type-sniffing-0 title="Content-Type sniffing">sniffed type of a resource</dfn> must be found in a
- manner consistent with the requirements given in the MIME Sniffing specification for finding
- the <i>sniffed media type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
+ manner consistent with the requirements given in the MIME Sniffing specification for finding the
+ <i>sniffed media type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
<p>The <dfn id=content-type-sniffing:-image title="Content-Type sniffing: image">rules for sniffing images specifically</dfn> and
the <dfn id=content-type-sniffing:-text-or-binary title="Content-Type sniffing: text or binary">rules for distinguishing if a resource is
text or binary</dfn> are also defined in the MIME Sniffing specification. Both sets of rules
return a <a href=#mime-type>MIME type</a> as their result. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
- <p class=warning>It is imperative that the rules in the MIME Sniffing specification be
- followed exactly. When a user agent uses different heuristics for content type detection than the
- server expects, security problems can occur. For more details, see the MIME Sniffing
- specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
+ <p class=warning>It is imperative that the rules in the MIME Sniffing specification be followed
+ exactly. When a user agent uses different heuristics for content type detection than the server
+ expects, security problems can occur. For more details, see the MIME Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
<h4 id=extracting-character-encodings-from-meta-elements><span class=secno>2.6.5 </span>Extracting character encodings from <code><a href=#the-meta-element>meta</a></code> elements</h4>
@@ -13828,9 +13825,9 @@
ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
<pre>style = no-c-start *( c-start no-c-end c-end no-c-start )
-no-c-start = <any string that doesn't contain a substring that matches c-start >
+no-c-start = < any string that doesn't contain a substring that matches c-start >
c-start = "<!--"
-no-c-end = <any string that doesn't contain a substring that matches c-end >
+no-c-end = < any string that doesn't contain a substring that matches c-end >
c-end = "-->"</pre>
<!-- Unmatched comment-like syntax is invalid on a temporary basis,
@@ -14967,15 +14964,13 @@
<!--<li>"<code>application/xhtml+xml</code>"-->
<!--<li>"<code>image/svg+xml</code>"-->
- <!-- the commented-out ones aren't listed here because they
- couldn't sanely be interpreted as a scripting language anyway:
- they're defined to be something else. I just don't want this to
+ <!-- the commented-out ones aren't listed here because they couldn't sanely be interpreted as a
+ scripting language anyway: they're defined to be something else. I just don't want this to
devolve into a list of every non-scripting type in existence. -->
- </ul><p class=note>These types are explicitly listed here because they
- are poorly-defined types that are nonetheless likely to be used as
- formats for data blocks, and it would be problematic if they were
- suddenly to be interpreted as script by a user agent.</p>
+ </ul><p class=note>These types are explicitly listed here because they are poorly-defined types that
+ are nonetheless likely to be used as formats for data blocks, and it would be problematic if they
+ were suddenly to be interpreted as script by a user agent.</p>
<!-- a similar paragraph is also present in the <style> section -->
@@ -14992,20 +14987,19 @@
<h5 id=restrictions-for-contents-of-script-elements><span class=secno>4.3.1.2 </span><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
- <p>The <code><a href=#textcontent>textContent</a></code> of a <code><a href=#the-script-element>script</a></code> element
- must match the <code title="">script</code> production in the
- following ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
+ <p>The <code><a href=#textcontent>textContent</a></code> of a <code><a href=#the-script-element>script</a></code> element must match the <code title="">script</code> production in the following ABNF, the character set for which is Unicode.
+ <a href=#refsABNF>[ABNF]</a></p>
<pre>script = data1 *( escape [ script-start data3 ] "-->" data1 ) [ escape ]
escape = "<!--" data2 *( script-start data3 script-end data2 )
-data1 = <any string that doesn't contain a substring that matches not-data1>
+data1 = < any string that doesn't contain a substring that matches not-data1 >
not-data1 = <!-- script-end / -->"<!--" <!-- the script-end is redundant here since it would close the element -->
-data2 = <any string that doesn't contain a substring that matches not-data2>
+data2 = < any string that doesn't contain a substring that matches not-data2 >
not-data2 = <!-- script-end / -->script-start / "-->" <!-- the script-end is redundant here since it would close the element -->
-data3 = <any string that doesn't contain a substring that matches not-data3>
+data3 = < any string that doesn't contain a substring that matches not-data3 >
not-data3 = script-end / "-->"
script-start = lt s c r i p t tag-end
@@ -15034,18 +15028,16 @@
tag-end =/ %x002F ; U+002F SOLIDUS (/)
tag-end =/ %x003E ; U+003E GREATER-THAN SIGN (>)</pre>
- <p>When a <code><a href=#the-script-element>script</a></code> element contains <a href=#inline-documentation-for-external-scripts>script
- documentation</a>, there are further restrictions on the contents
- of the element, as described in the section below.</p>
+ <p>When a <code><a href=#the-script-element>script</a></code> element contains <a href=#inline-documentation-for-external-scripts>script documentation</a>, there are
+ further restrictions on the contents of the element, as described in the section below.</p>
<h5 id=inline-documentation-for-external-scripts><span class=secno>4.3.1.3 </span><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
- <p>If a <code><a href=#the-script-element>script</a></code> element's <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is specified, then the
- contents of the <code><a href=#the-script-element>script</a></code> element, if any, must be such
- that the value of the <code title=dom-script-text><a href=#dom-script-text>text</a></code> IDL
- attribute, which is derived from the element's contents, matches the
- <code title="">documentation</code> production in the following
+ <p>If a <code><a href=#the-script-element>script</a></code> element's <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is
+ specified, then the contents of the <code><a href=#the-script-element>script</a></code> element, if any, must be such that the
+ value of the <code title=dom-script-text><a href=#dom-script-text>text</a></code> IDL attribute, which is derived from the
+ element's contents, matches the <code title="">documentation</code> production in the following
ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
<pre>documentation = *( *( space / tab / comment ) [ line-comment ] newline )
@@ -15065,20 +15057,18 @@
not-slash = %x0000-002E / %x0030-10FFFF
; a <a href=#unicode-character>Unicode character</a> other than U+002F SOLIDUS (/)</pre>
- <p class=note>This corresponds to putting the contents of the
- element in JavaScript comments.</p>
+ <p class=note>This corresponds to putting the contents of the element in JavaScript
+ comments.</p>
- <p class=note>This requirement is in addition to the earlier
- restrictions on the syntax of contents of <code><a href=#the-script-element>script</a></code>
- elements.</p>
+ <p class=note>This requirement is in addition to the earlier restrictions on the syntax of
+ contents of <code><a href=#the-script-element>script</a></code> elements.</p>
<div class=example>
- <p>This allows authors to include documentation, such as license
- information or API information, inside their documents while still
- referring to external script files. The syntax is constrained so
- that authors don't accidentally include what looks like valid
- script while also providing a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute.</p>
+ <p>This allows authors to include documentation, such as license information or API information,
+ inside their documents while still referring to external script files. The syntax is constrained
+ so that authors don't accidentally include what looks like valid script while also providing a
+ <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute.</p>
<pre><script src="cool-effects.js">
// create new instances using:
@@ -25886,16 +25876,14 @@
<!-- could define how to sniff for an image here -->
- <li><p>If an image is thus obtained, the <a href=#poster-frame>poster frame</a>
- is that image. Otherwise, there is no <a href=#poster-frame>poster
- frame</a>.</li>
+ <li><p>If an image is thus obtained, the <a href=#poster-frame>poster frame</a> is that image. Otherwise,
+ there is no <a href=#poster-frame>poster frame</a>.</li>
</ol></div>
- <p class=note>The image given by the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute, the <i><a href=#poster-frame>poster
- frame</a></i>, is intended to be a representative frame of the video
- (typically one of the first non-blank frames) that gives the user an
- idea of what the video is like.</p>
+ <p class=note>The image given by the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute,
+ the <i><a href=#poster-frame>poster frame</a></i>, is intended to be a representative frame of the video (typically one of
+ the first non-blank frames) that gives the user an idea of what the video is like.</p>
<div class=impl>
@@ -25934,9 +25922,8 @@
frame corresponding to the <a href=#current-playback-position>current playback position</a> in the video, the new frame
must be rendered.</dd>
- </dl><p class=note>Which frame in a video stream corresponds to a
- particular playback position is defined by the video stream's
- format.</p>
+ </dl><p class=note>Which frame in a video stream corresponds to a particular playback position is
+ defined by the video stream's format.</p>
<p>The <code><a href=#the-video-element>video</a></code> element also <a href=#represents>represents</a> any <a href=#text-track-cue title="text track
cue">text track cues</a> whose <a href=#text-track-cue-active-flag>text track cue active flag</a> is set and whose
@@ -25946,26 +25933,21 @@
<p>Any audio associated with the <a href=#media-resource>media resource</a> must, if played, be played
synchronized with the <a href=#current-playback-position>current playback position</a>, at the element's <a href=#effective-media-volume>effective
media volume</a>.</p>
-<!--CLEANUP-->
- <p>In addition to the above, the user agent may provide messages to
- the user (such as "buffering", "no video loaded", "error", or more
- detailed information) by overlaying text or icons on the video or
- other areas of the element's playback area, or in another
- appropriate manner.</p>
+ <p>In addition to the above, the user agent may provide messages to the user (such as "buffering",
+ "no video loaded", "error", or more detailed information) by overlaying text or icons on the video
+ or other areas of the element's playback area, or in another appropriate manner.</p>
- <p>User agents that cannot render the video may instead make the
- element <a href=#represents title=represents>represent</a> a link to an
- external video playback utility or to the video data itself.</p>
+ <p>User agents that cannot render the video may instead make the element <a href=#represents title=represents>represent</a> a link to an external video playback utility or to the video
+ data itself.</p>
- <p>When a <code><a href=#the-video-element>video</a></code> element's <a href=#media-resource>media resource</a>
- has a video channel, the element <a href=#provides-a-paint-source>provides a paint
- source</a> whose width is the <a href=#media-resource>media resource</a>'s <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>, whose
- height is the <a href=#media-resource>media resource</a>'s <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a>, and
- whose appearance is the frame of video corresponding to the <a href=#current-playback-position title="current playback position">current playback position</a>,
- if that is available, or else (e.g. when the video is seeking or
- buffering) its previous appearance, if any, or else (e.g. because
- the video is still loading the first frame) blackness.</p>
+ <p>When a <code><a href=#the-video-element>video</a></code> element's <a href=#media-resource>media resource</a> has a video channel, the
+ element <a href=#provides-a-paint-source>provides a paint source</a> whose width is the <a href=#media-resource>media resource</a>'s
+ <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>, whose height is the
+ <a href=#media-resource>media resource</a>'s <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic
+ height</a>, and whose appearance is the frame of video corresponding to the <a href=#current-playback-position title="current playback position">current playback position</a>, if that is available, or else
+ (e.g. when the video is seeking or buffering) its previous appearance, if any, or else (e.g.
+ because the video is still loading the first frame) blackness.</p>
<hr></div>
@@ -26395,39 +26377,33 @@
</dl></div>
-<!--CLEANUP-->
- <p>The <dfn id=attr-source-media title=attr-source-media><code>media</code></dfn>
- attribute gives the intended media type of the <a href=#media-resource>media
- resource</a>, to help the user agent determine if this
- <a href=#media-resource>media resource</a> is useful to the user before fetching
- it. Its value must be a <a href=#valid-media-query>valid media query</a>.</p>
+ <p>The <dfn id=attr-source-media title=attr-source-media><code>media</code></dfn> attribute gives the intended media
+ type of the <a href=#media-resource>media resource</a>, to help the user agent determine if this <a href=#media-resource>media
+ resource</a> is useful to the user before fetching it. Its value must be a <a href=#valid-media-query>valid media
+ query</a>.</p>
<!-- for similar paragraphs, search for "The default, if the" -->
<p class=note id=source-default-media>The <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource
- selection algorithm</a> is defined in such a way that when the
- <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute is omitted
- the user agent acts the same as if the value was "<code title="">all</code>", i.e. by default the <a href=#media-resource>media
- resource</a> is suitable for all media.</p>
+ selection algorithm</a> is defined in such a way that when the <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute is omitted the user agent acts the same as if the
+ value was "<code title="">all</code>", i.e. by default the <a href=#media-resource>media resource</a> is suitable
+ for all media.</p>
<div class=impl>
- <p>If a <code><a href=#the-source-element>source</a></code> element is inserted as a child of a
- <a href=#media-element>media element</a> that has no <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute and whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value
- <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, the user
- agent must invoke the <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
+ <p>If a <code><a href=#the-source-element>source</a></code> element is inserted as a child of a <a href=#media-element>media element</a> that
+ has no <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute and whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, the user agent must invoke the <a href=#media-element>media
+ element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a>.</p>
- <p>The IDL attributes <dfn id=dom-source-src title=dom-source-src><code>src</code></dfn>, <dfn id=dom-source-type title=dom-source-type><code>type</code></dfn>, and <dfn id=dom-source-media title=dom-source-media><code>media</code></dfn> must
- <a href=#reflect>reflect</a> the respective content attributes of the same
- name.</p>
+ <p>The IDL attributes <dfn id=dom-source-src title=dom-source-src><code>src</code></dfn>, <dfn id=dom-source-type title=dom-source-type><code>type</code></dfn>, and <dfn id=dom-source-media title=dom-source-media><code>media</code></dfn> must <a href=#reflect>reflect</a> the respective content
+ attributes of the same name.</p>
</div>
<div class=example>
- <p>If the author isn't sure if the user agents will all be able to
- render the media resources provided, the author can listen to the
- <code title=event-error>error</code> event on the last
+ <p>If the author isn't sure if the user agents will all be able to render the media resources
+ provided, the author can listen to the <code title=event-error>error</code> event on the last
<code><a href=#the-source-element>source</a></code> element and trigger fallback behavior:</p>
<pre><script>
@@ -31270,13 +31246,11 @@
<li>
-<!--CLEANUP-->
- <p>Create a new <a href=#text-track>text track</a> corresponding to the new
- object, and set its <a href=#text-track-kind>text track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its <a href=#text-track-readiness-state>text track readiness
- state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
- <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a>
- mode, and its <a href=#text-track-list-of-cues>text track list of cues</a> to an empty
- list.</p>
+ <p>Create a new <a href=#text-track>text track</a> corresponding to the new object, and set its <a href=#text-track-kind>text
+ track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its
+ <a href=#text-track-readiness-state>text track readiness state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
+ <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a> mode, and its <a href=#text-track-list-of-cues>text
+ track list of cues</a> to an empty list.</p>
<p>Initially, the <a href=#text-track-list-of-cues>text track list of cues</a> is not associated with any <a href=#rules-for-updating-the-text-track-rendering>rules
for updating the text track rendering</a>. When a <a href=#text-track-cue>text track cue</a> is added to it,
@@ -31286,8 +31260,8 @@
<li>
- <p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media
- element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</p>
+ <p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
+ tracks</a>.</p>
</li>
@@ -31306,31 +31280,25 @@
</li>
- </ol><hr><p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn>
- attribute must return the <a href=#text-track-kind>text track kind</a> of the
- <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
+ </ol><hr><p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn> attribute must return the
+ <a href=#text-track-kind>text track kind</a> of the <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
represents.</p>
- <p>The <dfn id=dom-texttrack-label title=dom-TextTrack-label><code>label</code></dfn>
- attribute must return the <a href=#text-track-label>text track label</a> of the
- <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
- represents.</p>
+ <p>The <dfn id=dom-texttrack-label title=dom-TextTrack-label><code>label</code></dfn> attribute must return the
+ <a href=#text-track-label>text track label</a> of the <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code>
+ object represents.</p>
- <p>The <dfn id=dom-texttrack-language title=dom-TextTrack-language><code>language</code></dfn>
- attribute must return the <a href=#text-track-language>text track language</a> of the
- <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
- represents.</p>
+ <p>The <dfn id=dom-texttrack-language title=dom-TextTrack-language><code>language</code></dfn> attribute must return the
+ <a href=#text-track-language>text track language</a> of the <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code>
+ object represents.</p>
<p>The <dfn id=dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType><code>inBandMetadataTrackDispatchType</code></dfn>
- attribute must return the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track
- dispatch type</a> of the <a href=#text-track>text track</a> that the
- <code><a href=#texttrack>TextTrack</a></code> object represents.</p>
+ attribute must return the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track dispatch type</a> of the
+ <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents.</p>
- <p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn>
- attribute, on getting, must return the string corresponding to the
- <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
- <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the
- following list:</p>
+ <p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn> attribute, on getting, must return
+ the string corresponding to the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that
+ the <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the following list:</p>
<dl><dt>"<dfn id=dom-texttrack-disabled title=dom-TextTrack-disabled><code>disabled</code></dfn>"</dt>
<dd>The <a href=#text-track-disabled>text track disabled</a> mode.</dd>
@@ -31338,17 +31306,15 @@
<dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
<dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
<dd>The <a href=#text-track-showing>text track showing</a> mode.</dd>
- </dl><p>On setting, if the new value isn't equal to what the attribute
- would currently return, the new value must be processed as
- follows:</p>
+ </dl><p>On setting, if the new value isn't equal to what the attribute would currently return, the new
+ value must be processed as follows:</p>
<dl class=switch><dt>If the new value is "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
<dd>
- <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
- track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
- the <a href=#text-track-disabled>text track disabled</a> mode.</p>
+ <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+ <code><a href=#texttrack>TextTrack</a></code> object represents to the <a href=#text-track-disabled>text track disabled</a> mode.</p>
</dd>
@@ -31356,9 +31322,8 @@
<dd>
- <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
- track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
- the <a href=#text-track-hidden>text track hidden</a> mode.</p>
+ <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+ <code><a href=#texttrack>TextTrack</a></code> object represents to the <a href=#text-track-hidden>text track hidden</a> mode.</p>
</dd>
@@ -31366,9 +31331,8 @@
<dd>
- <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
- track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
- the <a href=#text-track-showing>text track showing</a> mode.</p>
+ <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+ <code><a href=#texttrack>TextTrack</a></code> object represents to the <a href=#text-track-showing>text track showing</a> mode.</p>
</dd>
@@ -31558,122 +31522,101 @@
</dl><div class=impl>
-<!--CLEANUP-->
- <p>The <dfn id=dom-texttrackcue-track title=dom-TextTrackCue-track><code>track</code></dfn>
- attribute, on getting, must return the <code><a href=#texttrack>TextTrack</a></code> object
- of the <a href=#text-track>text track</a> in whose <a href=#text-track-list-of-cues title="text track list
- of cues">list of cues</a> the <a href=#text-track-cue>text track cue</a> that
- the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents finds itself, if
- any; or null otherwise.</p>
+ <p>The <dfn id=dom-texttrackcue-track title=dom-TextTrackCue-track><code>track</code></dfn> attribute, on getting, must
+ return the <code><a href=#texttrack>TextTrack</a></code> object of the <a href=#text-track>text track</a> in whose <a href=#text-track-list-of-cues title="text
+ track list of cues">list of cues</a> the <a href=#text-track-cue>text track cue</a> that the
+ <code><a href=#texttrackcue>TextTrackCue</a></code> object represents finds itself, if any; or null otherwise.</p>
- <p>The <dfn id=dom-texttrackcue-id title=dom-TextTrackCue-id><code>id</code></dfn>
- attribute, on getting, must return the <a href=#text-track-cue-identifier>text track cue
- identifier</a> of the <a href=#text-track-cue>text track cue</a> that the
+ <p>The <dfn id=dom-texttrackcue-id title=dom-TextTrackCue-id><code>id</code></dfn> attribute, on getting, must return
+ the <a href=#text-track-cue-identifier>text track cue identifier</a> of the <a href=#text-track-cue>text track cue</a> that the
<code><a href=#texttrackcue>TextTrackCue</a></code> object represents. On setting, the <a href=#text-track-cue-identifier>text track cue
identifier</a> must be set to the new value.</p>
- <p>The <dfn id=dom-texttrackcue-starttime title=dom-TextTrackCue-startTime><code>startTime</code></dfn>
- attribute, on getting, must return the <a href=#text-track-cue-start-time>text track cue start
- time</a> of the <a href=#text-track-cue>text track cue</a> that the
- <code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-start-time>text track cue start
- time</a> must be set to the new value, interpreted in seconds.</p>
+ <p>The <dfn id=dom-texttrackcue-starttime title=dom-TextTrackCue-startTime><code>startTime</code></dfn> attribute, on getting,
+ must return the <a href=#text-track-cue-start-time>text track cue start time</a> of the <a href=#text-track-cue>text track cue</a> that the
+ <code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-start-time>text track cue
+ start time</a> must be set to the new value, interpreted in seconds.</p>
- <p>The <dfn id=dom-texttrackcue-endtime title=dom-TextTrackCue-endTime><code>endTime</code></dfn>
- attribute, on getting, must return the <a href=#text-track-cue-end-time>text track cue end
- time</a> of the <a href=#text-track-cue>text track cue</a> that the
+ <p>The <dfn id=dom-texttrackcue-endtime title=dom-TextTrackCue-endTime><code>endTime</code></dfn> attribute, on getting,
+ must return the <a href=#text-track-cue-end-time>text track cue end time</a> of the <a href=#text-track-cue>text track cue</a> that the
<code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-end-time>text track cue end
time</a> must be set to the new value, interpreted in seconds.</p>
- <p>The <dfn id=dom-texttrackcue-pauseonexit title=dom-TextTrackCue-pauseOnExit><code>pauseOnExit</code></dfn>
- attribute, on getting, must return true if the <a href=#text-track-cue-pause-on-exit-flag>text track cue
- pause-on-exit flag</a> of the <a href=#text-track-cue>text track cue</a> that
- the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents is set; or false
- otherwise. On setting, the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit
- flag</a> must be set if the new value is true, and must be unset
- otherwise.</p>
+ <p>The <dfn id=dom-texttrackcue-pauseonexit title=dom-TextTrackCue-pauseOnExit><code>pauseOnExit</code></dfn> attribute, on
+ getting, must return true if the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a> of the <a href=#text-track-cue>text
+ track cue</a> that the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents is set; or false otherwise.
+ On setting, the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a> must be set if the new value is
+ true, and must be unset otherwise.</p>
</div>
<h6 id=text-tracks-describing-chapters><span class=secno>4.8.10.12.6 </span>Text tracks describing chapters</h6>
-<!--CLEANUP-->
- <p>Chapters are segments of a <a href=#media-resource>media resource</a> with a
- given title. Chapters can be nested, in the same way that sections
- in a document outline can have subsections.</p>
+ <p>Chapters are segments of a <a href=#media-resource>media resource</a> with a given title. Chapters can be
+ nested, in the same way that sections in a document outline can have subsections.</p>
- <p>Each <a href=#text-track-cue>text track cue</a> in a <a href=#text-track>text track</a>
- being used for describing chapters has three key features: the
- <a href=#text-track-cue-start-time>text track cue start time</a>, giving the start time of the
- chapter, the <a href=#text-track-cue-end-time>text track cue end time</a>, giving the end
- time of the chapter, and the <a href=#text-track-cue-text>text track cue text</a> giving
- the chapter title.</p>
+ <p>Each <a href=#text-track-cue>text track cue</a> in a <a href=#text-track>text track</a> being used for describing
+ chapters has three key features: the <a href=#text-track-cue-start-time>text track cue start time</a>, giving the start time
+ of the chapter, the <a href=#text-track-cue-end-time>text track cue end time</a>, giving the end time of the chapter, and
+ the <a href=#text-track-cue-text>text track cue text</a> giving the chapter title.</p>
<div class=impl>
- <p>The <dfn id=rules-for-constructing-the-chapter-tree-from-a-text-track>rules for constructing the chapter tree from a text
- track</dfn> are as follows. They produce a potentially nested list
- of chapters, each of which have a start time, end time, title, and a
- list of nested chapters. This algorithm discards cues that do not
- correctly nest within each other, or that are out of order.</p>
+ <p>The <dfn id=rules-for-constructing-the-chapter-tree-from-a-text-track>rules for constructing the chapter tree from a text track</dfn> are as follows. They
+ produce a potentially nested list of chapters, each of which have a start time, end time, title,
+ and a list of nested chapters. This algorithm discards cues that do not correctly nest within each
+ other, or that are out of order.</p>
- <ol><li><p>Let <var title="">list</var> be a copy of the <a href=#text-track-list-of-cues title="text track list of cues">list of cues</a> of the
- <a href=#text-track>text track</a> being processed.</li>
+ <ol><li><p>Let <var title="">list</var> be a copy of the <a href=#text-track-list-of-cues title="text track list of cues">list
+ of cues</a> of the <a href=#text-track>text track</a> being processed.</li>
- <li><p>Remove from <var title="">list</var> any <a href=#text-track-cue>text track
- cue</a> whose <a href=#text-track-cue-end-time>text track cue end time</a> is before its
- <a href=#text-track-cue-start-time>text track cue start time</a>.</li>
+ <li><p>Remove from <var title="">list</var> any <a href=#text-track-cue>text track cue</a> whose <a href=#text-track-cue-end-time>text
+ track cue end time</a> is before its <a href=#text-track-cue-start-time>text track cue start time</a>.</li>
- <li><p>Let <var title="">output</var> be an empty list of chapters,
- where a chapter is a record consisting of a start time, an end
- time, a title, and a (potentially empty) list of nested chapters.
- For the purpose of this algorithm, each chapter also has a parent
- chapter.</li>
+ <li><p>Let <var title="">output</var> be an empty list of chapters, where a chapter is a record
+ consisting of a start time, an end time, a title, and a (potentially empty) list of nested
+ chapters. For the purpose of this algorithm, each chapter also has a parent chapter.</li>
- <li><p>Let <var title="">current chapter</var> be a stand-in
- chapter whose start time is negative infinity, whose end time is
- positive infinity, and whose list of nested chapters is <var title="">output</var>. (This is just used to make the algorithm
- easier to describe.)</li>
+ <li><p>Let <var title="">current chapter</var> be a stand-in chapter whose start time is negative
+ infinity, whose end time is positive infinity, and whose list of nested chapters is <var title="">output</var>. (This is just used to make the algorithm easier to describe.)</li>
<!-- while not empty... -->
- <li><p><i>Loop</i>: If <var title="">list</var> is empty, jump to
- the step labeled <i>end</i>.</li>
+ <li><p><i>Loop</i>: If <var title="">list</var> is empty, jump to the step labeled
+ <i>end</i>.</li>
<!-- do... -->
- <li><p>Let <var title="">current cue</var> be the first cue in <var title="">list</var>, and then remove it from <var title="">list</var>.</li>
+ <li><p>Let <var title="">current cue</var> be the first cue in <var title="">list</var>, and then
+ remove it from <var title="">list</var>.</li>
- <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue
- start time</a> is less than the start time of <var title="">current chapter</var>, then return to the step labeled
+ <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue start time</a> is less than
+ the start time of <var title="">current chapter</var>, then return to the step labeled
<i>loop</i>.</p> <!-- out of order chapter -->
- <li><p>While <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue
- start time</a> is greater than or equal to <var title="">current
- chapter</var>'s end time, let <var title="">current chapter</var>
- be <var title="">current chapter</var>'s parent chapter.</li>
+ <li><p>While <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue start time</a> is greater
+ than or equal to <var title="">current chapter</var>'s end time, let <var title="">current
+ chapter</var> be <var title="">current chapter</var>'s parent chapter.</li>
- <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-end-time>text track cue
- end time</a> is greater than the end time of <var title="">current chapter</var>, then return to the step labeled
+ <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-end-time>text track cue end time</a> is greater than
+ the end time of <var title="">current chapter</var>, then return to the step labeled
<i>loop</i>.</p> <!-- misnested chapter -->
- <li><p>Create a new chapter <var title="">new chapter</var>, whose
- start time is <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track
- cue start time</a>, whose end time is <var title="">current
- cue</var>'s <a href=#text-track-cue-end-time>text track cue end time</a>, whose title is
- <var title="">current cue</var>'s <a href=#text-track-cue-text>text track cue text</a>
- interpreted according to its <a href=#rules-for-rendering-the-cue-in-isolation>rules for rendering the cue in isolation</a>, and whose
- list of nested chapters is empty.</p>
+ <li>
+ <p>Create a new chapter <var title="">new chapter</var>, whose start time is <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue start time</a>, whose end time is <var title="">current cue</var>'s <a href=#text-track-cue-end-time>text track cue end time</a>, whose title is <var title="">current cue</var>'s <a href=#text-track-cue-text>text track cue text</a> interpreted according to its
+ <a href=#rules-for-rendering-the-cue-in-isolation>rules for rendering the cue in isolation</a>, and whose list of nested chapters is
+ empty.</p>
+
<p class=note>For WebVTT, the <a href=#rules-for-rendering-the-cue-in-isolation>rules for rendering the cue in isolation</a> are the
<a href=#rules-for-interpreting-webvtt-cue-text>rules for interpreting WebVTT cue text</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
</li>
- <li><p>Append <var title="">new chapter</var> to <var title="">current chapter</var>'s list of nested chapters, and let
- <var title="">current chapter</var> be <var title="">new
- chapter</var>'s parent.</li>
+ <li><p>Append <var title="">new chapter</var> to <var title="">current chapter</var>'s list of
+ nested chapters, and let <var title="">current chapter</var> be <var title="">new chapter</var>'s
+ parent.</li>
- <li><p>Let <var title="">current chapter</var> be <var title="">new
- chapter</var>.</li>
+ <li><p>Let <var title="">current chapter</var> be <var title="">new chapter</var>.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>
<!-- ...end while -->
@@ -31684,11 +31627,10 @@
<div class=example>
- <p>The following snippet of a <a href=#webvtt-file>WebVTT file</a> shows how
- nested chapters can be marked up. The file describes three
- 50-minute chapters, "Astrophysics", "Computational Physics", and
- "General Relativity". The first has three subchapters, the second
- has four, and the third has two. <a href=#refsWEBVTT>[WEBVTT]</a></p>
+ <p>The following snippet of a <a href=#webvtt-file>WebVTT file</a> shows how nested chapters can be marked
+ up. The file describes three 50-minute chapters, "Astrophysics", "Computational Physics", and
+ "General Relativity". The first has three subchapters, the second has four, and the third has
+ two. <a href=#refsWEBVTT>[WEBVTT]</a></p>
<pre>WEBVTT
@@ -31735,26 +31677,19 @@
<h6 id=cue-events><span class=secno>4.8.10.12.7 </span>Event definitions</h6>
- <p>The following are the <a href=#event-handlers>event handlers</a> that (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) must be
- supported, as IDL attributes, by all objects implementing the
- <code><a href=#texttracklist>TextTrackList</a></code> interface:</p>
+ <p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
+ attributes, by all objects implementing the <code><a href=#texttracklist>TextTrackList</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-addtrack>addtrack</code>
<tr><td><dfn id=handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-removetrack>removetrack</code>
- </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) must be supported, as IDL attributes, by all
- objects implementing the <code><a href=#texttrack>TextTrack</a></code> interface:</p>
+ </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
+ attributes, by all objects implementing the <code><a href=#texttrack>TextTrack</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-texttrack-oncuechange title=handler-TextTrack-oncuechange><code>oncuechange</code></dfn> <td> <code title=event-cuechange>cuechange</code>
- </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) must be supported, as IDL attributes, by all
- objects implementing the <code><a href=#texttrackcue>TextTrackCue</a></code> interface:</p>
+ </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
+ attributes, by all objects implementing the <code><a href=#texttrackcue>TextTrackCue</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-texttrackcue-onenter title=handler-TextTrackCue-onenter><code>onenter</code></dfn> <td> <code title=event-enter>enter</code>
@@ -66854,15 +66789,14 @@
<p>Otherwise:</p>
-<!--CLEANUP-->
<p>If the new resource is to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and there are <a href=#relevant-application-cache title="relevant
application cache">relevant application caches</a> that are identified by a URL with the
<a href=#same-origin>same origin</a> as the URL in question, and that have this URL as one of their entries,
excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose
<a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-fast title=concept-appcache-mode-fast>fast</a>, and the user agent is not in a mode where it
- will avoid using <a href=#application-cache title="application cache">application caches</a> then <a href=#fetch>fetch</a> the resource
- from the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of
- those that match.</p>
+ will avoid using <a href=#application-cache title="application cache">application caches</a> then
+ <a href=#fetch>fetch</a> the resource from the <a href=#concept-appcache-selection title=concept-appcache-selection>most
+ appropriate application cache</a> of those that match.</p>
<p class=example>For example, imagine an HTML page with an associated application cache
displaying an image and a form, where the image is also used by several other application
@@ -66935,8 +66869,8 @@
<li>
- <p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
- using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback namespace</a> of one or more
+ <p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an
+ <a href=#application-cache>application cache</a>, and was to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback namespace</a> of one or more
<a href=#relevant-application-cache title="relevant application cache">relevant application caches</a>, and the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of those that match
does not have an entry in its <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
whitelist</a> that has the <a href=#same-origin>same origin</a> as the resource's URL and that is a
@@ -66969,12 +66903,13 @@
<li>
-<!--CLEANUP--><!--swap-->
- <p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
- using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and
- there are <a href=#relevant-application-cache title="relevant application cache">relevant application caches</a> that are
- identified by a URL with the <a href=#same-origin>same origin</a> as the URL in question, and that have this
- URL as one of their entries, excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose <a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-prefer-online title=concept-appcache-mode-prefer-online>prefer-online</a>, and the user didn't cancel the
+<!--XXXswap-->
+ <p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an
+ <a href=#application-cache>application cache</a>, and was to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and there are <a href=#relevant-application-cache title="relevant
+ application cache">relevant application caches</a> that are identified by a URL with the
+ <a href=#same-origin>same origin</a> as the URL in question, and that have this URL as one of their entries,
+ excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose
+ <a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-prefer-online title=concept-appcache-mode-prefer-online>prefer-online</a>, and the user didn't cancel the
navigation attempt during the earlier step, and the navigation attempt failed (e.g. the server
returned a 4xx or 5xx status code <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
equivalent</a>, or there was a DNS error), then:</p>
@@ -76328,50 +76263,43 @@
<div class=impl>
-<!--CLEANUP-->
- <p>The <dfn id=dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer><code>dataTransfer</code></dfn>
- attribute of the <code><a href=#dragevent>DragEvent</a></code> interface must return the
- value it was initialized to. When the object is created, this
- attribute must be initialized to null. It represents the context
- information for the event.</p>
+ <p>The <dfn id=dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer><code>dataTransfer</code></dfn> attribute of the
+ <code><a href=#dragevent>DragEvent</a></code> interface must return the value it was initialized to. When the object is
+ created, this attribute must be initialized to null. It represents the context information for the
+ event.</p>
</div>
<div class=impl>
- <p>When a user agent is required to <dfn id=fire-a-dnd-event>fire a DND event</dfn>
- named <var title="">e</var> at an element, using a particular
- <a href=#drag-data-store>drag data store</a>, the user agent must run the following
+ <p>When a user agent is required to <dfn id=fire-a-dnd-event>fire a DND event</dfn> named <var title="">e</var> at an
+ element, using a particular <a href=#drag-data-store>drag data store</a>, the user agent must run the following
steps:</p>
<ol><li>
- <p>If <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, set the <a href=#drag-data-store-mode>drag data
- store mode</a> to the <a href=#concept-dnd-rw title=concept-dnd-rw>read/write
+ <p>If <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, set the
+ <a href=#drag-data-store-mode>drag data store mode</a> to the <a href=#concept-dnd-rw title=concept-dnd-rw>read/write
mode</a>.</p>
- <p>If <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code>, set the <a href=#drag-data-store-mode>drag data store
- mode</a> to the <a href=#concept-dnd-ro title=concept-dnd-ro>read-only
- mode</a>.</p>
+ <p>If <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code>, set the <a href=#drag-data-store-mode>drag data
+ store mode</a> to the <a href=#concept-dnd-ro title=concept-dnd-ro>read-only mode</a>.</p>
</li>
- <li><p>Let <var title="">dataTransfer</var> be a newly created
- <code><a href=#datatransfer>DataTransfer</a></code> object associated with the given
- <a href=#drag-data-store>drag data store</a>.</li>
+ <li><p>Let <var title="">dataTransfer</var> be a newly created <code><a href=#datatransfer>DataTransfer</a></code> object
+ associated with the given <a href=#drag-data-store>drag data store</a>.</li>
- <li><p id=effectAllowed-initialization>Set the <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
- attribute to the <a href=#drag-data-store>drag data store</a>'s <a href=#drag-data-store-allowed-effects-state>drag data
- store allowed effects state</a>.</li>
+ <li><p id=effectAllowed-initialization>Set the <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code> attribute to the <a href=#drag-data-store>drag data
+ store</a>'s <a href=#drag-data-store-allowed-effects-state>drag data store allowed effects state</a>.</li>
<li>
- <p id=dropEffect-initialization>Set the <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code> attribute to
- "<code title="">none</code>" if <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, <code title=event-drag><a href=#event-drag>drag</a></code>, <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, or <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>; to the value
- corresponding to the <a href=#current-drag-operation>current drag operation</a> if <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></code>; and to a value based on the
- <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
- attribute's value and to the drag-and-drop source, as given by the
- following table, otherwise (i.e. if <var title="">e</var> is <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> or <code title=event-dragover><a href=#event-dragover>dragover</a></code>):</p>
+ <p id=dropEffect-initialization>Set the <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code> attribute to "<code title="">none</code>"
+ if <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, <code title=event-drag><a href=#event-drag>drag</a></code>, <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, or <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>; to the value corresponding to the <a href=#current-drag-operation>current drag
+ operation</a> if <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></code>; and to a value based on the <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code> attribute's value and to the
+ drag-and-drop source, as given by the following table, otherwise (i.e. if <var title="">e</var>
+ is <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> or <code title=event-dragover><a href=#event-dragover>dragover</a></code>):</p>
<table><thead><tr><th><code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code></th>
<th><code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code></th>
@@ -76399,17 +76327,15 @@
<td>"<code title="">link</code>", or, <a href=#concept-platform-dropeffect-override title=concept-platform-dropEffect-override>if appropriate</a>, either "<code title="">copy</code>" or "<code title="">move</code>"</td>
<tr><td>Any other case</td>
<td>"<code title="">copy</code>", or, <a href=#concept-platform-dropeffect-override title=concept-platform-dropEffect-override>if appropriate</a>, either "<code title="">link</code>" or "<code title="">move</code>"</td>
- </table><p>Where the table above provides <dfn id=concept-platform-dropeffect-override title=concept-platform-dropEffect-override>possibly appropriate
- alternatives</dfn>, user agents may instead use the listed
- alternative values if platform conventions dictate that the user
- has requested those alternate effects.</p>
+ </table><p>Where the table above provides <dfn id=concept-platform-dropeffect-override title=concept-platform-dropEffect-override>possibly
+ appropriate alternatives</dfn>, user agents may instead use the listed alternative values if
+ platform conventions dictate that the user has requested those alternate effects.</p>
- <p class=example>For example, Windows platform conventions are
- such that dragging while holding the "alt" key indicates a
- preference for linking the data, rather than moving or copying it.
- Therefore, on a Windows system, if "<code title="">link</code>" is
- an option according to the table above while the "alt" key is
- depressed, the user agent could select that instead of "<code title="">copy</code>" or "<code title="">move</code>".</p>
+ <p class=example>For example, Windows platform conventions are such that dragging while
+ holding the "alt" key indicates a preference for linking the data, rather than moving or copying
+ it. Therefore, on a Windows system, if "<code title="">link</code>" is an option according to
+ the table above while the "alt" key is depressed, the user agent could select that instead of
+ "<code title="">copy</code>" or "<code title="">move</code>".</p>
</li>
@@ -76417,30 +76343,26 @@
<p>Create a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> <code><a href=#dragevent>DragEvent</a></code> object
and initialize it to have the given name <var title="">e</var>, to bubble, to be cancelable
- unless <var title="">e</var> is <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>, or <code title=event-dragend><a href=#event-dragend>dragend</a></code>, and to have the <code title=dom-UIEvent-detail><a href=#dom-uievent-detail>detail</a></code> attribute initialized to zero, the mouse and key
- attributes initialized according to the state of the input devices as they would be for user
- interaction events, the <code title="">relatedTarget</code> attribute initialized to null, and
- the <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code> attribute initialized to <var title="">dataTransfer</var>, the <code><a href=#datatransfer>DataTransfer</a></code> object created above.</p>
+ unless <var title="">e</var> is <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>, or <code title=event-dragend><a href=#event-dragend>dragend</a></code>, and to
+ have the <code title=dom-UIEvent-detail><a href=#dom-uievent-detail>detail</a></code> attribute initialized to zero, the mouse
+ and key attributes initialized according to the state of the input devices as they would be for
+ user interaction events, the <code title="">relatedTarget</code> attribute initialized to null,
+ and the <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code> attribute initialized to
+ <var title="">dataTransfer</var>, the <code><a href=#datatransfer>DataTransfer</a></code> object created above.</p>
<!-- interaction event spec point -->
- <p>If there is no relevant pointing device, the object must have
- its <code title="">screenX</code>, <code title="">screenY</code>,
- <code title="">clientX</code>, <code title="">clientY</code>, and
- <code title="">button</code> attributes set to 0.</p>
+ <p>If there is no relevant pointing device, the object must have its <code title="">screenX</code>, <code title="">screenY</code>, <code title="">clientX</code>, <code title="">clientY</code>, and <code title="">button</code> attributes set to 0.</p>
</li>
<li><p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> the newly created
<code><a href=#dragevent>DragEvent</a></code> object at the specified target element.</li>
- <li><p>Set the <a href=#drag-data-store-allowed-effects-state>drag data store allowed effects state</a>
- to the current value of <var title="">dataTransfer</var>'s <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
- attribute. (It can only have changed value if <var title="">e</var>
- is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>.)</li>
+ <li><p>Set the <a href=#drag-data-store-allowed-effects-state>drag data store allowed effects state</a> to the current value of <var title="">dataTransfer</var>'s <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
+ attribute. (It can only have changed value if <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>.)</li>
- <li><p>Set the <a href=#drag-data-store-mode>drag data store mode</a> back to the <a href=#concept-dnd-p title=concept-dnd-p>protected mode</a> if it was changed in
- the first step.</li>
+ <li><p>Set the <a href=#drag-data-store-mode>drag data store mode</a> back to the <a href=#concept-dnd-p title=concept-dnd-p>protected mode</a> if it was changed in the first step.</li>
<li><p>Break the association between <var title="">dataTransfer</var> and the <a href=#drag-data-store>drag data
store</a>.</li>
@@ -76452,67 +76374,54 @@
<h4 id=drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-drop processing model</h4>
- <p>When the user attempts to begin a drag operation, the user agent
- must run the following steps. User agents must act as if these steps
- were run even if the drag actually started in another document or
- application and the user agent was not aware that the drag was
- occurring until it intersected with a document under the user agent's
- purview.</p>
+ <p>When the user attempts to begin a drag operation, the user agent must run the following steps.
+ User agents must act as if these steps were run even if the drag actually started in another
+ document or application and the user agent was not aware that the drag was occurring until it
+ intersected with a document under the user agent's purview.</p>
<ol><li>
<p>Determine what is being dragged, as follows:</p>
- <p>If the drag operation was invoked on a selection, then it is
- the selection that is being dragged.</p>
+ <p>If the drag operation was invoked on a selection, then it is the selection that is being
+ dragged.</p>
- <p>Otherwise, if the drag operation was invoked on a
- <code><a href=#document>Document</a></code>, it is the first element, going up the
- ancestor chain, starting at the node that the user tried to drag,
- that has the IDL attribute <code title=dom-draggable><a href=#dom-draggable>draggable</a></code> set to true. If there is no
- such element, then nothing is being dragged; abort these steps,
- the drag-and-drop operation is never started.</p>
+ <p>Otherwise, if the drag operation was invoked on a <code><a href=#document>Document</a></code>, it is the first
+ element, going up the ancestor chain, starting at the node that the user tried to drag, that has
+ the IDL attribute <code title=dom-draggable><a href=#dom-draggable>draggable</a></code> set to true. If there is no such
+ element, then nothing is being dragged; abort these steps, the drag-and-drop operation is never
+ started.</p>
- <p>Otherwise, the drag operation was invoked outside the user
- agent's purview. What is being dragged is defined by the document
- or application where the drag was started.</p>
+ <p>Otherwise, the drag operation was invoked outside the user agent's purview. What is being
+ dragged is defined by the document or application where the drag was started.</p>
- <p class=note><code><a href=#the-img-element>img</a></code> elements and <code><a href=#the-a-element>a</a></code>
- elements with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
- attribute have their <code title=dom-draggable><a href=#dom-draggable>draggable</a></code>
- attribute set to true by default.</p>
+ <p class=note><code><a href=#the-img-element>img</a></code> elements and <code><a href=#the-a-element>a</a></code> elements with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute have their <code title=dom-draggable><a href=#dom-draggable>draggable</a></code> attribute set to true by default.</p>
</li>
- <li><p><a href=#create-a-drag-data-store>Create a drag data store</a>. All the DND events
- fired subsequently by the steps in this section must use this
- <a href=#drag-data-store>drag data store</a>.</li>
+ <li><p><a href=#create-a-drag-data-store>Create a drag data store</a>. All the DND events fired subsequently by the steps
+ in this section must use this <a href=#drag-data-store>drag data store</a>.</li>
<li>
- <p>Establish which DOM node is the <dfn id=source-node>source node</dfn>, as
- follows:</p>
+ <p>Establish which DOM node is the <dfn id=source-node>source node</dfn>, as follows:</p>
- <p>If it is a selection that is being dragged, then the
- <a href=#source-node>source node</a> is the <code><a href=#text>Text</a></code> node that the
- user started the drag on (typically the <code><a href=#text>Text</a></code> node
- that the user originally clicked). If the user did not specify a
- particular node, for example if the user just told the user agent
- to begin a drag of "the selection", then the <a href=#source-node>source
- node</a> is the first <code><a href=#text>Text</a></code> node containing a part
- of the selection.</p>
+ <p>If it is a selection that is being dragged, then the <a href=#source-node>source node</a> is the
+ <code><a href=#text>Text</a></code> node that the user started the drag on (typically the <code><a href=#text>Text</a></code> node
+ that the user originally clicked). If the user did not specify a particular node, for example if
+ the user just told the user agent to begin a drag of "the selection", then the <a href=#source-node>source
+ node</a> is the first <code><a href=#text>Text</a></code> node containing a part of the selection.</p>
- <p>Otherwise, if it is an element that is being dragged, then the
- <a href=#source-node>source node</a> is the element that is being dragged.</p>
+ <p>Otherwise, if it is an element that is being dragged, then the <a href=#source-node>source node</a> is
+ the element that is being dragged.</p>
- <p>Otherwise, the <a href=#source-node>source node</a> is part of another
- document or application. When this specification requires that an
- event be dispatched at the <a href=#source-node>source node</a> in this case,
- the user agent must instead follow the platform-specific
- conventions relevant to that situation.</p>
+ <p>Otherwise, the <a href=#source-node>source node</a> is part of another document or application. When this
+ specification requires that an event be dispatched at the <a href=#source-node>source node</a> in this case,
+ the user agent must instead follow the platform-specific conventions relevant to that
+ situation.</p>
- <p class=note>Multiple events are fired on the <a href=#source-node>source
- node</a> during the course of the drag-and-drop operation.</p>
+ <p class=note>Multiple events are fired on the <a href=#source-node>source node</a> during the course of
+ the drag-and-drop operation.</p>
</li>
@@ -76520,21 +76429,19 @@
<p>Determine the <dfn id=list-of-dragged-nodes>list of dragged nodes</dfn>, as follows:</p>
- <p>If it is a selection that is being dragged, then the <a href=#list-of-dragged-nodes>list
- of dragged nodes</a> contains, in <a href=#tree-order>tree order</a>,
- every node that is partially or completely included in the
+ <p>If it is a selection that is being dragged, then the <a href=#list-of-dragged-nodes>list of dragged nodes</a>
+ contains, in <a href=#tree-order>tree order</a>, every node that is partially or completely included in the
selection (including all their ancestors).</p>
- <p>Otherwise, the <a href=#list-of-dragged-nodes>list of dragged nodes</a> contains only
- the <a href=#source-node>source node</a>, if any.</p>
+ <p>Otherwise, the <a href=#list-of-dragged-nodes>list of dragged nodes</a> contains only the <a href=#source-node>source node</a>,
+ if any.</p>
</li>
<li>
- <p>If it is a selection that is being dragged, then add an item to
- the <a href=#drag-data-store-item-list>drag data store item list</a>, with its properties
- set as follows:</p>
+ <p>If it is a selection that is being dragged, then add an item to the <a href=#drag-data-store-item-list>drag data store
+ item list</a>, with its properties set as follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd>"<code>text/plain</code>"</dd>
@@ -76545,9 +76452,8 @@
<dt>The actual data</dt>
<dd>The text of the selection</dd>
- </dl><p>Otherwise, if any files are being dragged, then add one item
- per file to the <a href=#drag-data-store-item-list>drag data store item list</a>, with their
- properties set as follows:</p>
+ </dl><p>Otherwise, if any files are being dragged, then add one item per file to the <a href=#drag-data-store-item-list>drag data
+ store item list</a>, with their properties set as follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd>The MIME type of the file, if known, or "<code>application/octet-stream</code>" otherwise.</dd>
@@ -76558,23 +76464,18 @@
<dt>The actual data</dt>
<dd>The file's contents and name.</dd>
- </dl><p class=note>Dragging files can currently only happen from
- outside a <a href=#browsing-context>browsing context</a>, for example from a file
- system manager application.</p>
+ </dl><p class=note>Dragging files can currently only happen from outside a <a href=#browsing-context>browsing
+ context</a>, for example from a file system manager application.</p>
- <p>If the drag initiated outside of the application, the user
- agent must add items to the <a href=#drag-data-store-item-list>drag data store item list</a>
- as appropriate for the data being dragged, honoring platform
- conventions where appropriate; however, if the platform
- conventions do not use <a href=#mime-type title="MIME type">MIME types</a>
- to label dragged data, the user agent must make a best-effort
- attempt to map the types to MIME types, and, in any case, all the
- <a href=#the-drag-data-item-type-string title="the drag data item type string">drag data item type
- strings</a> must be <a href=#converted-to-ascii-lowercase>converted to ASCII
+ <p>If the drag initiated outside of the application, the user agent must add items to the
+ <a href=#drag-data-store-item-list>drag data store item list</a> as appropriate for the data being dragged, honoring
+ platform conventions where appropriate; however, if the platform conventions do not use <a href=#mime-type title="MIME type">MIME types</a> to label dragged data, the user agent must make a
+ best-effort attempt to map the types to MIME types, and, in any case, all the <a href=#the-drag-data-item-type-string title="the
+ drag data item type string">drag data item type strings</a> must be <a href=#converted-to-ascii-lowercase>converted to ASCII
lowercase</a>.</p>
- <p>User agents may also add one or more items representing the
- selection or dragged element(s) in other forms, e.g. as HTML.</p>
+ <p>User agents may also add one or more items representing the selection or dragged element(s)
+ in other forms, e.g. as HTML.</p>
</li>
@@ -76582,11 +76483,9 @@
<li>
- <p>If the <a href=#list-of-dragged-nodes>list of dragged nodes</a> is not empty, then
- <a href=#extracting-json title="extracting JSON">extract the microdata from those
- nodes into a JSON form</a>, and add one item to the <a href=#drag-data-store-item-list>drag
- data store item list</a>, with its properties set as
- follows:</p>
+ <p>If the <a href=#list-of-dragged-nodes>list of dragged nodes</a> is not empty, then <a href=#extracting-json title="extracting
+ JSON">extract the microdata from those nodes into a JSON form</a>, and add one item to the
+ <a href=#drag-data-store-item-list>drag data store item list</a>, with its properties set as follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd><code><a href=#application/microdata+json>application/microdata+json</a></code></dd>
@@ -76603,37 +76502,37 @@
<p>Run the following substeps:</p>
- <ol><li><p>Let <var title="">urls</var> be an empty list of <a href=#absolute-url title="absolute URL">absolute URLs</a>.</li>
+ <ol><li><p>Let <var title="">urls</var> be an empty list of <a href=#absolute-url title="absolute URL">absolute
+ URLs</a>.</li>
<li>
- <p>For each <var title="">node</var> in the <a href=#list-of-dragged-nodes>list of
- dragged nodes</a>:</p>
+ <p>For each <var title="">node</var> in the <a href=#list-of-dragged-nodes>list of dragged nodes</a>:</p>
<dl><dt>If the node is an <code><a href=#the-a-element>a</a></code> element with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</dt>
- <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a url">resolving</a> the element's <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> content attribute
- relative to the element.</dd>
+ <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a
+ url">resolving</a> the element's <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> content
+ attribute relative to the element.</dd>
- <dt>If the node is an <code><a href=#the-img-element>img</a></code> element with an <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute</dt>
+ <dt>If the node is an <code><a href=#the-img-element>img</a></code> element with an <code title=attr-img-src><a href=#attr-img-src>src</a></code>
+ attribute</dt>
- <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a url">resolving</a> the element's <code title=attr-img-src><a href=#attr-img-src>src</a></code> content attribute relative to
- the element.</dd>
+ <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a
+ url">resolving</a> the element's <code title=attr-img-src><a href=#attr-img-src>src</a></code> content attribute
+ relative to the element.</dd>
<!-- DND-v2: more -->
</dl></li>
- <li><p>If <var title="">urls</var> is still empty, abort these
- substeps.</li>
+ <li><p>If <var title="">urls</var> is still empty, abort these substeps.</li>
- <li><p>Let <var title="">url string</var> be the result of
- concatenating the strings in <var title="">urls</var>, in the
- order they were added, separated by a U+000D CARRIAGE RETURN
- U+000A LINE FEED character pair (CRLF).</li>
+ <li><p>Let <var title="">url string</var> be the result of concatenating the strings in <var title="">urls</var>, in the order they were added, separated by a U+000D CARRIAGE RETURN U+000A
+ LINE FEED character pair (CRLF).</li>
- <li><p>Add one item to the <a href=#drag-data-store-item-list>drag data store item
- list</a>, with its properties set as follows:</p>
+ <li><p>Add one item to the <a href=#drag-data-store-item-list>drag data store item list</a>, with its properties set as
+ follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd><code>text/uri-list</code></dd>
@@ -76650,131 +76549,113 @@
<li>
- <p>Update the <a href=#drag-data-store-default-feedback>drag data store default feedback</a> as
- appropriate for the user agent (if the user is dragging the
- selection, then the selection would likely be the basis for this
- feedback; if the user is dragging an element, then that element's
- rendering would be used; if the drag began outside the user agent,
- then the platform conventions for determining the drag feedback
- should be used).</p>
+ <p>Update the <a href=#drag-data-store-default-feedback>drag data store default feedback</a> as appropriate for the user agent
+ (if the user is dragging the selection, then the selection would likely be the basis for this
+ feedback; if the user is dragging an element, then that element's rendering would be used; if
+ the drag began outside the user agent, then the platform conventions for determining the drag
+ feedback should be used).</p>
</li>
<li>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> at the <a href=#source-node>source
- node</a>.</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> at the
+ <a href=#source-node>source node</a>.</p>
- <p>If the event is canceled, then the drag-and-drop operation
- should not occur; abort these steps.</p> <!-- only a should
- because the UA can always allow the user to drag without the page
+ <p>If the event is canceled, then the drag-and-drop operation should not occur; abort these
+ steps.</p> <!-- only a should because the UA can always allow the user to drag without the page
knowing -->
- <p class=note>Since events with no event listeners registered
- are, almost by definition, never canceled, drag-and-drop is always
- available to the user if the author does not specifically prevent
- it.</p>
+ <p class=note>Since events with no event listeners registered are, almost by definition, never
+ canceled, drag-and-drop is always available to the user if the author does not specifically
+ prevent it.</p>
</li>
<li>
- <p><a href=#initiate-the-drag-and-drop-operation>Initiate the drag-and-drop operation</a> in a manner
- consistent with platform conventions, and as described below.</p>
+ <p><a href=#initiate-the-drag-and-drop-operation>Initiate the drag-and-drop operation</a> in a manner consistent with platform
+ conventions, and as described below.</p>
- <p id=base-dnd-feedback>The drag-and-drop feedback must be
- generated from the first of the following sources that is
- available:</p>
+ <p id=base-dnd-feedback>The drag-and-drop feedback must be generated from the first of the
+ following sources that is available:</p>
- <ol><li>The <a href=#drag-data-store-bitmap>drag data store bitmap</a>, if any. In this
- case, the <a href=#drag-data-store-hot-spot-coordinate>drag data store hot spot coordinate</a> should
- be used as hints for where to put the cursor relative to the
- resulting image. The values are expressed as distances in CSS
- pixels from the left side and from the top side of the image
- respectively. <a href=#refsCSS>[CSS]</a></li>
+ <ol><li>The <a href=#drag-data-store-bitmap>drag data store bitmap</a>, if any. In this case, the <a href=#drag-data-store-hot-spot-coordinate>drag data store
+ hot spot coordinate</a> should be used as hints for where to put the cursor relative to the
+ resulting image. The values are expressed as distances in CSS pixels from the left side and
+ from the top side of the image respectively. <a href=#refsCSS>[CSS]</a></li>
<li>The <a href=#drag-data-store-default-feedback>drag data store default feedback</a>.</li>
</ol></li>
- </ol><p>From the moment that the user agent is to <dfn id=initiate-the-drag-and-drop-operation>initiate the
- drag-and-drop operation</dfn>, until the end of the drag-and-drop
- operation, device input events (e.g. mouse and keyboard events) must
- be suppressed.</p>
+ </ol><p>From the moment that the user agent is to <dfn id=initiate-the-drag-and-drop-operation>initiate the drag-and-drop operation</dfn>,
+ until the end of the drag-and-drop operation, device input events (e.g. mouse and keyboard events)
+ must be suppressed.</p>
- <p>During the drag operation, the element directly indicated by the
- user as the drop target is called the <dfn id=immediate-user-selection>immediate user
- selection</dfn>. (Only elements can be selected by the user; other
- nodes must not be made available as drop targets.) However, the
- <a href=#immediate-user-selection>immediate user selection</a> is not necessarily the
- <dfn id=current-target-element>current target element</dfn>, which is the element currently
- selected for the drop part of the drag-and-drop operation.</p>
+ <p>During the drag operation, the element directly indicated by the user as the drop target is
+ called the <dfn id=immediate-user-selection>immediate user selection</dfn>. (Only elements can be selected by the user; other
+ nodes must not be made available as drop targets.) However, the <a href=#immediate-user-selection>immediate user
+ selection</a> is not necessarily the <dfn id=current-target-element>current target element</dfn>, which is the element
+ currently selected for the drop part of the drag-and-drop operation.</p>
- <p>The <a href=#immediate-user-selection>immediate user selection</a> changes as the user
- selects different elements (either by pointing at them with a
- pointing device, or by selecting them in some other way). The
- <a href=#current-target-element>current target element</a> changes when the <a href=#immediate-user-selection>immediate
- user selection</a> changes, based on the results of event
- listeners in the document, as described below.</p>
+ <p>The <a href=#immediate-user-selection>immediate user selection</a> changes as the user selects different elements
+ (either by pointing at them with a pointing device, or by selecting them in some other way). The
+ <a href=#current-target-element>current target element</a> changes when the <a href=#immediate-user-selection>immediate user selection</a>
+ changes, based on the results of event listeners in the document, as described below.</p>
- <p>Both the <a href=#current-target-element>current target element</a> and the
- <a href=#immediate-user-selection>immediate user selection</a> can be null, which means no
- target element is selected. They can also both be elements in other
- (DOM-based) documents, or other (non-Web) programs altogether. (For
- example, a user could drag text to a word-processor.) The
- <a href=#current-target-element>current target element</a> is initially null.</p>
+ <p>Both the <a href=#current-target-element>current target element</a> and the <a href=#immediate-user-selection>immediate user selection</a> can
+ be null, which means no target element is selected. They can also both be elements in other
+ (DOM-based) documents, or other (non-Web) programs altogether. (For example, a user could drag
+ text to a word-processor.) The <a href=#current-target-element>current target element</a> is initially null.</p>
- <p>In addition, there is also a <dfn id=current-drag-operation>current drag operation</dfn>,
- which can take on the values "<code title="">none</code>", "<code title="">copy</code>", "<code title="">link</code>", and "<code title="">move</code>". Initially, it has the value "<code title="">none</code>". It is updated by the user agent as described
- in the steps below.</p>
+ <p>In addition, there is also a <dfn id=current-drag-operation>current drag operation</dfn>, which can take on the values
+ "<code title="">none</code>", "<code title="">copy</code>", "<code title="">link</code>", and
+ "<code title="">move</code>". Initially, it has the value "<code title="">none</code>". It is
+ updated by the user agent as described in the steps below.</p>
- <p>User agents must, as soon as the drag operation is <a href=#initiate-the-drag-and-drop-operation title="initiate the drag-and-drop operation">initiated</a> and
- every 350ms (±200ms) thereafter for as long as the drag
- operation is ongoing, <a href=#queue-a-task>queue a task</a> to perform the
- following steps in sequence:</p>
+ <p>User agents must, as soon as the drag operation is <a href=#initiate-the-drag-and-drop-operation title="initiate the drag-and-drop
+ operation">initiated</a> and every 350ms (±200ms) thereafter for as long as the drag
+ operation is ongoing, <a href=#queue-a-task>queue a task</a> to perform the following steps in sequence:</p>
<ol><li>
- <p>If the user agent is still performing the previous iteration of
- the sequence (if any) when the next iteration becomes due, abort
- these steps for this iteration (effectively "skipping missed
- frames" of the drag-and-drop operation).</p>
+ <p>If the user agent is still performing the previous iteration of the sequence (if any) when
+ the next iteration becomes due, abort these steps for this iteration (effectively "skipping
+ missed frames" of the drag-and-drop operation).</p>
</li>
<li>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-drag><a href=#event-drag>drag</a></code> event at the <a href=#source-node>source
- node</a>. If this event is canceled, the user agent must set
- the <a href=#current-drag-operation>current drag operation</a> to "<code title="">none</code>" (no drag operation).</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-drag><a href=#event-drag>drag</a></code> event at the
+ <a href=#source-node>source node</a>. If this event is canceled, the user agent must set the <a href=#current-drag-operation>current
+ drag operation</a> to "<code title="">none</code>" (no drag operation).</p>
</li>
<li>
- <p>If the <code title=event-drag><a href=#event-drag>drag</a></code> event was not
- canceled and the user has not ended the drag-and-drop operation,
- check the state of the drag-and-drop operation, as follows:</p>
+ <p>If the <code title=event-drag><a href=#event-drag>drag</a></code> event was not canceled and the user has not ended
+ the drag-and-drop operation, check the state of the drag-and-drop operation, as follows:</p>
<ol><li>
- <p>If the user is indicating a different <a href=#immediate-user-selection>immediate user
- selection</a> than during the last iteration (or if this is
- the first iteration), and if this <a href=#immediate-user-selection>immediate user
- selection</a> is not the same as the <a href=#current-target-element>current target
- element</a>, then <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code> at the <a href=#current-target-element>current target element</a>, and then
- update the <a href=#current-target-element>current target element</a> as follows:</p>
+ <p>If the user is indicating a different <a href=#immediate-user-selection>immediate user selection</a> than during the
+ last iteration (or if this is the first iteration), and if this <a href=#immediate-user-selection>immediate user
+ selection</a> is not the same as the <a href=#current-target-element>current target element</a>, then <a href=#fire-a-dnd-event>fire a
+ DND event</a> named <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code> at the <a href=#current-target-element>current
+ target element</a>, and then update the <a href=#current-target-element>current target element</a> as follows:</p>
<dl class=switch><dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is null</dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to null
- also.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to null also.</dd>
- <dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is in a
- non-DOM document or application</dt>
+ <dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is in a non-DOM document or
+ application</dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to the
- <a href=#immediate-user-selection>immediate user selection</a>.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to the <a href=#immediate-user-selection>immediate user
+ selection</a>.</dd>
<dt>Otherwise</dt>
@@ -76783,72 +76664,57 @@
<p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at the
<a href=#immediate-user-selection>immediate user selection</a>.</p>
- <p>If the event is canceled, then set the <a href=#current-target-element>current target
- element</a> to the <a href=#immediate-user-selection>immediate user
- selection</a>.</p>
+ <p>If the event is canceled, then set the <a href=#current-target-element>current target element</a> to the
+ <a href=#immediate-user-selection>immediate user selection</a>.</p>
- <p>Otherwise, run the appropriate step from the following
- list:</p>
+ <p>Otherwise, run the appropriate step from the following list:</p>
- <dl class=switch><dt>If the <a href=#immediate-user-selection>immediate user selection</a> is a text
- field (e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code>
- element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
- attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element,
- and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
- with <a href=#the-drag-data-item-type-string>the drag data item type string</a>
- "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item
- kind</a> <i>Plain Unicode string</i></dt>
+ <dl class=switch><dt>If the <a href=#immediate-user-selection>immediate user selection</a> is a text field (e.g.
+ <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an <a href=#editing-host>editing host</a> or
+ <a href=#editable>editable</a> element, and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
+ with <a href=#the-drag-data-item-type-string>the drag data item type string</a> "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the
+ drag data item kind</a> <i>Plain Unicode string</i></dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to the
- <a href=#immediate-user-selection>immediate user selection</a> anyway.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to the <a href=#immediate-user-selection>immediate user
+ selection</a> anyway.</dd>
- <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element
- with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute
- that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the
- <a href=#drag-data-store>drag data store</a></dt>
+ <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a></dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to the
- <a href=#immediate-user-selection>immediate user selection</a> anyway.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to the <a href=#immediate-user-selection>immediate user
+ selection</a> anyway.</dd>
- <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element
- that itself has an ancestor element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag
- data store</a></dt>
+ <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element that itself has an ancestor
+ element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a></dt>
<dd>
- <p>Let <var title="">new target</var> be the nearest
- (deepest) such ancestor element.</p>
+ <p>Let <var title="">new target</var> be the nearest (deepest) such ancestor element.</p>
- <p>If the <a href=#immediate-user-selection>immediate user selection</a> is <var title="">new target</var>, then leave the <a href=#current-target-element>current
- target element</a> unchanged.</p>
+ <p>If the <a href=#immediate-user-selection>immediate user selection</a> is <var title="">new target</var>, then
+ leave the <a href=#current-target-element>current target element</a> unchanged.</p>
- <p>Otherwise, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <var title="">new target</var>. Then, set the <a href=#current-target-element>current
- target element</a> to <var title="">new target</var>,
- regardless of whether that event was canceled or not.</p>
+ <p>Otherwise, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <var title="">new target</var>. Then, set the
+ <a href=#current-target-element>current target element</a> to <var title="">new target</var>, regardless of
+ whether that event was canceled or not.</p>
</dd>
- <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is
- <a href=#the-body-element-0>the body element</a></dt>
+ <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is <a href=#the-body-element-0>the body element</a></dt>
- <dd><p>Leave the <a href=#current-target-element>current target element</a>
- unchanged.</dd>
+ <dd><p>Leave the <a href=#current-target-element>current target element</a> unchanged.</dd>
<dt>Otherwise</dt>
<dd>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <a href=#the-body-element-0>the body
- element</a>, if there is one, or at the
- <code><a href=#document>Document</a></code> object, if not. Then, set the
- <a href=#current-target-element>current target element</a> to <a href=#the-body-element-0>the body
- element</a>, regardless of whether that event was
- canceled or not.</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at
+ <a href=#the-body-element-0>the body element</a>, if there is one, or at the <code><a href=#document>Document</a></code> object, if
+ not. Then, set the <a href=#current-target-element>current target element</a> to <a href=#the-body-element-0>the body element</a>,
+ regardless of whether that event was canceled or not.</p>
</dd>
@@ -76858,9 +76724,8 @@
<li>
- <p>If the previous step caused the <a href=#current-target-element>current target
- element</a> to change, and if the previous target element was
- not null or a part of a non-DOM document, then <a href=#fire-a-dnd-event>fire a DND
+ <p>If the previous step caused the <a href=#current-target-element>current target element</a> to change, and if the
+ previous target element was not null or a part of a non-DOM document, then <a href=#fire-a-dnd-event>fire a DND
event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at the previous target
element.</p>
@@ -76868,46 +76733,32 @@
<li>
- <p>If the <a href=#current-target-element>current target element</a> is a DOM element,
- then <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragover><a href=#event-dragover>dragover</a></code> at this <a href=#current-target-element>current
- target element</a>.</p>
+ <p>If the <a href=#current-target-element>current target element</a> is a DOM element, then <a href=#fire-a-dnd-event>fire a DND
+ event</a> named <code title=event-dragover><a href=#event-dragover>dragover</a></code> at this <a href=#current-target-element>current target
+ element</a>.</p>
- <p>If the <code title=event-dragover><a href=#event-dragover>dragover</a></code> event is
- not canceled, run the appropriate step from the following
- list:</p>
+ <p>If the <code title=event-dragover><a href=#event-dragover>dragover</a></code> event is not canceled, run the
+ appropriate step from the following list:</p>
- <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field
- (e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element
- whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element, and
- the <a href=#drag-data-store-item-list>drag data store item list</a> has an item with
- <a href=#the-drag-data-item-type-string>the drag data item type string</a>
- "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item
- kind</a> <i>Plain Unicode string</i></dt>
+ <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field (e.g. <code><a href=#the-textarea-element>textarea</a></code>,
+ or an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is
+ in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an <a href=#editing-host>editing host</a>
+ or <a href=#editable>editable</a> element, and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
+ with <a href=#the-drag-data-item-type-string>the drag data item type string</a> "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag
+ data item kind</a> <i>Plain Unicode string</i></dt>
- <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to either
- "<code title="">copy</code>" or "<code title="">move</code>",
- as appropriate given the platform conventions.</dd>
+ <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to either "<code title="">copy</code>" or
+ "<code title="">move</code>", as appropriate given the platform conventions.</dd>
- <dt>If the <a href=#current-target-element>current target element</a> is an element
- with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute
- that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the
- <a href=#drag-data-store>drag data store</a> and <a href=#concept-dropzone-operation title=concept-dropzone-operation>specifies an
- operation</a></dt>
+ <dt>If the <a href=#current-target-element>current target element</a> is an element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a> and <a href=#concept-dropzone-operation title=concept-dropzone-operation>specifies an operation</a></dt>
- <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to the
- operation <a href=#concept-dropzone-operation title=concept-dropzone-operation>specified</a> by the
- <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute of the
- <a href=#current-target-element>current target element</a>.</p>
+ <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to the operation <a href=#concept-dropzone-operation title=concept-dropzone-operation>specified</a> by the <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute of the <a href=#current-target-element>current target
+ element</a>.</p>
- <dt>If the <a href=#current-target-element>current target element</a> is an element
- with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute
- that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the
- <a href=#drag-data-store>drag data store</a> and does not <a href=#concept-dropzone-operation title=concept-dropzone-operation>specify an
- operation</a></dt>
+ <dt>If the <a href=#current-target-element>current target element</a> is an element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a> and does not
+ <a href=#concept-dropzone-operation title=concept-dropzone-operation>specify an operation</a></dt>
<dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to "<code title="">copy</code>".</p>
@@ -76940,18 +76791,16 @@
<li>
- <p>Otherwise, if the <a href=#current-target-element>current target element</a> is not
- a DOM element, use platform-specific mechanisms to determine
- what drag operation is being performed (none, copy, link, or
- move), and set the <i><a href=#current-drag-operation>current drag operation</a></i>
- accordingly.</p>
+ <p>Otherwise, if the <a href=#current-target-element>current target element</a> is not a DOM element, use
+ platform-specific mechanisms to determine what drag operation is being performed (none, copy,
+ link, or move), and set the <i><a href=#current-drag-operation>current drag operation</a></i> accordingly.</p>
</li>
<li>
- <p>Update the drag feedback (e.g. the mouse cursor) to match the
- <a href=#current-drag-operation>current drag operation</a>, as follows:</p>
+ <p>Update the drag feedback (e.g. the mouse cursor) to match the <a href=#current-drag-operation>current drag
+ operation</a>, as follows:</p>
<table><thead><tr><th>Drag operation</th>
<th>Feedback</th>
@@ -76969,34 +76818,30 @@
<li>
- <p>Otherwise, if the user ended the drag-and-drop operation (e.g.
- by releasing the mouse button in a mouse-driven drag-and-drop
- interface), or if the <code title=event-drag><a href=#event-drag>drag</a></code> event
- was canceled, then this will be the last iteration. Run the
- following steps, then stop the drag-and-drop operation:</p>
+ <p>Otherwise, if the user ended the drag-and-drop operation (e.g. by releasing the mouse button
+ in a mouse-driven drag-and-drop interface), or if the <code title=event-drag><a href=#event-drag>drag</a></code> event
+ was canceled, then this will be the last iteration. Run the following steps, then stop the
+ drag-and-drop operation:</p>
<ol><li>
- <p>If the <a href=#current-drag-operation>current drag operation</a> is "<code title="">none</code>" (no drag operation), or, if the user ended
- the drag-and-drop operation by canceling it (e.g. by hitting the
- <kbd>Escape</kbd> key), or if the <a href=#current-target-element>current target
- element</a> is null, then the drag operation failed. Run
- these substeps:</p>
+ <p>If the <a href=#current-drag-operation>current drag operation</a> is "<code title="">none</code>" (no drag
+ operation), or, if the user ended the drag-and-drop operation by canceling it (e.g. by hitting
+ the <kbd>Escape</kbd> key), or if the <a href=#current-target-element>current target element</a> is null, then the
+ drag operation failed. Run these substeps:</p>
<ol><li><p>Let <var title="">dropped</var> be false.</li>
- <li><p>If the <a href=#current-target-element>current target element</a> is a DOM
- element, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at it; otherwise, if
- it is not null, use platform-specific conventions for drag
- cancellation.</p>
+ <li><p>If the <a href=#current-target-element>current target element</a> is a DOM element, <a href=#fire-a-dnd-event>fire a DND
+ event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at it; otherwise, if it is
+ not null, use platform-specific conventions for drag cancellation.</p>
- </ol><p>Otherwise, the drag operation might be a success; run these
- substeps:</p>
+ </ol><p>Otherwise, the drag operation might be a success; run these substeps:</p>
<ol><li><p>Let <var title="">dropped</var> be true.</li>
- <li><p>If the <a href=#current-target-element>current target element</a> is a DOM
- element, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-drop><a href=#event-drop>drop</a></code> at it; otherwise, use
+ <li><p>If the <a href=#current-target-element>current target element</a> is a DOM element, <a href=#fire-a-dnd-event>fire a DND
+ event</a> named <code title=event-drop><a href=#event-drop>drop</a></code> at it; otherwise, use
platform-specific conventions for indicating a drop.</li>
<li>
@@ -77007,33 +76852,28 @@
object as it stood after the event <a href=#concept-event-dispatch title=concept-event-dispatch>dispatch</a>
finished.</p>
- <p>Otherwise, the event is not canceled; perform the event's
- default action, which depends on the exact target as
- follows:</p>
+ <p>Otherwise, the event is not canceled; perform the event's default action, which depends
+ on the exact target as follows:</p>
- <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text
- field (e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code>
- element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
- attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element,
- and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
- with <a href=#the-drag-data-item-type-string>the drag data item type string</a>
- "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item
- kind</a> <i>Plain Unicode string</i></dt>
+ <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field (e.g. <code><a href=#the-textarea-element>textarea</a></code>,
+ or an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute
+ is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an <a href=#editing-host>editing
+ host</a> or <a href=#editable>editable</a> element, and the <a href=#drag-data-store-item-list>drag data store item
+ list</a> has an item with <a href=#the-drag-data-item-type-string>the drag data item type string</a>
+ "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item kind</a> <i>Plain Unicode
+ string</i></dt>
- <dd><p>Insert the actual data of the first item in the
- <a href=#drag-data-store-item-list>drag data store item list</a> to have <a href=#the-drag-data-item-type-string title="the drag data item type string">a drag data item type
- string</a> of "<code>text/plain</code>" and <a href=#the-drag-data-item-kind title="the drag data item kind">a drag data item kind</a>
- that is <i>Plain Unicode string</i> into the text field or
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element in
- a manner consistent with platform-specific conventions (e.g.
- inserting it at the current mouse cursor position, or
+ <dd><p>Insert the actual data of the first item in the <a href=#drag-data-store-item-list>drag data store item
+ list</a> to have <a href=#the-drag-data-item-type-string title="the drag data item type string">a drag data item type
+ string</a> of "<code>text/plain</code>" and <a href=#the-drag-data-item-kind title="the drag data item kind">a drag
+ data item kind</a> that is <i>Plain Unicode string</i> into the text field or
+ <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element in a manner consistent with
+ platform-specific conventions (e.g. inserting it at the current mouse cursor position, or
inserting it at the end of the field).</dd>
<dt>Otherwise</dt>
- <dd><p>Reset the <a href=#current-drag-operation>current drag operation</a> to
- "<code title="">none</code>".</dd>
+ <dd><p>Reset the <a href=#current-drag-operation>current drag operation</a> to "<code title="">none</code>".</dd>
</dl></li>
@@ -77041,49 +76881,42 @@
<li>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragend><a href=#event-dragend>dragend</a></code> at the <a href=#source-node>source
- node</a>.</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragend><a href=#event-dragend>dragend</a></code> at the
+ <a href=#source-node>source node</a>.</p>
</li>
<li>
- <p>Run the appropriate steps from the following list as the
- default action of the <code title=event-dragend><a href=#event-dragend>dragend</a></code>
- event:</p>
+ <p>Run the appropriate steps from the following list as the default action of the <code title=event-dragend><a href=#event-dragend>dragend</a></code> event:</p>
- <dl class=switch><dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
- target element</a> is a <i>text field</i> (see below), the
- <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
- operation is a selection in the DOM that is entirely contained
- within an <a href=#editing-host>editing host</a></dt>
+ <dl class=switch><dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current target element</a> is a
+ <i>text field</i> (see below), the <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop operation is a selection in the
+ DOM that is entirely contained within an <a href=#editing-host>editing host</a></dt>
<dd><p><a href=#delete-the-selection>Delete the selection</a>.</dd>
- <dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
- target element</a> is a <i>text field</i> (see below), the
- <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
- operation is a selection in a text field</dt>
+ <dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current target element</a> is a
+ <i>text field</i> (see below), the <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop operation is a selection in a text
+ field</dt>
- <dd><p>The user agent should delete the dragged selection from
- the relevant text field.</dd>
+ <dd><p>The user agent should delete the dragged selection from the relevant text
+ field.</dd>
- <dt>If <var title="">dropped</var> is false or if the
- <a href=#current-drag-operation>current drag operation</a> is "<code title="">none</code>"</dt>
+ <dt>If <var title="">dropped</var> is false or if the <a href=#current-drag-operation>current drag operation</a> is
+ "<code title="">none</code>"</dt>
- <dd><p>The drag was canceled. If the platform conventions
- dictate that this be represented to the user (e.g. by animating
- the dragged selection going back to the source of the
+ <dd><p>The drag was canceled. If the platform conventions dictate that this be represented to
+ the user (e.g. by animating the dragged selection going back to the source of the
drag-and-drop operation), then do so.</dd>
<dt>Otherwise</dt>
<dd><p>The event has no default action.</dd>
- </dl><p>For the purposes of this step, a <i>text field</i> is a
- <code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
- whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- one of the
+ </dl><p>For the purposes of this step, a <i>text field</i> is a <code><a href=#the-textarea-element>textarea</a></code> element or an
+ <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in one
+ of the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>,
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
<a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Tel</a>,
@@ -77098,17 +76931,14 @@
</ol></li>
- </ol><p class=note>User agents are encouraged to consider how to react
- to drags near the edge of scrollable regions. For example, if a user
- drags a link to the bottom of the viewport on a long page, it might
- make sense to scroll the page so that the user can drop the link
- lower on the page.</p>
+ </ol><p class=note>User agents are encouraged to consider how to react to drags near the edge of
+ scrollable regions. For example, if a user drags a link to the bottom of the viewport on a long
+ page, it might make sense to scroll the page so that the user can drop the link lower on the
+ page.</p>
- <p class=note>This model is independent of which
- <code><a href=#document>Document</a></code> object the nodes involved are from; the events
- are fired as described above and the rest of the processing model
- runs as described above, irrespective of how many documents are
- involved in the operation.</p>
+ <p class=note>This model is independent of which <code><a href=#document>Document</a></code> object the nodes involved
+ are from; the events are fired as described above and the rest of the processing model runs as
+ described above, irrespective of how many documents are involved in the operation.</p>
</div>
@@ -80214,26 +80044,23 @@
</ol></li>
- </ol><p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user
- agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code>
- object. <strong>Once the user agent has <a href=#fail-the-connection title="fail the
- connection">failed the connection</a>, it does <em>not</em>
- attempt to reconnect!</strong></p>
+ </ol><p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user agent must <a href=#queue-a-task>queue a
+ task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple
+ event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code> object.
+ <strong>Once the user agent has <a href=#fail-the-connection title="fail the connection">failed the connection</a>, it
+ does <em>not</em> attempt to reconnect!</strong></p>
- <hr><p>The <a href=#task-source>task source</a> for any <a href=#concept-task title=concept-task>tasks</a> that are <a href=#queue-a-task title="queue a
- task">queued</a> by <code><a href=#eventsource>EventSource</a></code> objects is the
- <dfn id=remote-event-task-source>remote event task source</dfn>.</p>
+ <hr><p>The <a href=#task-source>task source</a> for any <a href=#concept-task title=concept-task>tasks</a> that are <a href=#queue-a-task title="queue a task">queued</a> by <code><a href=#eventsource>EventSource</a></code> objects is the <dfn id=remote-event-task-source>remote event
+ task source</dfn>.</p>
<h4 id=parsing-an-event-stream><span class=secno>10.2.4 </span>Parsing an event stream</h4>
- <p>This event stream format's <a href=#mime-type>MIME type</a> is
- <code><a href=#text/event-stream>text/event-stream</a></code>.</p>
+ <p>This event stream format's <a href=#mime-type>MIME type</a> is <code><a href=#text/event-stream>text/event-stream</a></code>.</p>
- <p>The event stream format is as described by the <code title="">stream</code> production of the following ABNF, the
- character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
+ <p>The event stream format is as described by the <code title="">stream</code> production of the
+ following ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
<pre>stream = [ bom ] *event
event = *( comment / field ) end-of-line
@@ -80252,19 +80079,17 @@
any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
; a <a href=#unicode-character>Unicode character</a> other than U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)</pre>
- <p>Event streams in this format must always be encoded as
- UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p>
+ <p>Event streams in this format must always be encoded as UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p>
- <p>Lines must be separated by either a U+000D CARRIAGE RETURN U+000A
- LINE FEED (CRLF) character pair, a single U+000A LINE FEED (LF)
- character, or a single U+000D CARRIAGE RETURN (CR) character.</p>
+ <p>Lines must be separated by either a U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character
+ pair, a single U+000A LINE FEED (LF) character, or a single U+000D CARRIAGE RETURN (CR)
+ character.</p>
- <p>Since connections established to remote servers for such
- resources are expected to be long-lived, UAs should ensure that
- appropriate buffering is used. In particular, while line buffering
- with lines are defined to end with a single U+000A LINE FEED (LF)
- character is safe, block buffering or line buffering with different
- expected line endings can cause delays in event dispatch.</p>
+ <p>Since connections established to remote servers for such resources are expected to be
+ long-lived, UAs should ensure that appropriate buffering is used. In particular, while line
+ buffering with lines are defined to end with a single U+000A LINE FEED (LF) character is safe,
+ block buffering or line buffering with different expected line endings can cause delays in event
+ dispatch.</p>
<h4 id=event-stream-interpretation><span class=secno>10.2.5 </span>Interpreting an event stream</h4>
@@ -80273,28 +80098,23 @@
handling</a>.
</p>
- <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if
- any are present.</p>
+ <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if any are present.</p>
- <p>The stream must then be parsed by reading everything line by
- line, with a U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF)
- character pair, a single U+000A LINE FEED (LF) character not
- preceded by a U+000D CARRIAGE RETURN (CR) character, and a single
- U+000D CARRIAGE RETURN (CR) character not followed by a U+000A LINE
- FEED (LF) character being the ways in which a line can end.</p>
+ <p>The stream must then be parsed by reading everything line by line, with a U+000D CARRIAGE
+ RETURN U+000A LINE FEED (CRLF) character pair, a single U+000A LINE FEED (LF) character not
+ preceded by a U+000D CARRIAGE RETURN (CR) character, and a single U+000D CARRIAGE RETURN (CR)
+ character not followed by a U+000A LINE FEED (LF) character being the ways in which a line can
+ end.</p>
- <p>When a stream is parsed, a <var title="">data</var> buffer, an
- <var title="">event type</var> buffer, and a <var title="">last
- event ID</var> buffer must be associated with it. They must be
+ <p>When a stream is parsed, a <var title="">data</var> buffer, an <var title="">event type</var>
+ buffer, and a <var title="">last event ID</var> buffer must be associated with it. They must be
initialized to the empty string</p>
- <p>Lines must be processed, in the order they are received, as
- follows:</p>
+ <p>Lines must be processed, in the order they are received, as follows:</p>
<dl class=switch><dt>If the line is empty (a blank line)</dt>
- <dd><p><a href=#dispatchMessage>Dispatch the event</a>, as
- defined below.</dd>
+ <dd><p><a href=#dispatchMessage>Dispatch the event</a>, as defined below.</dd>
<dt>If the line starts with a U+003A COLON character (:)</dt>
@@ -80306,18 +80126,12 @@
<dd>
- <p>Collect the characters on the line before the first U+003A
- COLON character (:), and let <var title="">field</var> be that
- string.</p>
+ <p>Collect the characters on the line before the first U+003A COLON character (:), and let <var title="">field</var> be that string.</p>
- <p>Collect the characters on the line after the first U+003A COLON
- character (:), and let <var title="">value</var> be that
- string. If <var title="">value</var> starts with a U+0020
- SPACE character, remove it from <var title="">value</var>.</p>
+ <p>Collect the characters on the line after the first U+003A COLON character (:), and let <var title="">value</var> be that string. If <var title="">value</var> starts with a U+0020 SPACE
+ character, remove it from <var title="">value</var>.</p>
- <p><a href=#processField>Process the field</a> using the steps
- described below, using <var title="">field</var> as the field name
- and <var title="">value</var> as the field value.</p>
+ <p><a href=#processField>Process the field</a> using the steps described below, using <var title="">field</var> as the field name and <var title="">value</var> as the field value.</p>
</dd>
@@ -85132,31 +84946,25 @@
</ol><h5 id=the-stack-of-open-elements><span class=secno>12.2.3.2 </span>The stack of open elements</h5>
-<!--CLEANUP-->
- <p>Initially, the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The
- stack grows downwards; the topmost node on the stack is the first
- one added to the stack, and the bottommost node of the stack is the
- most recently added node in the stack (notwithstanding when the
- stack is manipulated in a random access fashion as part of <a href=#adoptionAgency>the handling for misnested tags</a>).</p>
+ <p>Initially, the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The stack grows downwards; the
+ topmost node on the stack is the first one added to the stack, and the bottommost node of the
+ stack is the most recently added node in the stack (notwithstanding when the stack is manipulated
+ in a random access fashion as part of <a href=#adoptionAgency>the handling for misnested
+ tags</a>).</p>
- <p class=note>The "<a href=#the-before-html-insertion-mode title="insertion mode: before html">before
- html</a>" <a href=#insertion-mode>insertion mode</a> creates the
- <code><a href=#the-html-element>html</a></code> root element node, which is then added to the
- stack.</p>
+ <p class=note>The "<a href=#the-before-html-insertion-mode title="insertion mode: before html">before html</a>" <a href=#insertion-mode>insertion
+ mode</a> creates the <code><a href=#the-html-element>html</a></code> root element node, which is then added to the stack.</p>
- <p class=note>In the <a href=#fragment-case>fragment case</a>, the <a href=#stack-of-open-elements>stack of open
- elements</a> is initialized to contain an <code><a href=#the-html-element>html</a></code>
- element that is created as part of <a href=#html-fragment-parsing-algorithm title="html fragment
- parsing algorithm">that algorithm</a>. (The <a href=#fragment-case>fragment
- case</a> skips the "<a href=#the-before-html-insertion-mode title="insertion mode: before
- html">before html</a>" <a href=#insertion-mode>insertion mode</a>.)</p>
+ <p class=note>In the <a href=#fragment-case>fragment case</a>, the <a href=#stack-of-open-elements>stack of open elements</a> is
+ initialized to contain an <code><a href=#the-html-element>html</a></code> element that is created as part of <a href=#html-fragment-parsing-algorithm title="html
+ fragment parsing algorithm">that algorithm</a>. (The <a href=#fragment-case>fragment case</a> skips the
+ "<a href=#the-before-html-insertion-mode title="insertion mode: before html">before html</a>" <a href=#insertion-mode>insertion mode</a>.)</p>
- <p>The <code><a href=#the-html-element>html</a></code> node, however it is created, is the topmost
- node of the stack. It only gets popped off the stack when the parser
- <a href=#stop-parsing title="stop parsing">finishes</a>.</p>
+ <p>The <code><a href=#the-html-element>html</a></code> node, however it is created, is the topmost node of the stack. It only
+ gets popped off the stack when the parser <a href=#stop-parsing title="stop parsing">finishes</a>.</p>
- <p>The <dfn id=current-node>current node</dfn> is the bottommost node in this
- <a href=#stack-of-open-elements>stack of open elements</a>.</p>
+ <p>The <dfn id=current-node>current node</dfn> is the bottommost node in this <a href=#stack-of-open-elements>stack of open
+ elements</a>.</p>
<p>The <dfn id=adjusted-current-node>adjusted current node</dfn> is the <i title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></i>
element if the <a href=#stack-of-open-elements>stack of open elements</a> has only one element in it and the parser was
@@ -85179,53 +84987,45 @@
<code><a href=#the-hr-element>hr</a></code>, <code><a href=#the-html-element>html</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <!-- <code>image</code>, (commented out
because this isn't an element that can end up on the stack, so it doesn't matter) -->
<code><a href=#the-img-element>img</a></code>, <code><a href=#the-input-element>input</a></code>, <code><a href=#isindex-0>isindex</a></code>, <code><a href=#the-li-element>li</a></code>, <code><a href=#the-link-element>link</a></code>,
- <code><a href=#listing>listing</a></code>, <code><a href=#the-main-element>main</a></code>, <code><a href=#the-marquee-element>marquee</a></code>, <code><a href=#the-menu-element>menu</a></code>, <code><a href=#the-menuitem-element>menuitem</a></code>,
- <code><a href=#the-meta-element>meta</a></code>, <code><a href=#the-nav-element>nav</a></code>, <code><a href=#noembed>noembed</a></code>, <code><a href=#noframes>noframes</a></code>,
- <code><a href=#the-noscript-element>noscript</a></code>, <code><a href=#the-object-element>object</a></code>, <code><a href=#the-ol-element>ol</a></code>, <code><a href=#the-p-element>p</a></code>, <code><a href=#the-param-element>param</a></code>,
- <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>, <code><a href=#the-script-element>script</a></code>, <code><a href=#the-section-element>section</a></code>,
- <code><a href=#the-select-element>select</a></code>, <code><a href=#the-source-element>source</a></code>, <code><a href=#the-style-element>style</a></code>, <code><a href=#the-summary-element>summary</a></code>,
- <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-td-element>td</a></code>, <code><a href=#the-textarea-element>textarea</a></code>,
- <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-th-element>th</a></code>, <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-title-element>title</a></code>, <code><a href=#the-tr-element>tr</a></code>,
- <code><a href=#the-track-element>track</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#the-wbr-element>wbr</a></code>, and <code><a href=#xmp>xmp</a></code>; MathML's <code title="">mi</code>, <code title="">mo</code>, <code title="">mn</code>, <code title="">ms</code>,
- <code title="">mtext</code>, and <code title="">annotation-xml</code>; and SVG's <code title="">foreignObject</code>, <code title="">desc</code>, and <code title="">title</code>.</dd> <!-- we could actually put all non-HTML elements in this list, I
- think -->
+ <code><a href=#listing>listing</a></code>, <code><a href=#the-main-element>main</a></code>, <code><a href=#the-marquee-element>marquee</a></code>, <code><a href=#the-menu-element>menu</a></code>,
+ <code><a href=#the-menuitem-element>menuitem</a></code>, <code><a href=#the-meta-element>meta</a></code>, <code><a href=#the-nav-element>nav</a></code>, <code><a href=#noembed>noembed</a></code>,
+ <code><a href=#noframes>noframes</a></code>, <code><a href=#the-noscript-element>noscript</a></code>, <code><a href=#the-object-element>object</a></code>, <code><a href=#the-ol-element>ol</a></code>,
+ <code><a href=#the-p-element>p</a></code>, <code><a href=#the-param-element>param</a></code>, <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>,
+ <code><a href=#the-script-element>script</a></code>, <code><a href=#the-section-element>section</a></code>, <code><a href=#the-select-element>select</a></code>, <code><a href=#the-source-element>source</a></code>,
+ <code><a href=#the-style-element>style</a></code>, <code><a href=#the-summary-element>summary</a></code>, <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>,
+ <code><a href=#the-td-element>td</a></code>, <code><a href=#the-textarea-element>textarea</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-th-element>th</a></code>, <code><a href=#the-thead-element>thead</a></code>,
+ <code><a href=#the-title-element>title</a></code>, <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-track-element>track</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#the-wbr-element>wbr</a></code>, and
+ <code><a href=#xmp>xmp</a></code>; MathML's <code title="">mi</code>, <code title="">mo</code>, <code title="">mn</code>, <code title="">ms</code>, <code title="">mtext</code>, and <code title="">annotation-xml</code>; and SVG's <code title="">foreignObject</code>, <code title="">desc</code>, and <code title="">title</code>.</dd> <!-- we could actually put all
+ non-HTML elements in this list, I think -->
<dt><dfn id=formatting>Formatting</dfn></dt>
- <dd><p>The following HTML elements are those that end up in the
- <a href=#list-of-active-formatting-elements>list of active formatting elements</a>: <code><a href=#the-a-element>a</a></code>,
- <code><a href=#the-b-element>b</a></code>, <code><a href=#big>big</a></code>, <code><a href=#the-code-element>code</a></code>,
- <code><a href=#the-em-element>em</a></code>, <code><a href=#font>font</a></code>, <code><a href=#the-i-element>i</a></code>,
- <code><a href=#nobr>nobr</a></code>, <code><a href=#the-s-element>s</a></code>, <code><a href=#the-small-element>small</a></code>,
- <code><a href=#strike>strike</a></code>, <code><a href=#the-strong-element>strong</a></code>, <code><a href=#tt>tt</a></code>, and
+ <dd><p>The following HTML elements are those that end up in the <a href=#list-of-active-formatting-elements>list of active formatting
+ elements</a>: <code><a href=#the-a-element>a</a></code>, <code><a href=#the-b-element>b</a></code>, <code><a href=#big>big</a></code>, <code><a href=#the-code-element>code</a></code>,
+ <code><a href=#the-em-element>em</a></code>, <code><a href=#font>font</a></code>, <code><a href=#the-i-element>i</a></code>, <code><a href=#nobr>nobr</a></code>, <code><a href=#the-s-element>s</a></code>,
+ <code><a href=#the-small-element>small</a></code>, <code><a href=#strike>strike</a></code>, <code><a href=#the-strong-element>strong</a></code>, <code><a href=#tt>tt</a></code>, and
<code><a href=#the-u-element>u</a></code>.</dd>
<dt><dfn id=ordinary>Ordinary</dfn></dt>
- <dd><p>All other elements found while parsing an HTML
- document.</dd>
+ <dd><p>All other elements found while parsing an HTML document.</dd>
- </dl><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-the-specific-scope title="has an element in the specific scope">have an element in a
- specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a
- match state:</p>
+ </dl><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-the-specific-scope title="has an element in the specific
+ scope">have an element in a specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a match state:</p>
- <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
- node</a> (the bottommost node of the stack).</li>
+ <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current node</a> (the bottommost
+ node of the stack).</li>
- <li><p>If <var title="">node</var> is the target node, terminate in
- a match state.</li>
+ <li><p>If <var title="">node</var> is the target node, terminate in a match state.</li>
- <li><p>Otherwise, if <var title="">node</var> is one of the element
- types in <var title="">list</var>, terminate in a failure
- state.</li>
+ <li><p>Otherwise, if <var title="">node</var> is one of the element types in <var title="">list</var>, terminate in a failure state.</li>
- <li><p>Otherwise, set <var title="">node</var> to the previous
- entry in the <a href=#stack-of-open-elements>stack of open elements</a> and return to step
- 2. (This will never fail, since the loop will always terminate in
- the previous step if the top of the stack — an
- <code><a href=#the-html-element>html</a></code> element — is reached.)</li>
+ <li><p>Otherwise, set <var title="">node</var> to the previous entry in the <a href=#stack-of-open-elements>stack of open
+ elements</a> and return to step 2. (This will never fail, since the loop will always terminate
+ in the previous step if the top of the stack — an <code><a href=#the-html-element>html</a></code> element — is
+ reached.)</li>
- </ol><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-scope title="has an element in scope">have an element in scope</dfn> when
- it <a href=#has-an-element-in-the-specific-scope>has an element in the specific scope</a> consisting
- of the following element types:</p>
+ </ol><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-scope title="has an element in scope">have an
+ element in scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific scope</a> consisting of the
+ following element types:</p>
<ul class=brief><li><code><a href=#the-applet-element>applet</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
<li><code><a href=#the-caption-element>caption</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
@@ -85244,43 +85044,40 @@
<li><code title="">foreignObject</code> in the <a href=#svg-namespace>SVG namespace</a></li>
<li><code title="">desc</code> in the <a href=#svg-namespace>SVG namespace</a></li>
<li><code title="">title</code> in the <a href=#svg-namespace>SVG namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-list-item-scope title="has an element in list item scope">have an element in list
- item scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-list-item-scope title="has an element in list item
+ scope">have an element in list item scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
scope</a> consisting of the following element types:</p>
<ul class=brief><li>All the element types listed above for the <i><a href=#has-an-element-in-scope>has an element
in scope</a></i> algorithm.</li>
<li><code><a href=#the-ol-element>ol</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
<li><code><a href=#the-ul-element>ul</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-button-scope title="has an element in button scope">have an element in button
- scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-button-scope title="has an element in button
+ scope">have an element in button scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
scope</a> consisting of the following element types:</p>
<ul class=brief><li>All the element types listed above for the <i><a href=#has-an-element-in-scope>has an element
in scope</a></i> algorithm.</li>
<li><code><a href=#the-button-element>button</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-table-scope title="has an element in table scope">have an element in table
- scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-table-scope title="has an element in table
+ scope">have an element in table scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
scope</a> consisting of the following element types:</p>
<ul class=brief><li><code><a href=#the-html-element>html</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li> <!-- (This can only happen if the <var title="">node</var> is the topmost node of the <span>stack of open elements</span>, and prevents the next step from being invoked if there are no more elements in the stack.) -->
<li><code><a href=#the-table-element>table</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-select-scope title="has an element in select scope">have an element in select
- scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
- scope</a> consisting of all element types <em>except</em> the
- following:</p>
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-select-scope title="has an element in select
+ scope">have an element in select scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ scope</a> consisting of all element types <em>except</em> the following:</p>
<ul class=brief><!--<li><code>select</code> in the <span>HTML namespace</span></li>--><li><code><a href=#the-optgroup-element>optgroup</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
<li><code><a href=#the-option-element>option</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>Nothing happens if at any time any of the elements in the
- <a href=#stack-of-open-elements>stack of open elements</a> are moved to a new location in,
- or removed from, the <code><a href=#document>Document</a></code> tree. In particular, the
- stack is not changed in this situation. This can cause, amongst
- other strange effects, content to be appended to nodes that are no
- longer in the DOM.</p>
+ </ul><p>Nothing happens if at any time any of the elements in the <a href=#stack-of-open-elements>stack of open elements</a>
+ are moved to a new location in, or removed from, the <code><a href=#document>Document</a></code> tree. In particular,
+ the stack is not changed in this situation. This can cause, amongst other strange effects, content
+ to be appended to nodes that are no longer in the DOM.</p>
- <p class=note>In some cases (namely, when <a href=#adoptionAgency>closing misnested formatting elements</a>),
- the stack is manipulated in a random-access fashion.</p>
+ <p class=note>In some cases (namely, when <a href=#adoptionAgency>closing misnested formatting
+ elements</a>), the stack is manipulated in a random-access fashion.</p>
<h5 id=the-list-of-active-formatting-elements><span class=secno>12.2.3.3 </span>The list of active formatting elements</h5>
@@ -87608,20 +87405,18 @@
the stack when you hit a limit, or something. -->
<h4 id=tree-construction><span class=secno>12.2.5 </span><dfn>Tree construction</dfn></h4>
-<!--CLEANUP-->
- <p>The input to the tree construction stage is a sequence of tokens
- from the <a href=#tokenization>tokenization</a> stage. The tree construction
- stage is associated with a DOM <code><a href=#document>Document</a></code> object when a
- parser is created. The "output" of this stage consists of
+ <p>The input to the tree construction stage is a sequence of tokens from the
+ <a href=#tokenization>tokenization</a> stage. The tree construction stage is associated with a DOM
+ <code><a href=#document>Document</a></code> object when a parser is created. The "output" of this stage consists of
dynamically modifying or extending that document's DOM tree.</p>
- <p>This specification does not define when an interactive user agent
- has to render the <code><a href=#document>Document</a></code> so that it is available to
- the user, or when it has to begin accepting user input.</p>
+ <p>This specification does not define when an interactive user agent has to render the
+ <code><a href=#document>Document</a></code> so that it is available to the user, or when it has to begin accepting user
+ input.</p>
- <hr><p>As each token is emitted from the tokenizer, the user agent must
- follow the appropriate steps from the following list:</p>
+ <hr><p>As each token is emitted from the tokenizer, the user agent must follow the appropriate steps
+ from the following list:</p>
<dl class=switch><dt>If there is no <a href=#adjusted-current-node>adjusted current node</a></dt>
<dt>If the <a href=#adjusted-current-node>adjusted current node</a> is an element in the <a href=#html-namespace-0>HTML namespace</a></dt>
@@ -87632,49 +87427,41 @@
<dt>If the <a href=#adjusted-current-node>adjusted current node</a> is an <a href=#html-integration-point>HTML integration point</a> and the token is a character token</dt>
<dt>If the token is an end-of-file token</dt>
- <dd>Process the token according to the rules given in the section
- corresponding to the current <a href=#insertion-mode>insertion mode</a> in HTML
- content.</dd>
+ <dd>Process the token according to the rules given in the section corresponding to the current
+ <a href=#insertion-mode>insertion mode</a> in HTML content.</dd>
<dt>Otherwise</dt>
- <dd>Process the token according to the rules given in the section
- for parsing tokens <a href=#parsing-main-inforeign title="insertion mode: in foreign
- content">in foreign content</a>.</dd>
+ <dd>Process the token according to the rules given in the section for parsing tokens <a href=#parsing-main-inforeign title="insertion mode: in foreign content">in foreign content</a>.</dd>
- </dl><p>When the specification says that a user agent is to <dfn id=act-as-if-a-token-had-been-seen>act as
- if a token had been seen</dfn>, it means that the user agent is to
- follow the appropriate steps from the above list.</p>
+ </dl><p>When the specification says that a user agent is to <dfn id=act-as-if-a-token-had-been-seen>act as if a token had been seen</dfn>,
+ it means that the user agent is to follow the appropriate steps from the above list.</p>
- <p>A node is a <dfn id=mathml-text-integration-point>MathML text
- integration point</dfn> if it is one of the following elements:</p>
+ <p>A node is a <dfn id=mathml-text-integration-point>MathML text integration point</dfn> if it is one of the following
+ elements:</p>
<ul class=brief><li>An <code title="">mi</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">mo</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">mn</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">ms</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">mtext</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
- </ul><p>A node is an <dfn id=html-integration-point>HTML
- integration point</dfn> if it is one of the following elements:</p>
+ </ul><p>A node is an <dfn id=html-integration-point>HTML integration point</dfn> if it is one of the following elements:</p>
<ul class=brief><li>An <code title="">annotation-xml</code> element in the <a href=#mathml-namespace>MathML namespace</a> whose start tag token had an attribute with the name "encoding" whose value was an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">text/html</code>"</li>
<li>An <code title="">annotation-xml</code> element in the <a href=#mathml-namespace>MathML namespace</a> whose start tag token had an attribute with the name "encoding" whose value was an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">application/xhtml+xml</code>"</li>
<li>A <code title="">foreignObject</code> element in the <a href=#svg-namespace>SVG namespace</a></li>
<li>A <code title="">desc</code> element in the <a href=#svg-namespace>SVG namespace</a></li>
<li>A <code title="">title</code> element in the <a href=#svg-namespace>SVG namespace</a></li>
- </ul><hr><p>When the steps below require the UA to <dfn id=insert-a-character>insert a
- character</dfn> into a node, if that node has a child immediately
- before where the character is to be inserted, and that child is a
- <code><a href=#text>Text</a></code> node, then the character must be appended to that
- <code><a href=#text>Text</a></code> node; otherwise, a new <code><a href=#text>Text</a></code> node
- whose data is just that character must be inserted in the
+ </ul><hr><p>When the steps below require the UA to <dfn id=insert-a-character>insert a character</dfn> into a node, if that node
+ has a child immediately before where the character is to be inserted, and that child is a
+ <code><a href=#text>Text</a></code> node, then the character must be appended to that <code><a href=#text>Text</a></code> node;
+ otherwise, a new <code><a href=#text>Text</a></code> node whose data is just that character must be inserted in the
appropriate place.</p>
<div class=example>
- <p>Here are some sample inputs to the parser and the corresponding
- number of <code><a href=#text>Text</a></code> nodes that they result in, assuming a user agent
- that executes scripts.</p>
+ <p>Here are some sample inputs to the parser and the corresponding number of <code><a href=#text>Text</a></code>
+ nodes that they result in, assuming a user agent that executes scripts.</p>
<table><thead><tr><th>Input <th>Number of <code><a href=#text>Text</a></code> nodes
<tbody><tr><td><pre>A<script>
@@ -87706,18 +87493,14 @@
<p>However, mutation observers <em>do</em> fire, as required by the DOM specification.</p>
- <p class=note>Not all of the tag names mentioned below are
- conformant tag names in this specification; many are included to
- handle legacy content. They still form part of the algorithm that
- implementations are required to implement to claim conformance.</p>
+ <p class=note>Not all of the tag names mentioned below are conformant tag names in this
+ specification; many are included to handle legacy content. They still form part of the algorithm
+ that implementations are required to implement to claim conformance.</p>
- <p class=note>The algorithm described below places no limit on the
- depth of the DOM tree generated, or on the length of tag names,
- attribute names, attribute values, <code><a href=#text>Text</a></code> nodes, etc. While
- implementors are encouraged to avoid arbitrary limits, it is
- recognized that <a href=#hardwareLimitations>practical
- concerns</a> will likely force user agents to impose nesting depth
- constraints.</p>
+ <p class=note>The algorithm described below places no limit on the depth of the DOM tree
+ generated, or on the length of tag names, attribute names, attribute values, <code><a href=#text>Text</a></code>
+ nodes, etc. While implementors are encouraged to avoid arbitrary limits, it is recognized that <a href=#hardwareLimitations>practical concerns</a> will likely force user agents to impose nesting
+ depth constraints.</p>
<h5 id=creating-and-inserting-elements><span class=secno>12.2.5.1 </span>Creating and inserting elements</h5>
@@ -91124,34 +90907,31 @@
</dd>
</dl><h5 id=parsing-main-inforeign><span class=secno>12.2.5.5 </span>The rules for parsing tokens <dfn title="insertion mode: in foreign content">in foreign content</dfn></h5>
-<!--CLEANUP-->
<p>When the user agent is to apply the rules for parsing tokens in foreign content, the user agent must handle the token as follows:</p>
<dl class=switch><dt>A character token that is U+0000 NULL</dt>
<dd>
- <p><a href=#parse-error>Parse error</a>. <a href=#insert-a-character title="insert a
- character">Insert a U+FFFD REPLACEMENT CHARACTER character</a>
- into the <a href=#current-node>current node</a>.</p>
+ <p><a href=#parse-error>Parse error</a>. <a href=#insert-a-character title="insert a character">Insert a U+FFFD REPLACEMENT
+ CHARACTER character</a> into the <a href=#current-node>current node</a>.</p>
</dd>
- <dt>A character token that is one of U+0009 CHARACTER TABULATION,
- U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE
- RETURN (CR), or U+0020 SPACE</dt>
+ <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
+ FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt>
<dd>
- <p><a href=#insert-a-character title="insert a character">Insert the token's
- character</a> into the <a href=#current-node>current node</a>.</p>
+ <p><a href=#insert-a-character title="insert a character">Insert the token's character</a> into the <a href=#current-node>current
+ node</a>.</p>
</dd>
<dt>Any other character token</dt>
<dd>
- <p><a href=#insert-a-character title="insert a character">Insert the token's
- character</a> into the <a href=#current-node>current node</a>.</p>
+ <p><a href=#insert-a-character title="insert a character">Insert the token's character</a> into the <a href=#current-node>current
+ node</a>.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
@@ -91159,9 +90939,9 @@
<dt>A comment token</dt>
<dd>
- <p>Append a <code><a href=#comment-0>Comment</a></code> node to the <a href=#current-node>current
- node</a> with the <code title="">data</code> attribute set to
- the data given in the comment token.</p>
+
+ <p>Append a <code><a href=#comment-0>Comment</a></code> node to the <a href=#current-node>current node</a> with the <code title="">data</code> attribute set to the data given in the comment token.</p>
+
</dd>
<dt>A DOCTYPE token</dt>
@@ -91169,25 +90949,19 @@
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
- <dt>A start tag whose tag name is one of: <!--"a",--> "b", "big",
- "blockquote", "body"<!--by inspection-->, "br", "center", "code",
- "dd", "div", "dl", "dt"<!-- so that dd and dt can be handled
- uniformly throughout the parser -->, "em", "embed", "h1", "h2",
- "h3", "h4"<!--for completeness-->, "h5", "h6"<!--for
- completeness-->, "head"<!--by inspection-->, "hr", "i", "img",
- "li", "listing"<!-- so that pre and listing can be handled
- uniformly throughout the parser -->, "menu", "meta", "nobr",
- "ol"<!-- so that dl, ul, and ol can be handled uniformly throughout
- the parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small",
- "span", "strong", "strike"<!-- so that s and strike can be handled
- uniformly throughout the parser -->, <!--"style",--> "sub", "sup",
- "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this
- list was determined empirically by studying over 6,000,000,000
- pages that were specifically not XML pages -->
- <dt>A start tag whose tag name is "font", if the token has any
- attributes named "color", "face", or "size"</dt> <!-- the
- attributes here are required so that SVG <font> will go through as
- SVG but legacy <font>s won't -->
+ <dt>A start tag whose tag name is one of: <!--"a",--> "b", "big", "blockquote", "body"<!--by
+ inspection-->, "br", "center", "code", "dd", "div", "dl", "dt"<!-- so that dd and dt can be
+ handled uniformly throughout the parser -->, "em", "embed", "h1", "h2", "h3", "h4"<!--for
+ completeness-->, "h5", "h6"<!--for completeness-->, "head"<!--by inspection-->, "hr", "i", "img",
+ "li", "listing"<!-- so that pre and listing can be handled uniformly throughout the parser -->,
+ "menu", "meta", "nobr", "ol"<!-- so that dl, ul, and ol can be handled uniformly throughout the
+ parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so
+ that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub",
+ "sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined
+ empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A
+ start tag whose tag name is "font", if the token has any attributes named "color", "face", or
+ "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but
+ legacy <font>s won't -->
<dd>
@@ -91202,12 +90976,10 @@
<p>Otherwise:</p>
- <p>Pop an element from the <a href=#stack-of-open-elements>stack of open elements</a>,
- and then keep popping more elements from the <a href=#stack-of-open-elements>stack of open
- elements</a> until the <a href=#current-node>current node</a> is a
- <a href=#mathml-text-integration-point>MathML text integration point</a>, an <a href=#html-integration-point>HTML
- integration point</a>, or an element in the <a href=#html-namespace-0>HTML
- namespace</a>.</p>
+ <p>Pop an element from the <a href=#stack-of-open-elements>stack of open elements</a>, and then keep popping more
+ elements from the <a href=#stack-of-open-elements>stack of open elements</a> until the <a href=#current-node>current node</a> is a
+ <a href=#mathml-text-integration-point>MathML text integration point</a>, an <a href=#html-integration-point>HTML integration point</a>, or an
+ element in the <a href=#html-namespace-0>HTML namespace</a>.</p>
<p>Then, reprocess the token.</p>
@@ -91216,17 +90988,14 @@
<dt>Any other start tag</dt>
<dd>
- <p>If the <a href=#current-node>current node</a> is an element in the
- <a href=#mathml-namespace>MathML namespace</a>, <a href=#adjust-mathml-attributes>adjust MathML
- attributes</a> for the token. (This fixes the case of MathML
- attributes that are not all lowercase.)</p>
+ <p>If the <a href=#current-node>current node</a> is an element in the <a href=#mathml-namespace>MathML namespace</a>,
+ <a href=#adjust-mathml-attributes>adjust MathML attributes</a> for the token. (This fixes the case of MathML attributes
+ that are not all lowercase.)</p>
- <p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG
- namespace</a>, and the token's tag name is one of the ones in
- the first column of the following table, change the tag name to
- the name given in the corresponding cell in the second
- column. (This fixes the case of SVG elements that are not all
- lowercase.)</p>
+ <p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG namespace</a>, and the
+ token's tag name is one of the ones in the first column of the following table, change the tag
+ name to the name given in the corresponding cell in the second column. (This fixes the case of
+ SVG elements that are not all lowercase.)</p>
<table><thead><tr><th> Tag name <th> Element name
<tbody><tr><td> <code title="">altglyph</code> <td> <code title="">altGlyph</code>
@@ -91266,28 +91035,25 @@
<tr><td> <code title="">radialgradient</code> <td> <code title="">radialGradient</code>
<!--<tr> <td> <code title="">solidcolor</code> <td> <code title="">solidColor</code> (SVG 1.2)-->
<tr><td> <code title="">textpath</code> <td> <code title="">textPath</code>
- </table><p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG
- namespace</a>, <a href=#adjust-svg-attributes>adjust SVG attributes</a> for the
- token. (This fixes the case of SVG attributes that are not all
- lowercase.)</p>
+ </table><p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG namespace</a>,
+ <a href=#adjust-svg-attributes>adjust SVG attributes</a> for the token. (This fixes the case of SVG attributes that
+ are not all lowercase.)</p>
- <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This
- fixes the use of namespaced attributes, in particular XLink in
- SVG.)</p>
+ <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink in SVG.)</p>
- <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the
- same namespace as the <a href=#current-node>current node</a>.</p>
+ <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the same namespace as the
+ <a href=#current-node>current node</a>.</p>
- <p>If the token has its <i>self-closing flag</i> set, then run the
- appropriate steps from the following list:</p>
+ <p>If the token has its <i>self-closing flag</i> set, then run the appropriate steps from the
+ following list:</p>
<dl class=switch><dt>If the token's tag name is "script"</dt>
<dd>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, and then act as if an
- end tag with the tag name "script" had been seen.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, and then act as if an end tag with the tag name "script" had been seen.</p>
</dd>
@@ -91295,9 +91061,7 @@
<dd>
- <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing
+ <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">acknowledge the token's <i>self-closing
flag</i></a>.</p>
</dd>
@@ -91307,32 +91071,29 @@
<dt id=scriptForeignEndTag>An end tag whose tag name is "script", if the <a href=#current-node>current node</a> is a <code title="">script</code> element in the <a href=#svg-namespace>SVG namespace</a></dt>
<dd>
- <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p>Let the <var title="">old insertion point</var> have the
- same value as the current <a href=#insertion-point>insertion point</a>. Let
- the <a href=#insertion-point>insertion point</a> be just before the <a href=#next-input-character>next
+ <p>Let the <var title="">old insertion point</var> have the same value as the current
+ <a href=#insertion-point>insertion point</a>. Let the <a href=#insertion-point>insertion point</a> be just before the <a href=#next-input-character>next
input character</a>.</p>
- <p>Increment the parser's <a href=#script-nesting-level>script nesting level</a> by
- one. Set the <a href=#parser-pause-flag>parser pause flag</a> to true.</p>
+ <p>Increment the parser's <a href=#script-nesting-level>script nesting level</a> by one. Set the <a href=#parser-pause-flag>parser pause
+ flag</a> to true.</p>
- <p><a href=http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing>Process
- the <code title="">script</code> element</a> according to the SVG
- rules, if the user agent supports SVG. <a href=#refsSVG>[SVG]</a></p>
+ <p><a href=http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing>Process the
+ <code title="">script</code> element</a> according to the SVG rules, if the user agent supports
+ SVG. <a href=#refsSVG>[SVG]</a></p>
- <p class=note>Even if this causes <a href=#dom-document-write title=dom-document-write>new characters to be inserted into the
- tokenizer</a>, the parser will not be executed reentrantly,
- since the <a href=#parser-pause-flag>parser pause flag</a> is true.</p>
+ <p class=note>Even if this causes <a href=#dom-document-write title=dom-document-write>new characters to be
+ inserted into the tokenizer</a>, the parser will not be executed reentrantly, since the
+ <a href=#parser-pause-flag>parser pause flag</a> is true.</p>
- <p>Decrement the parser's <a href=#script-nesting-level>script nesting level</a> by
- one. If the parser's <a href=#script-nesting-level>script nesting level</a> is zero,
- then set the <a href=#parser-pause-flag>parser pause flag</a> to false.</p>
+ <p>Decrement the parser's <a href=#script-nesting-level>script nesting level</a> by one. If the parser's <a href=#script-nesting-level>script
+ nesting level</a> is zero, then set the <a href=#parser-pause-flag>parser pause flag</a> to false.</p>
- <p>Let the <a href=#insertion-point>insertion point</a> have the value of the <var title="">old insertion point</var>. (In other words, restore the
- <a href=#insertion-point>insertion point</a> to its previous value. This value
- might be the "undefined" value.)</p>
+ <p>Let the <a href=#insertion-point>insertion point</a> have the value of the <var title="">old insertion
+ point</var>. (In other words, restore the <a href=#insertion-point>insertion point</a> to its previous value.
+ This value might be the "undefined" value.)</p>
</dd>
@@ -91342,32 +91103,28 @@
<p>Run these steps:</p>
- <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
- node</a> (the bottommost node of the stack).</li>
+ <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current node</a> (the bottommost
+ node of the stack).</li>
- <li><p>If <var title="">node</var> is not an element with the
- same tag name as the token, then this is a <a href=#parse-error>parse
- error</a>.</li>
+ <li><p>If <var title="">node</var> is not an element with the same tag name as the token, then
+ this is a <a href=#parse-error>parse error</a>.</li>
<li><p><i>Loop</i>: If <var title="">node</var> is the topmost element in the <a href=#stack-of-open-elements>stack of
open elements</a>, abort these steps. (<a href=#fragment-case>fragment case</a>)</li>
- <li><p>If <var title="">node</var>'s tag name,
- <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, is the same as the tag
- name of the token, pop elements from the <a href=#stack-of-open-elements>stack of open
- elements</a> until <var title="">node</var> has been popped
- from the stack, and then abort these steps.</li>
+ <li><p>If <var title="">node</var>'s tag name, <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, is
+ the same as the tag name of the token, pop elements from the <a href=#stack-of-open-elements>stack of open
+ elements</a> until <var title="">node</var> has been popped from the stack, and then abort
+ these steps.</li>
- <li><p>Set <var title="">node</var> to the previous entry in the
- <a href=#stack-of-open-elements>stack of open elements</a>.</li>
+ <li><p>Set <var title="">node</var> to the previous entry in the <a href=#stack-of-open-elements>stack of open
+ elements</a>.</li>
- <li><p>If <var title="">node</var> is not an element in the
- <a href=#html-namespace-0>HTML namespace</a>, return to the step labeled
- <i>loop</i>.</li>
+ <li><p>If <var title="">node</var> is not an element in the <a href=#html-namespace-0>HTML namespace</a>, return
+ to the step labeled <i>loop</i>.</li>
- <li><p>Otherwise, process the token according to the rules given
- in the section corresponding to the current <a href=#insertion-mode>insertion
- mode</a> in HTML content.</li>
+ <li><p>Otherwise, process the token according to the rules given in the section corresponding
+ to the current <a href=#insertion-mode>insertion mode</a> in HTML content.</li>
</ol></dd>
@@ -91378,8 +91135,8 @@
<h4 id=the-end><span class=secno>12.2.6 </span>The end</h4>
- <p>Once the user agent <dfn id=stop-parsing title="stop parsing">stops parsing</dfn>
- the document, the user agent must run the following steps:</p>
+ <p>Once the user agent <dfn id=stop-parsing title="stop parsing">stops parsing</dfn> the document, the user agent
+ must run the following steps:</p>
<ol><!-- this happens as part of one of the tasks that runs the parser --><li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">interactive</code>"
<!-- this also synchronously fires an event --> and the <a href=#insertion-point>insertion point</a> to
@@ -91437,17 +91194,14 @@
<li>
- <p>If the <code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing
- context</a>, then <a href=#queue-a-task>queue a task</a> to run the
- following substeps:</p>
+ <p>If the <code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing context</a>, then <a href=#queue-a-task>queue a
+ task</a> to run the following substeps:</p>
- <ol><li><p>If the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a>
- flag is true, then abort this task (i.e. don't fire the event
- below).</li> <!-- i don't see how this could be, but just to
- be sure... -->
+ <ol><li><p>If the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a> flag is true, then abort this
+ task (i.e. don't fire the event below).</li> <!-- i don't see how this could be, but just
+ to be sure... -->
- <li><p>Set the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a>
- flag to true.</li>
+ <li><p>Set the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a> flag to true.</li>
<li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-pageshow><a href=#event-pageshow>pageshow</a></code> at the <code><a href=#window>Window</a></code> object of the
<code><a href=#document>Document</a></code>, but with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
@@ -91457,50 +91211,39 @@
</ol></li>
- <li><p>If the <code><a href=#document>Document</a></code> has any <a href=#pending-application-cache-download-process-tasks>pending
- application cache download process tasks</a>, then <a href=#queue-a-task title="queue a task">queue</a> each such <a href=#concept-task title=concept-task>task</a> in the order they were added to
- the list of <a href=#pending-application-cache-download-process-tasks>pending application cache download process
- tasks</a>, and then empty the list of <a href=#pending-application-cache-download-process-tasks>pending application
- cache download process tasks</a>. The <a href=#task-source>task source</a>
- for these <a href=#concept-task title=concept-task>tasks</a> is the
- <a href=#networking-task-source>networking task source</a>.</li>
+ <li><p>If the <code><a href=#document>Document</a></code> has any <a href=#pending-application-cache-download-process-tasks>pending application cache download process
+ tasks</a>, then <a href=#queue-a-task title="queue a task">queue</a> each such <a href=#concept-task title=concept-task>task</a> in the order they were added to the list of <a href=#pending-application-cache-download-process-tasks>pending
+ application cache download process tasks</a>, and then empty the list of <a href=#pending-application-cache-download-process-tasks>pending
+ application cache download process tasks</a>. The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#networking-task-source>networking task source</a>.</li>
- <li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when
- loaded</a> flag is set, then run the <a href=#printing-steps>printing
- steps</a>.</li>
+ <li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when loaded</a> flag is set, then run the
+ <a href=#printing-steps>printing steps</a>.</li>
- <li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load
- tasks</dfn>.</li>
+ <li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load tasks</dfn>.</li>
- <li><p><a href=#queue-a-task>Queue a task</a> to mark the <code><a href=#document>Document</a></code>
- as <dfn id=completely-loaded>completely loaded</dfn>.</li>
+ <li><p><a href=#queue-a-task>Queue a task</a> to mark the <code><a href=#document>Document</a></code> as <dfn id=completely-loaded>completely
+ loaded</dfn>.</li>
- </ol><p>When the user agent is to <dfn id=abort-a-parser>abort a parser</dfn>, it must run
- the following steps:</p>
+ </ol><p>When the user agent is to <dfn id=abort-a-parser>abort a parser</dfn>, it must run the following steps:</p>
- <ol><li><p>Throw away any pending content in the <a href=#input-stream>input
- stream</a>, and discard any future content that would have been
- added to it.</li>
+ <ol><li><p>Throw away any pending content in the <a href=#input-stream>input stream</a>, and discard any future
+ content that would have been added to it.</li>
- <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">interactive</code>"<!-- this synchronously fires an event
- -->.</li>
+ <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">interactive</code>"<!--
+ this synchronously fires an event -->.</li>
- <li><p>Pop <em>all</em> the nodes off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</li>
+ <li><p>Pop <em>all</em> the nodes off the <a href=#stack-of-open-elements>stack of open elements</a>.</li>
- <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">complete</code>"<!-- this also synchronously fires an
- event -->.</li>
+ <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">complete</code>"<!--
+ this also synchronously fires an event -->.</li>
- <!-- anything else? this is things that happen when you call
- document.open() on a document that's still being parsed, or when
- you navigate a document that's still parsing, or navigate the
- parent of a frame with a document that's still parsing, or the user
- hits "stop". Should the pending scripts be blown away or anything?
- -->
+ <!-- anything else? this is things that happen when you call document.open() on a document that's
+ still being parsed, or when you navigate a document that's still parsing, or navigate the parent
+ of a frame with a document that's still parsing, or the user hits "stop". Should the pending
+ scripts be blown away or anything? -->
- </ol><p>Except where otherwise specified, the <a href=#task-source>task source</a>
- for the <a href=#concept-task title=concept-task>tasks</a> mentioned in this
- section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>
+ </ol><p>Except where otherwise specified, the <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> mentioned in this section is the <a href=#dom-manipulation-task-source>DOM manipulation task
+ source</a>.</p>
</div>
@@ -92666,43 +92409,36 @@
<h3 id=introduction-13><span class=secno>14.1 </span>Introduction</h3>
-<!--CLEANUP-->
- <p>In general, user agents are expected to support CSS, and many of
- the suggestions in this section are expressed in CSS terms. User
- agents that use other presentation mechanisms can derive their
- expected behavior by translating from the CSS rules given in this
- section.</p>
+ <p>In general, user agents are expected to support CSS, and many of the suggestions in this
+ section are expressed in CSS terms. User agents that use other presentation mechanisms can derive
+ their expected behavior by translating from the CSS rules given in this section.</p>
- <p>In the absence of style-layer rules to the contrary (e.g. author
- style sheets), user agents are expected to render an element so that
- it conveys to the user the meaning that the element
- <span title=represent>represents</span>, as described by this specification.</p>
+ <p>In the absence of style-layer rules to the contrary (e.g. author style sheets), user agents are
+ expected to render an element so that it conveys to the user the meaning that the element <span title=represent>represents</span>, as described by this specification.</p>
- <p>The suggestions in this section generally assume a visual output
- medium with a resolution of 96dpi or greater, but HTML is intended
- to apply to multiple media (it is a <i>media-independent</i>
- language). User agent implementors are encouraged to adapt the
+ <p>The suggestions in this section generally assume a visual output medium with a resolution of
+ 96dpi or greater, but HTML is intended to apply to multiple media (it is a
+ <i>media-independent</i> language). User agent implementors are encouraged to adapt the
suggestions in this section to their target media.</p>
- <hr><p>An element is <dfn id=being-rendered>being rendered</dfn> if it is <a href=#in-a-document>in a
- <code>Document</code></a>, either its parent node is itself
- <a href=#being-rendered>being rendered</a> or it is the <code><a href=#document>Document</a></code> node,
- and it is not explicitly excluded from the rendering using either:</p>
+ <hr><p>An element is <dfn id=being-rendered>being rendered</dfn> if it is <a href=#in-a-document>in a <code>Document</code></a>,
+ either its parent node is itself <a href=#being-rendered>being rendered</a> or it is the <code><a href=#document>Document</a></code>
+ node, and it is not explicitly excluded from the rendering using either:</p>
+
<ul class=brief><li>the CSS 'display' property's 'none' value, or</li>
<li>the 'visibility' property's 'collapse' value unless it is being treated as equivalent to the 'hidden' value, or</li>
<li>some equivalent in other styling languages.</li>
- </ul><p class=note>Just being off-screen does not mean the element is
- not <a href=#being-rendered>being rendered</a>. The presence of the <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute normally means the
- element is not <a href=#being-rendered>being rendered</a>, though this might be
- overridden by the style sheets.</p>
+ </ul><p class=note>Just being off-screen does not mean the element is not <a href=#being-rendered>being
+ rendered</a>. The presence of the <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute normally
+ means the element is not <a href=#being-rendered>being rendered</a>, though this might be overridden by the style
+ sheets.</p>
- <hr><p>User agents that do not honor author-level CSS style sheets are
- nonetheless expected to act as if they applied the CSS rules given
- in these sections in a manner consistent with this specification and
- the relevant CSS and Unicode specifications. <a href=#refsCSS>[CSS]</a> <a href=#refsUNICODE>[UNICODE]</a> <a href=#refsBIDI>[BIDI]</a></p>
+ <hr><p>User agents that do not honor author-level CSS style sheets are nonetheless expected to act as
+ if they applied the CSS rules given in these sections in a manner consistent with this
+ specification and the relevant CSS and Unicode specifications. <a href=#refsCSS>[CSS]</a> <a href=#refsUNICODE>[UNICODE]</a> <a href=#refsBIDI>[BIDI]</a></p>
- <p class=note>This is especially important for issues relating to
- the 'display', 'unicode-bidi', and 'direction' properties.</p>
+ <p class=note>This is especially important for issues relating to the 'display', 'unicode-bidi',
+ and 'direction' properties.</p>
@@ -92770,10 +92506,9 @@
embed[hidden] { display: inline; height: 0; width: 0; }</pre> <!-- because for legacy reasons it still needs to instantiate the plugin -->
-<!--CLEANUP-->
- <p>The user agent is expected to force the 'display' property of
- <code><a href=#the-noscript-element>noscript</a></code> elements for whom <a href=#concept-n-script title=concept-n-script>scripting is enabled</a> to compute to
- 'none', irrespective of CSS rules.</p>
+ <p>The user agent is expected to force the 'display' property of <code><a href=#the-noscript-element>noscript</a></code> elements
+ for whom <a href=#concept-n-script title=concept-n-script>scripting is enabled</a> to compute to 'none',
+ irrespective of CSS rules.</p>
<p>The user agent is expected to force the 'display' property of <code><a href=#the-input-element>input</a></code> elements whose
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#hidden-state-(type=hidden)" title=attr-input-type-hidden>Hidden</a> state to compute to 'none', irrespective of CSS
@@ -94016,13 +93751,12 @@
<td>On the right
<tr><td><code title="">center</code>
<td>In the middle
- </table><!--CLEANUP--><h3 id=replaced-elements><span class=secno>14.4 </span>Replaced elements</h3>
+ </table><h3 id=replaced-elements><span class=secno>14.4 </span>Replaced elements</h3>
<h4 id=embedded-content-2><span class=secno>14.4.1 </span>Embedded content</h4>
- <p>The <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, and
- <code><a href=#the-video-element>video</a></code> elements are expected to be treated as replaced
- elements.</p>
+ <p>The <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, and <code><a href=#the-video-element>video</a></code> elements are expected to be
+ treated as replaced elements.</p>
<p>A <code><a href=#the-canvas-element>canvas</a></code> element that <a href=#represents>represents</a> <a href=#embedded-content>embedded content</a> is
expected to be treated as a replaced element; the contents of such elements are the element's
@@ -94030,56 +93764,44 @@
element. Other <code><a href=#the-canvas-element>canvas</a></code> elements are expected to be treated as ordinary elements in the
rendering model.</p>
- <p>An <code><a href=#the-object-element>object</a></code> element that <a href=#represents>represents</a> an
- image, plugin, or <a href=#nested-browsing-context>nested browsing context</a> is expected
- to be treated as a replaced element. Other <code><a href=#the-object-element>object</a></code>
- elements are expected to be treated as ordinary elements in the
- rendering model.</p>
+ <p>An <code><a href=#the-object-element>object</a></code> element that <a href=#represents>represents</a> an image, plugin, or <a href=#nested-browsing-context>nested
+ browsing context</a> is expected to be treated as a replaced element. Other <code><a href=#the-object-element>object</a></code>
+ elements are expected to be treated as ordinary elements in the rendering model.</p>
- <p>An <code><a href=#the-applet-element>applet</a></code> element that <a href=#represents>represents</a> a
- <a href=#plugin>plugin</a> is expected to be treated as a replaced
- element. Other <code><a href=#the-applet-element>applet</a></code> elements are expected to be
- treated as ordinary elements in the rendering model.</p>
+ <p>An <code><a href=#the-applet-element>applet</a></code> element that <a href=#represents>represents</a> a <a href=#plugin>plugin</a> is expected
+ to be treated as a replaced element. Other <code><a href=#the-applet-element>applet</a></code> elements are expected to be treated
+ as ordinary elements in the rendering model.</p>
- <p>The <code><a href=#the-audio-element>audio</a></code> element, when it is <a href=#expose-a-user-interface-to-the-user title="expose a
- user interface to the user">exposing a user interface</a>, is
- expected to be treated as a replaced element about one line high, as
- wide as is necessary to expose the user agent's user interface
- features. When an <code><a href=#the-audio-element>audio</a></code> element is not <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a user
- interface</a>, the user agent is expected to force its 'display'
- property to compute to 'none', irrespective of CSS rules.</p>
+ <p>The <code><a href=#the-audio-element>audio</a></code> element, when it is <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the
+ user">exposing a user interface</a>, is expected to be treated as a replaced element about one
+ line high, as wide as is necessary to expose the user agent's user interface features. When an
+ <code><a href=#the-audio-element>audio</a></code> element is not <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a
+ user interface</a>, the user agent is expected to force its 'display' property to compute to
+ 'none', irrespective of CSS rules.</p>
- <p>Whether a <code><a href=#the-video-element>video</a></code> element is <a href=#expose-a-user-interface-to-the-user title="expose a
- user interface to the user">exposing a user interface</a> is not
- expected to affect the size of the rendering; controls are expected
- to be overlaid above the page content without causing any layout
- changes, and are expected to disappear when the user does not need
- them.</p>
+ <p>Whether a <code><a href=#the-video-element>video</a></code> element is <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the
+ user">exposing a user interface</a> is not expected to affect the size of the rendering;
+ controls are expected to be overlaid above the page content without causing any layout changes,
+ and are expected to disappear when the user does not need them.</p>
- <p>When a <code><a href=#the-video-element>video</a></code> element represents a poster frame or
- frame of video, the poster frame or frame of video is expected to be
- rendered at the largest size that maintains the aspect ratio of that
- poster frame or frame of video without being taller or wider than
- the <code><a href=#the-video-element>video</a></code> element itself, and is expected to be
- centered in the <code><a href=#the-video-element>video</a></code> element.</p>
+ <p>When a <code><a href=#the-video-element>video</a></code> element represents a poster frame or frame of video, the poster frame
+ or frame of video is expected to be rendered at the largest size that maintains the aspect ratio
+ of that poster frame or frame of video without being taller or wider than the <code><a href=#the-video-element>video</a></code>
+ element itself, and is expected to be centered in the <code><a href=#the-video-element>video</a></code> element.</p>
- <p>Any subtitles or captions are expected to be overlayed directly
- on top of their <code><a href=#the-video-element>video</a></code> element, as defined by the
- relevant rendering rules; for <a href=#webvtt>WebVTT</a>, those are the
- <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
+ <p>Any subtitles or captions are expected to be overlayed directly on top of their
+ <code><a href=#the-video-element>video</a></code> element, as defined by the relevant rendering rules; for <a href=#webvtt>WebVTT</a>,
+ those are the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
- <p>When the user agent starts <a href=#expose-a-user-interface-to-the-user title="expose a user interface
- to the user">exposing a user interface</a> for a
- <code><a href=#the-video-element>video</a></code> element, the user agent should run the
- <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a> of each of
- the <a href=#text-track title="text track">text tracks</a> in the
- <code><a href=#the-video-element>video</a></code> element's <a href=#list-of-text-tracks>list of text tracks</a> that
- are <a href=#text-track-showing title="text track showing">showing</a> (e.g., for <a href=#text-track title="text track">text tracks</a> based on <a href=#webvtt>WebVTT</a>,
- the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
+ <p>When the user agent starts <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a user
+ interface</a> for a <code><a href=#the-video-element>video</a></code> element, the user agent should run the <a href=#rules-for-updating-the-text-track-rendering>rules for
+ updating the text track rendering</a> of each of the <a href=#text-track title="text track">text
+ tracks</a> in the <code><a href=#the-video-element>video</a></code> element's <a href=#list-of-text-tracks>list of text tracks</a> that are <a href=#text-track-showing title="text track showing">showing</a> (e.g., for <a href=#text-track title="text track">text tracks</a>
+ based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
tracks</a>). <a href=#refsWEBVTT>[WEBVTT]</a></p>
- <p class=note>Resizing <code><a href=#the-video-element>video</a></code> and <code><a href=#the-canvas-element>canvas</a></code>
- elements does not interrupt video playback or clear the canvas.</p>
+ <p class=note>Resizing <code><a href=#the-video-element>video</a></code> and <code><a href=#the-canvas-element>canvas</a></code> elements does not interrupt
+ video playback or clear the canvas.</p>
<hr><p>The following CSS rules are expected to apply:</p>
@@ -94092,75 +93814,56 @@
<h4 id=images-0><span class=secno>14.4.2 </span>Images</h4>
- <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element
- when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state
- <a href=#represents>represents</a> an image, it is expected to be treated as a
- replaced element.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image
+ Button</a> state <a href=#represents>represents</a> an image, it is expected to be treated as a replaced
+ element.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element
- when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state
- does not <a href=#represents title=represents>represent</a> an image, but the
- element already has intrinsic dimensions (e.g. from the
- <a href=#dimension-attributes>dimension attributes</a> or CSS rules), and either the user
- agent has reason to believe that the image will become <i title=img-available><a href=#img-available>available</a></i><!--input-img-available also-->
- and be rendered in due course or the <code><a href=#document>Document</a></code> is in
- <a href=#quirks-mode>quirks mode</a>, the element is expected to be treated as a
- replaced element whose content is the text that the element
- represents, if any, optionally alongside an icon indicating that the
- image is being obtained. For <code><a href=#the-input-element>input</a></code> elements, the text
- is expected to appear button-like to indicate that the element is a
- <a href=#concept-button title=concept-button>button</a>.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image
+ Button</a> state does not <a href=#represents title=represents>represent</a> an image, but the element
+ already has intrinsic dimensions (e.g. from the <a href=#dimension-attributes>dimension attributes</a> or CSS rules),
+ and either the user agent has reason to believe that the image will become <i title=img-available><a href=#img-available>available</a></i><!--input-img-available also--> and be rendered in due course
+ or the <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>, the element is expected to be treated
+ as a replaced element whose content is the text that the element represents, if any, optionally
+ alongside an icon indicating that the image is being obtained. For <code><a href=#the-input-element>input</a></code> elements,
+ the text is expected to appear button-like to indicate that the element is a <a href=#concept-button title=concept-button>button</a>.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> some
- text and the user agent does not expect this to change, the element
- is expected to be treated as a non-replaced phrasing element whose
- content is the text, optionally with an icon indicating that an
- image is missing.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> some text and the user agent does not
+ expect this to change, the element is expected to be treated as a non-replaced phrasing element
+ whose content is the text, optionally with an icon indicating that an image is missing.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> nothing
- and the user agent does not expect this to change, the element is
- expected to not be rendered at all.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> nothing and the user agent does not
+ expect this to change, the element is expected to not be rendered at all.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element might be a key part of the
- content, but neither the image nor any kind of alternative text is
- available, and the user agent does not expect this to change, the
- element is expected to be treated as a non-replaced phrasing element
- whose content is an icon indicating that an image is missing.</p>
- <!-- there's also a should requirement for this case in the <img>
- section itself -->
+ <p>When an <code><a href=#the-img-element>img</a></code> element might be a key part of the content, but neither the image nor
+ any kind of alternative text is available, and the user agent does not expect this to change, the
+ element is expected to be treated as a non-replaced phrasing element whose content is an icon
+ indicating that an image is missing.</p> <!-- there's also a should requirement for this case in
+ the <img> section itself -->
- <p>When an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state does not
- <a href=#represents title=represents>represent</a> an image and the user
- agent does not expect this to change, the element is expected to be
- treated as a replaced element consisting of a button whose content
- is the element's alternative text. The intrinsic dimensions of the
- button are expected to be about one line in height and whatever
- width is necessary to render the text on one line.</p>
+ <p>When an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is
+ in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state does not <a href=#represents title=represents>represent</a> an image and the user agent does not expect this to change,
+ the element is expected to be treated as a replaced element consisting of a button whose content
+ is the element's alternative text. The intrinsic dimensions of the button are expected to be about
+ one line in height and whatever width is necessary to render the text on one line.</p>
- <p>The icons mentioned above are expected to be relatively small so
- as not to disrupt most text but be easily clickable. In a visual
- environment, for instance, icons could be 16 pixels by 16 pixels
- square, or 1em by 1em if the images are scalable. In an audio
- environment, the icon could be a short bleep. The icons are intended
- to indicate to the user that they can be used to get to whatever
- options the UA provides for images, and, where appropriate, are
- expected to provide access to the context menu that would have come
- up if the user interacted with the actual image.</p>
+ <p>The icons mentioned above are expected to be relatively small so as not to disrupt most text
+ but be easily clickable. In a visual environment, for instance, icons could be 16 pixels by 16
+ pixels square, or 1em by 1em if the images are scalable. In an audio environment, the icon could
+ be a short bleep. The icons are intended to indicate to the user that they can be used to get to
+ whatever options the UA provides for images, and, where appropriate, are expected to provide
+ access to the context menu that would have come up if the user interacted with the actual
+ image.</p>
- <hr><p>All animated images with the same <a href=#absolute-url>absolute URL</a> and
- the same image data are expected to be rendered synchronized to the
- same timeline as a group, with the timeline starting at the time of
- the most recent addition to the group.</p>
+ <hr><p>All animated images with the same <a href=#absolute-url>absolute URL</a> and the same image data are
+ expected to be rendered synchronized to the same timeline as a group, with the timeline starting
+ at the time of the most recent addition to the group.</p>
- <p class=note>In other words, the animation loop of an animated
- image is restarted each time another image with the same
- <a href=#absolute-url>absolute URL</a> and image data begins to animate, e.g.
- after being inserted into the document.</p>
+ <p class=note>In other words, the animation loop of an animated image is restarted each time
+ another image with the same <a href=#absolute-url>absolute URL</a> and image data begins to animate, e.g. after
+ being inserted into the document.</p>
- <hr><p>The following CSS rules are expected to apply when the
- <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>:</p>
+ <hr><p>The following CSS rules are expected to apply when the <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks
+ mode</a>:</p>
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
@@ -96957,12 +96660,11 @@
<!-- http://www.w3.org/2002/06/registering-mediatype.html -->
-<!--CLEANUP-->
<h3 id=text/html><span class=secno>16.1 </span><dfn><code>text/html</code></dfn></h3>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
@@ -97002,43 +96704,34 @@
<dt>Security considerations:</dt>
<dd>
- <p>Entire novels have been written about the security
- considerations that apply to HTML documents. Many are listed in
- this document, to which the reader is referred for more
- details. Some general concerns bear mentioning here, however:</p>
+ <p>Entire novels have been written about the security considerations that apply to HTML
+ documents. Many are listed in this document, to which the reader is referred for more details.
+ Some general concerns bear mentioning here, however:</p>
- <p>HTML is scripted language, and has a large number of APIs (some
- of which are described in this document). Script can expose the
- user to potential risks of information leakage, credential
- leakage, cross-site scripting attacks, cross-site request
- forgeries, and a host of other problems. While the designs in this
- specification are intended to be safe if implemented correctly, a
- full implementation is a massive undertaking and, as with any
- software, user agents are likely to have security bugs.</p>
+ <p>HTML is scripted language, and has a large number of APIs (some of which are described in
+ this document). Script can expose the user to potential risks of information leakage, credential
+ leakage, cross-site scripting attacks, cross-site request forgeries, and a host of other
+ problems. While the designs in this specification are intended to be safe if implemented
+ correctly, a full implementation is a massive undertaking and, as with any software, user agents
+ are likely to have security bugs.</p>
- <p>Even without scripting, there are specific features in HTML
- which, for historical reasons, are required for broad
- compatibility with legacy content but that expose the user to
- unfortunate security problems. In particular, the <code><a href=#the-img-element>img</a></code>
- element can be used in conjunction with some other features as a
- way to effect a port scan from the user's location on the
- Internet. This can expose local network topologies that the
- attacker would otherwise not be able to determine.</p>
+ <p>Even without scripting, there are specific features in HTML which, for historical reasons,
+ are required for broad compatibility with legacy content but that expose the user to unfortunate
+ security problems. In particular, the <code><a href=#the-img-element>img</a></code> element can be used in conjunction with
+ some other features as a way to effect a port scan from the user's location on the Internet.
+ This can expose local network topologies that the attacker would otherwise not be able to
+ determine.</p>
- <p>HTML relies on a compartmentalization scheme sometimes known as
- the <i>same-origin policy</i>. An <a href=#origin>origin</a> in most
- cases consists of all the pages served from the same host, on the
- same port, using the same protocol.</p>
+ <p>HTML relies on a compartmentalization scheme sometimes known as the <i>same-origin
+ policy</i>. An <a href=#origin>origin</a> in most cases consists of all the pages served from the same
+ host, on the same port, using the same protocol.</p>
- <p>It is critical, therefore, to ensure that any untrusted content
- that forms part of a site be hosted on a different
- <a href=#origin>origin</a> than any sensitive content on that site.
- Untrusted content can easily spoof any other page on the same
- origin, read data from that origin, cause scripts in that origin
- to execute, submit forms to and from that origin even if they are
- protected from cross-site request forgery attacks by unique
- tokens, and make use of any third-party resources exposed to or
- rights granted to that origin.</p>
+ <p>It is critical, therefore, to ensure that any untrusted content that forms part of a site be
+ hosted on a different <a href=#origin>origin</a> than any sensitive content on that site. Untrusted
+ content can easily spoof any other page on the same origin, read data from that origin, cause
+ scripts in that origin to execute, submit forms to and from that origin even if they are
+ protected from cross-site request forgery attacks by unique tokens, and make use of any
+ third-party resources exposed to or rights granted to that origin.</p>
</dd>
<!--REMOVE-TOPIC:Security-->
@@ -97082,17 +96775,16 @@
<dd>Ian Hickson <ian at hixie.ch></dd>
<dt>Change controller:</dt>
<dd>W3C</dd>
- </dl><p>Fragment identifiers used with <code><a href=#text/html>text/html</a></code> resources
- either refer to <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> or
- provide state information for in-page scripts.</p>
+ </dl><p>Fragment identifiers used with <code><a href=#text/html>text/html</a></code> resources either refer to <a href=#the-indicated-part-of-the-document>the
+ indicated part of the document</a> or provide state information for in-page scripts.</p>
<h3 id=multipart/x-mixed-replace><span class=secno>16.2 </span><dfn><code>multipart/x-mixed-replace</code></dfn></h3>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
Modified: index
===================================================================
--- index 2013-03-25 23:18:45 UTC (rev 7770)
+++ index 2013-03-25 23:36:37 UTC (rev 7771)
@@ -6945,25 +6945,22 @@
<h4 id=content-type-sniffing><span class=secno>2.6.4 </span>Determining the type of a resource</h4>
-<!--CLEANUP-->
<p>The <dfn id=content-type title=Content-Type>Content-Type metadata</dfn> of a resource must be obtained and
- interpreted in a manner consistent with the requirements of the MIME Sniffing specification.
- <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
+ interpreted in a manner consistent with the requirements of the MIME Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
<p>The <dfn id=content-type-sniffing-0 title="Content-Type sniffing">sniffed type of a resource</dfn> must be found in a
- manner consistent with the requirements given in the MIME Sniffing specification for finding
- the <i>sniffed media type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
+ manner consistent with the requirements given in the MIME Sniffing specification for finding the
+ <i>sniffed media type</i> of the relevant sequence of octets. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
<p>The <dfn id=content-type-sniffing:-image title="Content-Type sniffing: image">rules for sniffing images specifically</dfn> and
the <dfn id=content-type-sniffing:-text-or-binary title="Content-Type sniffing: text or binary">rules for distinguishing if a resource is
text or binary</dfn> are also defined in the MIME Sniffing specification. Both sets of rules
return a <a href=#mime-type>MIME type</a> as their result. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
- <p class=warning>It is imperative that the rules in the MIME Sniffing specification be
- followed exactly. When a user agent uses different heuristics for content type detection than the
- server expects, security problems can occur. For more details, see the MIME Sniffing
- specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
+ <p class=warning>It is imperative that the rules in the MIME Sniffing specification be followed
+ exactly. When a user agent uses different heuristics for content type detection than the server
+ expects, security problems can occur. For more details, see the MIME Sniffing specification. <a href=#refsMIMESNIFF>[MIMESNIFF]</a></p>
<h4 id=extracting-character-encodings-from-meta-elements><span class=secno>2.6.5 </span>Extracting character encodings from <code><a href=#the-meta-element>meta</a></code> elements</h4>
@@ -13828,9 +13825,9 @@
ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
<pre>style = no-c-start *( c-start no-c-end c-end no-c-start )
-no-c-start = <any string that doesn't contain a substring that matches c-start >
+no-c-start = < any string that doesn't contain a substring that matches c-start >
c-start = "<!--"
-no-c-end = <any string that doesn't contain a substring that matches c-end >
+no-c-end = < any string that doesn't contain a substring that matches c-end >
c-end = "-->"</pre>
<!-- Unmatched comment-like syntax is invalid on a temporary basis,
@@ -14967,15 +14964,13 @@
<!--<li>"<code>application/xhtml+xml</code>"-->
<!--<li>"<code>image/svg+xml</code>"-->
- <!-- the commented-out ones aren't listed here because they
- couldn't sanely be interpreted as a scripting language anyway:
- they're defined to be something else. I just don't want this to
+ <!-- the commented-out ones aren't listed here because they couldn't sanely be interpreted as a
+ scripting language anyway: they're defined to be something else. I just don't want this to
devolve into a list of every non-scripting type in existence. -->
- </ul><p class=note>These types are explicitly listed here because they
- are poorly-defined types that are nonetheless likely to be used as
- formats for data blocks, and it would be problematic if they were
- suddenly to be interpreted as script by a user agent.</p>
+ </ul><p class=note>These types are explicitly listed here because they are poorly-defined types that
+ are nonetheless likely to be used as formats for data blocks, and it would be problematic if they
+ were suddenly to be interpreted as script by a user agent.</p>
<!-- a similar paragraph is also present in the <style> section -->
@@ -14992,20 +14987,19 @@
<h5 id=restrictions-for-contents-of-script-elements><span class=secno>4.3.1.2 </span><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
- <p>The <code><a href=#textcontent>textContent</a></code> of a <code><a href=#the-script-element>script</a></code> element
- must match the <code title="">script</code> production in the
- following ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
+ <p>The <code><a href=#textcontent>textContent</a></code> of a <code><a href=#the-script-element>script</a></code> element must match the <code title="">script</code> production in the following ABNF, the character set for which is Unicode.
+ <a href=#refsABNF>[ABNF]</a></p>
<pre>script = data1 *( escape [ script-start data3 ] "-->" data1 ) [ escape ]
escape = "<!--" data2 *( script-start data3 script-end data2 )
-data1 = <any string that doesn't contain a substring that matches not-data1>
+data1 = < any string that doesn't contain a substring that matches not-data1 >
not-data1 = <!-- script-end / -->"<!--" <!-- the script-end is redundant here since it would close the element -->
-data2 = <any string that doesn't contain a substring that matches not-data2>
+data2 = < any string that doesn't contain a substring that matches not-data2 >
not-data2 = <!-- script-end / -->script-start / "-->" <!-- the script-end is redundant here since it would close the element -->
-data3 = <any string that doesn't contain a substring that matches not-data3>
+data3 = < any string that doesn't contain a substring that matches not-data3 >
not-data3 = script-end / "-->"
script-start = lt s c r i p t tag-end
@@ -15034,18 +15028,16 @@
tag-end =/ %x002F ; U+002F SOLIDUS (/)
tag-end =/ %x003E ; U+003E GREATER-THAN SIGN (>)</pre>
- <p>When a <code><a href=#the-script-element>script</a></code> element contains <a href=#inline-documentation-for-external-scripts>script
- documentation</a>, there are further restrictions on the contents
- of the element, as described in the section below.</p>
+ <p>When a <code><a href=#the-script-element>script</a></code> element contains <a href=#inline-documentation-for-external-scripts>script documentation</a>, there are
+ further restrictions on the contents of the element, as described in the section below.</p>
<h5 id=inline-documentation-for-external-scripts><span class=secno>4.3.1.3 </span><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
- <p>If a <code><a href=#the-script-element>script</a></code> element's <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is specified, then the
- contents of the <code><a href=#the-script-element>script</a></code> element, if any, must be such
- that the value of the <code title=dom-script-text><a href=#dom-script-text>text</a></code> IDL
- attribute, which is derived from the element's contents, matches the
- <code title="">documentation</code> production in the following
+ <p>If a <code><a href=#the-script-element>script</a></code> element's <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is
+ specified, then the contents of the <code><a href=#the-script-element>script</a></code> element, if any, must be such that the
+ value of the <code title=dom-script-text><a href=#dom-script-text>text</a></code> IDL attribute, which is derived from the
+ element's contents, matches the <code title="">documentation</code> production in the following
ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
<pre>documentation = *( *( space / tab / comment ) [ line-comment ] newline )
@@ -15065,20 +15057,18 @@
not-slash = %x0000-002E / %x0030-10FFFF
; a <a href=#unicode-character>Unicode character</a> other than U+002F SOLIDUS (/)</pre>
- <p class=note>This corresponds to putting the contents of the
- element in JavaScript comments.</p>
+ <p class=note>This corresponds to putting the contents of the element in JavaScript
+ comments.</p>
- <p class=note>This requirement is in addition to the earlier
- restrictions on the syntax of contents of <code><a href=#the-script-element>script</a></code>
- elements.</p>
+ <p class=note>This requirement is in addition to the earlier restrictions on the syntax of
+ contents of <code><a href=#the-script-element>script</a></code> elements.</p>
<div class=example>
- <p>This allows authors to include documentation, such as license
- information or API information, inside their documents while still
- referring to external script files. The syntax is constrained so
- that authors don't accidentally include what looks like valid
- script while also providing a <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute.</p>
+ <p>This allows authors to include documentation, such as license information or API information,
+ inside their documents while still referring to external script files. The syntax is constrained
+ so that authors don't accidentally include what looks like valid script while also providing a
+ <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute.</p>
<pre><script src="cool-effects.js">
// create new instances using:
@@ -25886,16 +25876,14 @@
<!-- could define how to sniff for an image here -->
- <li><p>If an image is thus obtained, the <a href=#poster-frame>poster frame</a>
- is that image. Otherwise, there is no <a href=#poster-frame>poster
- frame</a>.</li>
+ <li><p>If an image is thus obtained, the <a href=#poster-frame>poster frame</a> is that image. Otherwise,
+ there is no <a href=#poster-frame>poster frame</a>.</li>
</ol></div>
- <p class=note>The image given by the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute, the <i><a href=#poster-frame>poster
- frame</a></i>, is intended to be a representative frame of the video
- (typically one of the first non-blank frames) that gives the user an
- idea of what the video is like.</p>
+ <p class=note>The image given by the <code title=attr-video-poster><a href=#attr-video-poster>poster</a></code> attribute,
+ the <i><a href=#poster-frame>poster frame</a></i>, is intended to be a representative frame of the video (typically one of
+ the first non-blank frames) that gives the user an idea of what the video is like.</p>
<div class=impl>
@@ -25934,9 +25922,8 @@
frame corresponding to the <a href=#current-playback-position>current playback position</a> in the video, the new frame
must be rendered.</dd>
- </dl><p class=note>Which frame in a video stream corresponds to a
- particular playback position is defined by the video stream's
- format.</p>
+ </dl><p class=note>Which frame in a video stream corresponds to a particular playback position is
+ defined by the video stream's format.</p>
<p>The <code><a href=#the-video-element>video</a></code> element also <a href=#represents>represents</a> any <a href=#text-track-cue title="text track
cue">text track cues</a> whose <a href=#text-track-cue-active-flag>text track cue active flag</a> is set and whose
@@ -25946,26 +25933,21 @@
<p>Any audio associated with the <a href=#media-resource>media resource</a> must, if played, be played
synchronized with the <a href=#current-playback-position>current playback position</a>, at the element's <a href=#effective-media-volume>effective
media volume</a>.</p>
-<!--CLEANUP-->
- <p>In addition to the above, the user agent may provide messages to
- the user (such as "buffering", "no video loaded", "error", or more
- detailed information) by overlaying text or icons on the video or
- other areas of the element's playback area, or in another
- appropriate manner.</p>
+ <p>In addition to the above, the user agent may provide messages to the user (such as "buffering",
+ "no video loaded", "error", or more detailed information) by overlaying text or icons on the video
+ or other areas of the element's playback area, or in another appropriate manner.</p>
- <p>User agents that cannot render the video may instead make the
- element <a href=#represents title=represents>represent</a> a link to an
- external video playback utility or to the video data itself.</p>
+ <p>User agents that cannot render the video may instead make the element <a href=#represents title=represents>represent</a> a link to an external video playback utility or to the video
+ data itself.</p>
- <p>When a <code><a href=#the-video-element>video</a></code> element's <a href=#media-resource>media resource</a>
- has a video channel, the element <a href=#provides-a-paint-source>provides a paint
- source</a> whose width is the <a href=#media-resource>media resource</a>'s <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>, whose
- height is the <a href=#media-resource>media resource</a>'s <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic height</a>, and
- whose appearance is the frame of video corresponding to the <a href=#current-playback-position title="current playback position">current playback position</a>,
- if that is available, or else (e.g. when the video is seeking or
- buffering) its previous appearance, if any, or else (e.g. because
- the video is still loading the first frame) blackness.</p>
+ <p>When a <code><a href=#the-video-element>video</a></code> element's <a href=#media-resource>media resource</a> has a video channel, the
+ element <a href=#provides-a-paint-source>provides a paint source</a> whose width is the <a href=#media-resource>media resource</a>'s
+ <a href=#concept-video-intrinsic-width title=concept-video-intrinsic-width>intrinsic width</a>, whose height is the
+ <a href=#media-resource>media resource</a>'s <a href=#concept-video-intrinsic-height title=concept-video-intrinsic-height>intrinsic
+ height</a>, and whose appearance is the frame of video corresponding to the <a href=#current-playback-position title="current playback position">current playback position</a>, if that is available, or else
+ (e.g. when the video is seeking or buffering) its previous appearance, if any, or else (e.g.
+ because the video is still loading the first frame) blackness.</p>
<hr></div>
@@ -26395,39 +26377,33 @@
</dl></div>
-<!--CLEANUP-->
- <p>The <dfn id=attr-source-media title=attr-source-media><code>media</code></dfn>
- attribute gives the intended media type of the <a href=#media-resource>media
- resource</a>, to help the user agent determine if this
- <a href=#media-resource>media resource</a> is useful to the user before fetching
- it. Its value must be a <a href=#valid-media-query>valid media query</a>.</p>
+ <p>The <dfn id=attr-source-media title=attr-source-media><code>media</code></dfn> attribute gives the intended media
+ type of the <a href=#media-resource>media resource</a>, to help the user agent determine if this <a href=#media-resource>media
+ resource</a> is useful to the user before fetching it. Its value must be a <a href=#valid-media-query>valid media
+ query</a>.</p>
<!-- for similar paragraphs, search for "The default, if the" -->
<p class=note id=source-default-media>The <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource
- selection algorithm</a> is defined in such a way that when the
- <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute is omitted
- the user agent acts the same as if the value was "<code title="">all</code>", i.e. by default the <a href=#media-resource>media
- resource</a> is suitable for all media.</p>
+ selection algorithm</a> is defined in such a way that when the <code title=attr-source-media><a href=#attr-source-media>media</a></code> attribute is omitted the user agent acts the same as if the
+ value was "<code title="">all</code>", i.e. by default the <a href=#media-resource>media resource</a> is suitable
+ for all media.</p>
<div class=impl>
- <p>If a <code><a href=#the-source-element>source</a></code> element is inserted as a child of a
- <a href=#media-element>media element</a> that has no <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute and whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value
- <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, the user
- agent must invoke the <a href=#media-element>media element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
+ <p>If a <code><a href=#the-source-element>source</a></code> element is inserted as a child of a <a href=#media-element>media element</a> that
+ has no <code title=attr-media-src><a href=#attr-media-src>src</a></code> attribute and whose <code title=dom-media-networkState><a href=#dom-media-networkstate>networkState</a></code> has the value <code title=dom-media-NETWORK_EMPTY><a href=#dom-media-network_empty>NETWORK_EMPTY</a></code>, the user agent must invoke the <a href=#media-element>media
+ element</a>'s <a href=#concept-media-load-algorithm title=concept-media-load-algorithm>resource selection
algorithm</a>.</p>
- <p>The IDL attributes <dfn id=dom-source-src title=dom-source-src><code>src</code></dfn>, <dfn id=dom-source-type title=dom-source-type><code>type</code></dfn>, and <dfn id=dom-source-media title=dom-source-media><code>media</code></dfn> must
- <a href=#reflect>reflect</a> the respective content attributes of the same
- name.</p>
+ <p>The IDL attributes <dfn id=dom-source-src title=dom-source-src><code>src</code></dfn>, <dfn id=dom-source-type title=dom-source-type><code>type</code></dfn>, and <dfn id=dom-source-media title=dom-source-media><code>media</code></dfn> must <a href=#reflect>reflect</a> the respective content
+ attributes of the same name.</p>
</div>
<div class=example>
- <p>If the author isn't sure if the user agents will all be able to
- render the media resources provided, the author can listen to the
- <code title=event-error>error</code> event on the last
+ <p>If the author isn't sure if the user agents will all be able to render the media resources
+ provided, the author can listen to the <code title=event-error>error</code> event on the last
<code><a href=#the-source-element>source</a></code> element and trigger fallback behavior:</p>
<pre><script>
@@ -31270,13 +31246,11 @@
<li>
-<!--CLEANUP-->
- <p>Create a new <a href=#text-track>text track</a> corresponding to the new
- object, and set its <a href=#text-track-kind>text track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its <a href=#text-track-readiness-state>text track readiness
- state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
- <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a>
- mode, and its <a href=#text-track-list-of-cues>text track list of cues</a> to an empty
- list.</p>
+ <p>Create a new <a href=#text-track>text track</a> corresponding to the new object, and set its <a href=#text-track-kind>text
+ track kind</a> to <var title="">kind</var>, its <a href=#text-track-label>text track label</a> to <var title="">label</var>, its <a href=#text-track-language>text track language</a> to <var title="">language</var>, its
+ <a href=#text-track-readiness-state>text track readiness state</a> to the <a href=#text-track-loaded>text track loaded</a> state, its
+ <a href=#text-track-mode>text track mode</a> to the <a href=#text-track-hidden>text track hidden</a> mode, and its <a href=#text-track-list-of-cues>text
+ track list of cues</a> to an empty list.</p>
<p>Initially, the <a href=#text-track-list-of-cues>text track list of cues</a> is not associated with any <a href=#rules-for-updating-the-text-track-rendering>rules
for updating the text track rendering</a>. When a <a href=#text-track-cue>text track cue</a> is added to it,
@@ -31286,8 +31260,8 @@
<li>
- <p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media
- element</a>'s <a href=#list-of-text-tracks>list of text tracks</a>.</p>
+ <p>Add the new <a href=#text-track>text track</a> to the <a href=#media-element>media element</a>'s <a href=#list-of-text-tracks>list of text
+ tracks</a>.</p>
</li>
@@ -31306,31 +31280,25 @@
</li>
- </ol><hr><p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn>
- attribute must return the <a href=#text-track-kind>text track kind</a> of the
- <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
+ </ol><hr><p>The <dfn id=dom-texttrack-kind title=dom-TextTrack-kind><code>kind</code></dfn> attribute must return the
+ <a href=#text-track-kind>text track kind</a> of the <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
represents.</p>
- <p>The <dfn id=dom-texttrack-label title=dom-TextTrack-label><code>label</code></dfn>
- attribute must return the <a href=#text-track-label>text track label</a> of the
- <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
- represents.</p>
+ <p>The <dfn id=dom-texttrack-label title=dom-TextTrack-label><code>label</code></dfn> attribute must return the
+ <a href=#text-track-label>text track label</a> of the <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code>
+ object represents.</p>
- <p>The <dfn id=dom-texttrack-language title=dom-TextTrack-language><code>language</code></dfn>
- attribute must return the <a href=#text-track-language>text track language</a> of the
- <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object
- represents.</p>
+ <p>The <dfn id=dom-texttrack-language title=dom-TextTrack-language><code>language</code></dfn> attribute must return the
+ <a href=#text-track-language>text track language</a> of the <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code>
+ object represents.</p>
<p>The <dfn id=dom-texttrack-inbandmetadatatrackdispatchtype title=dom-TextTrack-inBandMetadataTrackDispatchType><code>inBandMetadataTrackDispatchType</code></dfn>
- attribute must return the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track
- dispatch type</a> of the <a href=#text-track>text track</a> that the
- <code><a href=#texttrack>TextTrack</a></code> object represents.</p>
+ attribute must return the <a href=#text-track-in-band-metadata-track-dispatch-type>text track in-band metadata track dispatch type</a> of the
+ <a href=#text-track>text track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents.</p>
- <p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn>
- attribute, on getting, must return the string corresponding to the
- <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
- <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the
- following list:</p>
+ <p>The <dfn id=dom-texttrack-mode title=dom-TextTrack-mode><code>mode</code></dfn> attribute, on getting, must return
+ the string corresponding to the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that
+ the <code><a href=#texttrack>TextTrack</a></code> object represents, as defined by the following list:</p>
<dl><dt>"<dfn id=dom-texttrack-disabled title=dom-TextTrack-disabled><code>disabled</code></dfn>"</dt>
<dd>The <a href=#text-track-disabled>text track disabled</a> mode.</dd>
@@ -31338,17 +31306,15 @@
<dd>The <a href=#text-track-hidden>text track hidden</a> mode.</dd>
<dt>"<dfn id=dom-texttrack-showing title=dom-TextTrack-showing><code>showing</code></dfn>"</dt>
<dd>The <a href=#text-track-showing>text track showing</a> mode.</dd>
- </dl><p>On setting, if the new value isn't equal to what the attribute
- would currently return, the new value must be processed as
- follows:</p>
+ </dl><p>On setting, if the new value isn't equal to what the attribute would currently return, the new
+ value must be processed as follows:</p>
<dl class=switch><dt>If the new value is "<code title=dom-TextTrack-disabled><a href=#dom-texttrack-disabled>disabled</a></code>"</dt>
<dd>
- <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
- track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
- the <a href=#text-track-disabled>text track disabled</a> mode.</p>
+ <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+ <code><a href=#texttrack>TextTrack</a></code> object represents to the <a href=#text-track-disabled>text track disabled</a> mode.</p>
</dd>
@@ -31356,9 +31322,8 @@
<dd>
- <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
- track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
- the <a href=#text-track-hidden>text track hidden</a> mode.</p>
+ <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+ <code><a href=#texttrack>TextTrack</a></code> object represents to the <a href=#text-track-hidden>text track hidden</a> mode.</p>
</dd>
@@ -31366,9 +31331,8 @@
<dd>
- <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text
- track</a> that the <code><a href=#texttrack>TextTrack</a></code> object represents to
- the <a href=#text-track-showing>text track showing</a> mode.</p>
+ <p>Set the <a href=#text-track-mode>text track mode</a> of the <a href=#text-track>text track</a> that the
+ <code><a href=#texttrack>TextTrack</a></code> object represents to the <a href=#text-track-showing>text track showing</a> mode.</p>
</dd>
@@ -31558,122 +31522,101 @@
</dl><div class=impl>
-<!--CLEANUP-->
- <p>The <dfn id=dom-texttrackcue-track title=dom-TextTrackCue-track><code>track</code></dfn>
- attribute, on getting, must return the <code><a href=#texttrack>TextTrack</a></code> object
- of the <a href=#text-track>text track</a> in whose <a href=#text-track-list-of-cues title="text track list
- of cues">list of cues</a> the <a href=#text-track-cue>text track cue</a> that
- the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents finds itself, if
- any; or null otherwise.</p>
+ <p>The <dfn id=dom-texttrackcue-track title=dom-TextTrackCue-track><code>track</code></dfn> attribute, on getting, must
+ return the <code><a href=#texttrack>TextTrack</a></code> object of the <a href=#text-track>text track</a> in whose <a href=#text-track-list-of-cues title="text
+ track list of cues">list of cues</a> the <a href=#text-track-cue>text track cue</a> that the
+ <code><a href=#texttrackcue>TextTrackCue</a></code> object represents finds itself, if any; or null otherwise.</p>
- <p>The <dfn id=dom-texttrackcue-id title=dom-TextTrackCue-id><code>id</code></dfn>
- attribute, on getting, must return the <a href=#text-track-cue-identifier>text track cue
- identifier</a> of the <a href=#text-track-cue>text track cue</a> that the
+ <p>The <dfn id=dom-texttrackcue-id title=dom-TextTrackCue-id><code>id</code></dfn> attribute, on getting, must return
+ the <a href=#text-track-cue-identifier>text track cue identifier</a> of the <a href=#text-track-cue>text track cue</a> that the
<code><a href=#texttrackcue>TextTrackCue</a></code> object represents. On setting, the <a href=#text-track-cue-identifier>text track cue
identifier</a> must be set to the new value.</p>
- <p>The <dfn id=dom-texttrackcue-starttime title=dom-TextTrackCue-startTime><code>startTime</code></dfn>
- attribute, on getting, must return the <a href=#text-track-cue-start-time>text track cue start
- time</a> of the <a href=#text-track-cue>text track cue</a> that the
- <code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-start-time>text track cue start
- time</a> must be set to the new value, interpreted in seconds.</p>
+ <p>The <dfn id=dom-texttrackcue-starttime title=dom-TextTrackCue-startTime><code>startTime</code></dfn> attribute, on getting,
+ must return the <a href=#text-track-cue-start-time>text track cue start time</a> of the <a href=#text-track-cue>text track cue</a> that the
+ <code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-start-time>text track cue
+ start time</a> must be set to the new value, interpreted in seconds.</p>
- <p>The <dfn id=dom-texttrackcue-endtime title=dom-TextTrackCue-endTime><code>endTime</code></dfn>
- attribute, on getting, must return the <a href=#text-track-cue-end-time>text track cue end
- time</a> of the <a href=#text-track-cue>text track cue</a> that the
+ <p>The <dfn id=dom-texttrackcue-endtime title=dom-TextTrackCue-endTime><code>endTime</code></dfn> attribute, on getting,
+ must return the <a href=#text-track-cue-end-time>text track cue end time</a> of the <a href=#text-track-cue>text track cue</a> that the
<code><a href=#texttrackcue>TextTrackCue</a></code> object represents, in seconds. On setting, the <a href=#text-track-cue-end-time>text track cue end
time</a> must be set to the new value, interpreted in seconds.</p>
- <p>The <dfn id=dom-texttrackcue-pauseonexit title=dom-TextTrackCue-pauseOnExit><code>pauseOnExit</code></dfn>
- attribute, on getting, must return true if the <a href=#text-track-cue-pause-on-exit-flag>text track cue
- pause-on-exit flag</a> of the <a href=#text-track-cue>text track cue</a> that
- the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents is set; or false
- otherwise. On setting, the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit
- flag</a> must be set if the new value is true, and must be unset
- otherwise.</p>
+ <p>The <dfn id=dom-texttrackcue-pauseonexit title=dom-TextTrackCue-pauseOnExit><code>pauseOnExit</code></dfn> attribute, on
+ getting, must return true if the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a> of the <a href=#text-track-cue>text
+ track cue</a> that the <code><a href=#texttrackcue>TextTrackCue</a></code> object represents is set; or false otherwise.
+ On setting, the <a href=#text-track-cue-pause-on-exit-flag>text track cue pause-on-exit flag</a> must be set if the new value is
+ true, and must be unset otherwise.</p>
</div>
<h6 id=text-tracks-describing-chapters><span class=secno>4.8.10.12.6 </span>Text tracks describing chapters</h6>
-<!--CLEANUP-->
- <p>Chapters are segments of a <a href=#media-resource>media resource</a> with a
- given title. Chapters can be nested, in the same way that sections
- in a document outline can have subsections.</p>
+ <p>Chapters are segments of a <a href=#media-resource>media resource</a> with a given title. Chapters can be
+ nested, in the same way that sections in a document outline can have subsections.</p>
- <p>Each <a href=#text-track-cue>text track cue</a> in a <a href=#text-track>text track</a>
- being used for describing chapters has three key features: the
- <a href=#text-track-cue-start-time>text track cue start time</a>, giving the start time of the
- chapter, the <a href=#text-track-cue-end-time>text track cue end time</a>, giving the end
- time of the chapter, and the <a href=#text-track-cue-text>text track cue text</a> giving
- the chapter title.</p>
+ <p>Each <a href=#text-track-cue>text track cue</a> in a <a href=#text-track>text track</a> being used for describing
+ chapters has three key features: the <a href=#text-track-cue-start-time>text track cue start time</a>, giving the start time
+ of the chapter, the <a href=#text-track-cue-end-time>text track cue end time</a>, giving the end time of the chapter, and
+ the <a href=#text-track-cue-text>text track cue text</a> giving the chapter title.</p>
<div class=impl>
- <p>The <dfn id=rules-for-constructing-the-chapter-tree-from-a-text-track>rules for constructing the chapter tree from a text
- track</dfn> are as follows. They produce a potentially nested list
- of chapters, each of which have a start time, end time, title, and a
- list of nested chapters. This algorithm discards cues that do not
- correctly nest within each other, or that are out of order.</p>
+ <p>The <dfn id=rules-for-constructing-the-chapter-tree-from-a-text-track>rules for constructing the chapter tree from a text track</dfn> are as follows. They
+ produce a potentially nested list of chapters, each of which have a start time, end time, title,
+ and a list of nested chapters. This algorithm discards cues that do not correctly nest within each
+ other, or that are out of order.</p>
- <ol><li><p>Let <var title="">list</var> be a copy of the <a href=#text-track-list-of-cues title="text track list of cues">list of cues</a> of the
- <a href=#text-track>text track</a> being processed.</li>
+ <ol><li><p>Let <var title="">list</var> be a copy of the <a href=#text-track-list-of-cues title="text track list of cues">list
+ of cues</a> of the <a href=#text-track>text track</a> being processed.</li>
- <li><p>Remove from <var title="">list</var> any <a href=#text-track-cue>text track
- cue</a> whose <a href=#text-track-cue-end-time>text track cue end time</a> is before its
- <a href=#text-track-cue-start-time>text track cue start time</a>.</li>
+ <li><p>Remove from <var title="">list</var> any <a href=#text-track-cue>text track cue</a> whose <a href=#text-track-cue-end-time>text
+ track cue end time</a> is before its <a href=#text-track-cue-start-time>text track cue start time</a>.</li>
- <li><p>Let <var title="">output</var> be an empty list of chapters,
- where a chapter is a record consisting of a start time, an end
- time, a title, and a (potentially empty) list of nested chapters.
- For the purpose of this algorithm, each chapter also has a parent
- chapter.</li>
+ <li><p>Let <var title="">output</var> be an empty list of chapters, where a chapter is a record
+ consisting of a start time, an end time, a title, and a (potentially empty) list of nested
+ chapters. For the purpose of this algorithm, each chapter also has a parent chapter.</li>
- <li><p>Let <var title="">current chapter</var> be a stand-in
- chapter whose start time is negative infinity, whose end time is
- positive infinity, and whose list of nested chapters is <var title="">output</var>. (This is just used to make the algorithm
- easier to describe.)</li>
+ <li><p>Let <var title="">current chapter</var> be a stand-in chapter whose start time is negative
+ infinity, whose end time is positive infinity, and whose list of nested chapters is <var title="">output</var>. (This is just used to make the algorithm easier to describe.)</li>
<!-- while not empty... -->
- <li><p><i>Loop</i>: If <var title="">list</var> is empty, jump to
- the step labeled <i>end</i>.</li>
+ <li><p><i>Loop</i>: If <var title="">list</var> is empty, jump to the step labeled
+ <i>end</i>.</li>
<!-- do... -->
- <li><p>Let <var title="">current cue</var> be the first cue in <var title="">list</var>, and then remove it from <var title="">list</var>.</li>
+ <li><p>Let <var title="">current cue</var> be the first cue in <var title="">list</var>, and then
+ remove it from <var title="">list</var>.</li>
- <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue
- start time</a> is less than the start time of <var title="">current chapter</var>, then return to the step labeled
+ <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue start time</a> is less than
+ the start time of <var title="">current chapter</var>, then return to the step labeled
<i>loop</i>.</p> <!-- out of order chapter -->
- <li><p>While <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue
- start time</a> is greater than or equal to <var title="">current
- chapter</var>'s end time, let <var title="">current chapter</var>
- be <var title="">current chapter</var>'s parent chapter.</li>
+ <li><p>While <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue start time</a> is greater
+ than or equal to <var title="">current chapter</var>'s end time, let <var title="">current
+ chapter</var> be <var title="">current chapter</var>'s parent chapter.</li>
- <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-end-time>text track cue
- end time</a> is greater than the end time of <var title="">current chapter</var>, then return to the step labeled
+ <li><p>If <var title="">current cue</var>'s <a href=#text-track-cue-end-time>text track cue end time</a> is greater than
+ the end time of <var title="">current chapter</var>, then return to the step labeled
<i>loop</i>.</p> <!-- misnested chapter -->
- <li><p>Create a new chapter <var title="">new chapter</var>, whose
- start time is <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track
- cue start time</a>, whose end time is <var title="">current
- cue</var>'s <a href=#text-track-cue-end-time>text track cue end time</a>, whose title is
- <var title="">current cue</var>'s <a href=#text-track-cue-text>text track cue text</a>
- interpreted according to its <a href=#rules-for-rendering-the-cue-in-isolation>rules for rendering the cue in isolation</a>, and whose
- list of nested chapters is empty.</p>
+ <li>
+ <p>Create a new chapter <var title="">new chapter</var>, whose start time is <var title="">current cue</var>'s <a href=#text-track-cue-start-time>text track cue start time</a>, whose end time is <var title="">current cue</var>'s <a href=#text-track-cue-end-time>text track cue end time</a>, whose title is <var title="">current cue</var>'s <a href=#text-track-cue-text>text track cue text</a> interpreted according to its
+ <a href=#rules-for-rendering-the-cue-in-isolation>rules for rendering the cue in isolation</a>, and whose list of nested chapters is
+ empty.</p>
+
<p class=note>For WebVTT, the <a href=#rules-for-rendering-the-cue-in-isolation>rules for rendering the cue in isolation</a> are the
<a href=#rules-for-interpreting-webvtt-cue-text>rules for interpreting WebVTT cue text</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
</li>
- <li><p>Append <var title="">new chapter</var> to <var title="">current chapter</var>'s list of nested chapters, and let
- <var title="">current chapter</var> be <var title="">new
- chapter</var>'s parent.</li>
+ <li><p>Append <var title="">new chapter</var> to <var title="">current chapter</var>'s list of
+ nested chapters, and let <var title="">current chapter</var> be <var title="">new chapter</var>'s
+ parent.</li>
- <li><p>Let <var title="">current chapter</var> be <var title="">new
- chapter</var>.</li>
+ <li><p>Let <var title="">current chapter</var> be <var title="">new chapter</var>.</li>
<li><p>Return to the step labeled <i>loop</i>.</li>
<!-- ...end while -->
@@ -31684,11 +31627,10 @@
<div class=example>
- <p>The following snippet of a <a href=#webvtt-file>WebVTT file</a> shows how
- nested chapters can be marked up. The file describes three
- 50-minute chapters, "Astrophysics", "Computational Physics", and
- "General Relativity". The first has three subchapters, the second
- has four, and the third has two. <a href=#refsWEBVTT>[WEBVTT]</a></p>
+ <p>The following snippet of a <a href=#webvtt-file>WebVTT file</a> shows how nested chapters can be marked
+ up. The file describes three 50-minute chapters, "Astrophysics", "Computational Physics", and
+ "General Relativity". The first has three subchapters, the second has four, and the third has
+ two. <a href=#refsWEBVTT>[WEBVTT]</a></p>
<pre>WEBVTT
@@ -31735,26 +31677,19 @@
<h6 id=cue-events><span class=secno>4.8.10.12.7 </span>Event definitions</h6>
- <p>The following are the <a href=#event-handlers>event handlers</a> that (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) must be
- supported, as IDL attributes, by all objects implementing the
- <code><a href=#texttracklist>TextTrackList</a></code> interface:</p>
+ <p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
+ attributes, by all objects implementing the <code><a href=#texttracklist>TextTrackList</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-texttracklist-onaddtrack title=handler-TextTrackList-onaddtrack><code>onaddtrack</code></dfn> <td> <code title=event-addtrack>addtrack</code>
<tr><td><dfn id=handler-texttracklist-onremovetrack title=handler-TextTrackList-onremovetrack><code>onremovetrack</code></dfn> <td> <code title=event-removetrack>removetrack</code>
- </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) must be supported, as IDL attributes, by all
- objects implementing the <code><a href=#texttrack>TextTrack</a></code> interface:</p>
+ </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
+ attributes, by all objects implementing the <code><a href=#texttrack>TextTrack</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-texttrack-oncuechange title=handler-TextTrack-oncuechange><code>oncuechange</code></dfn> <td> <code title=event-cuechange>cuechange</code>
- </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their
- corresponding <a href=#event-handler-event-type title="event handler event type">event handler
- event types</a>) must be supported, as IDL attributes, by all
- objects implementing the <code><a href=#texttrackcue>TextTrackCue</a></code> interface:</p>
+ </table><p>The following are the <a href=#event-handlers>event handlers</a> that (and their corresponding <a href=#event-handler-event-type title="event handler event type">event handler event types</a>) must be supported, as IDL
+ attributes, by all objects implementing the <code><a href=#texttrackcue>TextTrackCue</a></code> interface:</p>
<table><thead><tr><th><a href=#event-handlers title="event handlers">Event handler</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-texttrackcue-onenter title=handler-TextTrackCue-onenter><code>onenter</code></dfn> <td> <code title=event-enter>enter</code>
@@ -66854,15 +66789,14 @@
<p>Otherwise:</p>
-<!--CLEANUP-->
<p>If the new resource is to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and there are <a href=#relevant-application-cache title="relevant
application cache">relevant application caches</a> that are identified by a URL with the
<a href=#same-origin>same origin</a> as the URL in question, and that have this URL as one of their entries,
excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose
<a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-fast title=concept-appcache-mode-fast>fast</a>, and the user agent is not in a mode where it
- will avoid using <a href=#application-cache title="application cache">application caches</a> then <a href=#fetch>fetch</a> the resource
- from the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of
- those that match.</p>
+ will avoid using <a href=#application-cache title="application cache">application caches</a> then
+ <a href=#fetch>fetch</a> the resource from the <a href=#concept-appcache-selection title=concept-appcache-selection>most
+ appropriate application cache</a> of those that match.</p>
<p class=example>For example, imagine an HTML page with an associated application cache
displaying an image and a form, where the image is also used by several other application
@@ -66935,8 +66869,8 @@
<li>
- <p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
- using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback namespace</a> of one or more
+ <p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an
+ <a href=#application-cache>application cache</a>, and was to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback namespace</a> of one or more
<a href=#relevant-application-cache title="relevant application cache">relevant application caches</a>, and the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of those that match
does not have an entry in its <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
whitelist</a> that has the <a href=#same-origin>same origin</a> as the resource's URL and that is a
@@ -66969,12 +66903,13 @@
<li>
-<!--CLEANUP--><!--swap-->
- <p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
- using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and
- there are <a href=#relevant-application-cache title="relevant application cache">relevant application caches</a> that are
- identified by a URL with the <a href=#same-origin>same origin</a> as the URL in question, and that have this
- URL as one of their entries, excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose <a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-prefer-online title=concept-appcache-mode-prefer-online>prefer-online</a>, and the user didn't cancel the
+<!--XXXswap-->
+ <p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an
+ <a href=#application-cache>application cache</a>, and was to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and there are <a href=#relevant-application-cache title="relevant
+ application cache">relevant application caches</a> that are identified by a URL with the
+ <a href=#same-origin>same origin</a> as the URL in question, and that have this URL as one of their entries,
+ excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose
+ <a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-prefer-online title=concept-appcache-mode-prefer-online>prefer-online</a>, and the user didn't cancel the
navigation attempt during the earlier step, and the navigation attempt failed (e.g. the server
returned a 4xx or 5xx status code <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
equivalent</a>, or there was a DNS error), then:</p>
@@ -76328,50 +76263,43 @@
<div class=impl>
-<!--CLEANUP-->
- <p>The <dfn id=dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer><code>dataTransfer</code></dfn>
- attribute of the <code><a href=#dragevent>DragEvent</a></code> interface must return the
- value it was initialized to. When the object is created, this
- attribute must be initialized to null. It represents the context
- information for the event.</p>
+ <p>The <dfn id=dom-dragevent-datatransfer title=dom-DragEvent-dataTransfer><code>dataTransfer</code></dfn> attribute of the
+ <code><a href=#dragevent>DragEvent</a></code> interface must return the value it was initialized to. When the object is
+ created, this attribute must be initialized to null. It represents the context information for the
+ event.</p>
</div>
<div class=impl>
- <p>When a user agent is required to <dfn id=fire-a-dnd-event>fire a DND event</dfn>
- named <var title="">e</var> at an element, using a particular
- <a href=#drag-data-store>drag data store</a>, the user agent must run the following
+ <p>When a user agent is required to <dfn id=fire-a-dnd-event>fire a DND event</dfn> named <var title="">e</var> at an
+ element, using a particular <a href=#drag-data-store>drag data store</a>, the user agent must run the following
steps:</p>
<ol><li>
- <p>If <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, set the <a href=#drag-data-store-mode>drag data
- store mode</a> to the <a href=#concept-dnd-rw title=concept-dnd-rw>read/write
+ <p>If <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, set the
+ <a href=#drag-data-store-mode>drag data store mode</a> to the <a href=#concept-dnd-rw title=concept-dnd-rw>read/write
mode</a>.</p>
- <p>If <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code>, set the <a href=#drag-data-store-mode>drag data store
- mode</a> to the <a href=#concept-dnd-ro title=concept-dnd-ro>read-only
- mode</a>.</p>
+ <p>If <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code>, set the <a href=#drag-data-store-mode>drag data
+ store mode</a> to the <a href=#concept-dnd-ro title=concept-dnd-ro>read-only mode</a>.</p>
</li>
- <li><p>Let <var title="">dataTransfer</var> be a newly created
- <code><a href=#datatransfer>DataTransfer</a></code> object associated with the given
- <a href=#drag-data-store>drag data store</a>.</li>
+ <li><p>Let <var title="">dataTransfer</var> be a newly created <code><a href=#datatransfer>DataTransfer</a></code> object
+ associated with the given <a href=#drag-data-store>drag data store</a>.</li>
- <li><p id=effectAllowed-initialization>Set the <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
- attribute to the <a href=#drag-data-store>drag data store</a>'s <a href=#drag-data-store-allowed-effects-state>drag data
- store allowed effects state</a>.</li>
+ <li><p id=effectAllowed-initialization>Set the <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code> attribute to the <a href=#drag-data-store>drag data
+ store</a>'s <a href=#drag-data-store-allowed-effects-state>drag data store allowed effects state</a>.</li>
<li>
- <p id=dropEffect-initialization>Set the <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code> attribute to
- "<code title="">none</code>" if <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, <code title=event-drag><a href=#event-drag>drag</a></code>, <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, or <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>; to the value
- corresponding to the <a href=#current-drag-operation>current drag operation</a> if <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></code>; and to a value based on the
- <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
- attribute's value and to the drag-and-drop source, as given by the
- following table, otherwise (i.e. if <var title="">e</var> is <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> or <code title=event-dragover><a href=#event-dragover>dragover</a></code>):</p>
+ <p id=dropEffect-initialization>Set the <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code> attribute to "<code title="">none</code>"
+ if <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>, <code title=event-drag><a href=#event-drag>drag</a></code>, <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, or <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>; to the value corresponding to the <a href=#current-drag-operation>current drag
+ operation</a> if <var title="">e</var> is <code title=event-drop><a href=#event-drop>drop</a></code> or <code title=event-dragend><a href=#event-dragend>dragend</a></code>; and to a value based on the <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code> attribute's value and to the
+ drag-and-drop source, as given by the following table, otherwise (i.e. if <var title="">e</var>
+ is <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> or <code title=event-dragover><a href=#event-dragover>dragover</a></code>):</p>
<table><thead><tr><th><code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code></th>
<th><code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code></th>
@@ -76399,17 +76327,15 @@
<td>"<code title="">link</code>", or, <a href=#concept-platform-dropeffect-override title=concept-platform-dropEffect-override>if appropriate</a>, either "<code title="">copy</code>" or "<code title="">move</code>"</td>
<tr><td>Any other case</td>
<td>"<code title="">copy</code>", or, <a href=#concept-platform-dropeffect-override title=concept-platform-dropEffect-override>if appropriate</a>, either "<code title="">link</code>" or "<code title="">move</code>"</td>
- </table><p>Where the table above provides <dfn id=concept-platform-dropeffect-override title=concept-platform-dropEffect-override>possibly appropriate
- alternatives</dfn>, user agents may instead use the listed
- alternative values if platform conventions dictate that the user
- has requested those alternate effects.</p>
+ </table><p>Where the table above provides <dfn id=concept-platform-dropeffect-override title=concept-platform-dropEffect-override>possibly
+ appropriate alternatives</dfn>, user agents may instead use the listed alternative values if
+ platform conventions dictate that the user has requested those alternate effects.</p>
- <p class=example>For example, Windows platform conventions are
- such that dragging while holding the "alt" key indicates a
- preference for linking the data, rather than moving or copying it.
- Therefore, on a Windows system, if "<code title="">link</code>" is
- an option according to the table above while the "alt" key is
- depressed, the user agent could select that instead of "<code title="">copy</code>" or "<code title="">move</code>".</p>
+ <p class=example>For example, Windows platform conventions are such that dragging while
+ holding the "alt" key indicates a preference for linking the data, rather than moving or copying
+ it. Therefore, on a Windows system, if "<code title="">link</code>" is an option according to
+ the table above while the "alt" key is depressed, the user agent could select that instead of
+ "<code title="">copy</code>" or "<code title="">move</code>".</p>
</li>
@@ -76417,30 +76343,26 @@
<p>Create a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> <code><a href=#dragevent>DragEvent</a></code> object
and initialize it to have the given name <var title="">e</var>, to bubble, to be cancelable
- unless <var title="">e</var> is <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>, or <code title=event-dragend><a href=#event-dragend>dragend</a></code>, and to have the <code title=dom-UIEvent-detail><a href=#dom-uievent-detail>detail</a></code> attribute initialized to zero, the mouse and key
- attributes initialized according to the state of the input devices as they would be for user
- interaction events, the <code title="">relatedTarget</code> attribute initialized to null, and
- the <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code> attribute initialized to <var title="">dataTransfer</var>, the <code><a href=#datatransfer>DataTransfer</a></code> object created above.</p>
+ unless <var title="">e</var> is <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code>, <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code>, or <code title=event-dragend><a href=#event-dragend>dragend</a></code>, and to
+ have the <code title=dom-UIEvent-detail><a href=#dom-uievent-detail>detail</a></code> attribute initialized to zero, the mouse
+ and key attributes initialized according to the state of the input devices as they would be for
+ user interaction events, the <code title="">relatedTarget</code> attribute initialized to null,
+ and the <code title=dom-DragEvent-dataTransfer><a href=#dom-dragevent-datatransfer>dataTransfer</a></code> attribute initialized to
+ <var title="">dataTransfer</var>, the <code><a href=#datatransfer>DataTransfer</a></code> object created above.</p>
<!-- interaction event spec point -->
- <p>If there is no relevant pointing device, the object must have
- its <code title="">screenX</code>, <code title="">screenY</code>,
- <code title="">clientX</code>, <code title="">clientY</code>, and
- <code title="">button</code> attributes set to 0.</p>
+ <p>If there is no relevant pointing device, the object must have its <code title="">screenX</code>, <code title="">screenY</code>, <code title="">clientX</code>, <code title="">clientY</code>, and <code title="">button</code> attributes set to 0.</p>
</li>
<li><p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> the newly created
<code><a href=#dragevent>DragEvent</a></code> object at the specified target element.</li>
- <li><p>Set the <a href=#drag-data-store-allowed-effects-state>drag data store allowed effects state</a>
- to the current value of <var title="">dataTransfer</var>'s <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
- attribute. (It can only have changed value if <var title="">e</var>
- is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>.)</li>
+ <li><p>Set the <a href=#drag-data-store-allowed-effects-state>drag data store allowed effects state</a> to the current value of <var title="">dataTransfer</var>'s <code title=dom-DataTransfer-effectAllowed><a href=#dom-datatransfer-effectallowed>effectAllowed</a></code>
+ attribute. (It can only have changed value if <var title="">e</var> is <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code>.)</li>
- <li><p>Set the <a href=#drag-data-store-mode>drag data store mode</a> back to the <a href=#concept-dnd-p title=concept-dnd-p>protected mode</a> if it was changed in
- the first step.</li>
+ <li><p>Set the <a href=#drag-data-store-mode>drag data store mode</a> back to the <a href=#concept-dnd-p title=concept-dnd-p>protected mode</a> if it was changed in the first step.</li>
<li><p>Break the association between <var title="">dataTransfer</var> and the <a href=#drag-data-store>drag data
store</a>.</li>
@@ -76452,67 +76374,54 @@
<h4 id=drag-and-drop-processing-model><span class=secno>8.7.5 </span>Drag-and-drop processing model</h4>
- <p>When the user attempts to begin a drag operation, the user agent
- must run the following steps. User agents must act as if these steps
- were run even if the drag actually started in another document or
- application and the user agent was not aware that the drag was
- occurring until it intersected with a document under the user agent's
- purview.</p>
+ <p>When the user attempts to begin a drag operation, the user agent must run the following steps.
+ User agents must act as if these steps were run even if the drag actually started in another
+ document or application and the user agent was not aware that the drag was occurring until it
+ intersected with a document under the user agent's purview.</p>
<ol><li>
<p>Determine what is being dragged, as follows:</p>
- <p>If the drag operation was invoked on a selection, then it is
- the selection that is being dragged.</p>
+ <p>If the drag operation was invoked on a selection, then it is the selection that is being
+ dragged.</p>
- <p>Otherwise, if the drag operation was invoked on a
- <code><a href=#document>Document</a></code>, it is the first element, going up the
- ancestor chain, starting at the node that the user tried to drag,
- that has the IDL attribute <code title=dom-draggable><a href=#dom-draggable>draggable</a></code> set to true. If there is no
- such element, then nothing is being dragged; abort these steps,
- the drag-and-drop operation is never started.</p>
+ <p>Otherwise, if the drag operation was invoked on a <code><a href=#document>Document</a></code>, it is the first
+ element, going up the ancestor chain, starting at the node that the user tried to drag, that has
+ the IDL attribute <code title=dom-draggable><a href=#dom-draggable>draggable</a></code> set to true. If there is no such
+ element, then nothing is being dragged; abort these steps, the drag-and-drop operation is never
+ started.</p>
- <p>Otherwise, the drag operation was invoked outside the user
- agent's purview. What is being dragged is defined by the document
- or application where the drag was started.</p>
+ <p>Otherwise, the drag operation was invoked outside the user agent's purview. What is being
+ dragged is defined by the document or application where the drag was started.</p>
- <p class=note><code><a href=#the-img-element>img</a></code> elements and <code><a href=#the-a-element>a</a></code>
- elements with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>
- attribute have their <code title=dom-draggable><a href=#dom-draggable>draggable</a></code>
- attribute set to true by default.</p>
+ <p class=note><code><a href=#the-img-element>img</a></code> elements and <code><a href=#the-a-element>a</a></code> elements with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute have their <code title=dom-draggable><a href=#dom-draggable>draggable</a></code> attribute set to true by default.</p>
</li>
- <li><p><a href=#create-a-drag-data-store>Create a drag data store</a>. All the DND events
- fired subsequently by the steps in this section must use this
- <a href=#drag-data-store>drag data store</a>.</li>
+ <li><p><a href=#create-a-drag-data-store>Create a drag data store</a>. All the DND events fired subsequently by the steps
+ in this section must use this <a href=#drag-data-store>drag data store</a>.</li>
<li>
- <p>Establish which DOM node is the <dfn id=source-node>source node</dfn>, as
- follows:</p>
+ <p>Establish which DOM node is the <dfn id=source-node>source node</dfn>, as follows:</p>
- <p>If it is a selection that is being dragged, then the
- <a href=#source-node>source node</a> is the <code><a href=#text>Text</a></code> node that the
- user started the drag on (typically the <code><a href=#text>Text</a></code> node
- that the user originally clicked). If the user did not specify a
- particular node, for example if the user just told the user agent
- to begin a drag of "the selection", then the <a href=#source-node>source
- node</a> is the first <code><a href=#text>Text</a></code> node containing a part
- of the selection.</p>
+ <p>If it is a selection that is being dragged, then the <a href=#source-node>source node</a> is the
+ <code><a href=#text>Text</a></code> node that the user started the drag on (typically the <code><a href=#text>Text</a></code> node
+ that the user originally clicked). If the user did not specify a particular node, for example if
+ the user just told the user agent to begin a drag of "the selection", then the <a href=#source-node>source
+ node</a> is the first <code><a href=#text>Text</a></code> node containing a part of the selection.</p>
- <p>Otherwise, if it is an element that is being dragged, then the
- <a href=#source-node>source node</a> is the element that is being dragged.</p>
+ <p>Otherwise, if it is an element that is being dragged, then the <a href=#source-node>source node</a> is
+ the element that is being dragged.</p>
- <p>Otherwise, the <a href=#source-node>source node</a> is part of another
- document or application. When this specification requires that an
- event be dispatched at the <a href=#source-node>source node</a> in this case,
- the user agent must instead follow the platform-specific
- conventions relevant to that situation.</p>
+ <p>Otherwise, the <a href=#source-node>source node</a> is part of another document or application. When this
+ specification requires that an event be dispatched at the <a href=#source-node>source node</a> in this case,
+ the user agent must instead follow the platform-specific conventions relevant to that
+ situation.</p>
- <p class=note>Multiple events are fired on the <a href=#source-node>source
- node</a> during the course of the drag-and-drop operation.</p>
+ <p class=note>Multiple events are fired on the <a href=#source-node>source node</a> during the course of
+ the drag-and-drop operation.</p>
</li>
@@ -76520,21 +76429,19 @@
<p>Determine the <dfn id=list-of-dragged-nodes>list of dragged nodes</dfn>, as follows:</p>
- <p>If it is a selection that is being dragged, then the <a href=#list-of-dragged-nodes>list
- of dragged nodes</a> contains, in <a href=#tree-order>tree order</a>,
- every node that is partially or completely included in the
+ <p>If it is a selection that is being dragged, then the <a href=#list-of-dragged-nodes>list of dragged nodes</a>
+ contains, in <a href=#tree-order>tree order</a>, every node that is partially or completely included in the
selection (including all their ancestors).</p>
- <p>Otherwise, the <a href=#list-of-dragged-nodes>list of dragged nodes</a> contains only
- the <a href=#source-node>source node</a>, if any.</p>
+ <p>Otherwise, the <a href=#list-of-dragged-nodes>list of dragged nodes</a> contains only the <a href=#source-node>source node</a>,
+ if any.</p>
</li>
<li>
- <p>If it is a selection that is being dragged, then add an item to
- the <a href=#drag-data-store-item-list>drag data store item list</a>, with its properties
- set as follows:</p>
+ <p>If it is a selection that is being dragged, then add an item to the <a href=#drag-data-store-item-list>drag data store
+ item list</a>, with its properties set as follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd>"<code>text/plain</code>"</dd>
@@ -76545,9 +76452,8 @@
<dt>The actual data</dt>
<dd>The text of the selection</dd>
- </dl><p>Otherwise, if any files are being dragged, then add one item
- per file to the <a href=#drag-data-store-item-list>drag data store item list</a>, with their
- properties set as follows:</p>
+ </dl><p>Otherwise, if any files are being dragged, then add one item per file to the <a href=#drag-data-store-item-list>drag data
+ store item list</a>, with their properties set as follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd>The MIME type of the file, if known, or "<code>application/octet-stream</code>" otherwise.</dd>
@@ -76558,23 +76464,18 @@
<dt>The actual data</dt>
<dd>The file's contents and name.</dd>
- </dl><p class=note>Dragging files can currently only happen from
- outside a <a href=#browsing-context>browsing context</a>, for example from a file
- system manager application.</p>
+ </dl><p class=note>Dragging files can currently only happen from outside a <a href=#browsing-context>browsing
+ context</a>, for example from a file system manager application.</p>
- <p>If the drag initiated outside of the application, the user
- agent must add items to the <a href=#drag-data-store-item-list>drag data store item list</a>
- as appropriate for the data being dragged, honoring platform
- conventions where appropriate; however, if the platform
- conventions do not use <a href=#mime-type title="MIME type">MIME types</a>
- to label dragged data, the user agent must make a best-effort
- attempt to map the types to MIME types, and, in any case, all the
- <a href=#the-drag-data-item-type-string title="the drag data item type string">drag data item type
- strings</a> must be <a href=#converted-to-ascii-lowercase>converted to ASCII
+ <p>If the drag initiated outside of the application, the user agent must add items to the
+ <a href=#drag-data-store-item-list>drag data store item list</a> as appropriate for the data being dragged, honoring
+ platform conventions where appropriate; however, if the platform conventions do not use <a href=#mime-type title="MIME type">MIME types</a> to label dragged data, the user agent must make a
+ best-effort attempt to map the types to MIME types, and, in any case, all the <a href=#the-drag-data-item-type-string title="the
+ drag data item type string">drag data item type strings</a> must be <a href=#converted-to-ascii-lowercase>converted to ASCII
lowercase</a>.</p>
- <p>User agents may also add one or more items representing the
- selection or dragged element(s) in other forms, e.g. as HTML.</p>
+ <p>User agents may also add one or more items representing the selection or dragged element(s)
+ in other forms, e.g. as HTML.</p>
</li>
@@ -76582,11 +76483,9 @@
<li>
- <p>If the <a href=#list-of-dragged-nodes>list of dragged nodes</a> is not empty, then
- <a href=#extracting-json title="extracting JSON">extract the microdata from those
- nodes into a JSON form</a>, and add one item to the <a href=#drag-data-store-item-list>drag
- data store item list</a>, with its properties set as
- follows:</p>
+ <p>If the <a href=#list-of-dragged-nodes>list of dragged nodes</a> is not empty, then <a href=#extracting-json title="extracting
+ JSON">extract the microdata from those nodes into a JSON form</a>, and add one item to the
+ <a href=#drag-data-store-item-list>drag data store item list</a>, with its properties set as follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd><code><a href=#application/microdata+json>application/microdata+json</a></code></dd>
@@ -76603,37 +76502,37 @@
<p>Run the following substeps:</p>
- <ol><li><p>Let <var title="">urls</var> be an empty list of <a href=#absolute-url title="absolute URL">absolute URLs</a>.</li>
+ <ol><li><p>Let <var title="">urls</var> be an empty list of <a href=#absolute-url title="absolute URL">absolute
+ URLs</a>.</li>
<li>
- <p>For each <var title="">node</var> in the <a href=#list-of-dragged-nodes>list of
- dragged nodes</a>:</p>
+ <p>For each <var title="">node</var> in the <a href=#list-of-dragged-nodes>list of dragged nodes</a>:</p>
<dl><dt>If the node is an <code><a href=#the-a-element>a</a></code> element with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute</dt>
- <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a url">resolving</a> the element's <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> content attribute
- relative to the element.</dd>
+ <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a
+ url">resolving</a> the element's <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> content
+ attribute relative to the element.</dd>
- <dt>If the node is an <code><a href=#the-img-element>img</a></code> element with an <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute</dt>
+ <dt>If the node is an <code><a href=#the-img-element>img</a></code> element with an <code title=attr-img-src><a href=#attr-img-src>src</a></code>
+ attribute</dt>
- <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a url">resolving</a> the element's <code title=attr-img-src><a href=#attr-img-src>src</a></code> content attribute relative to
- the element.</dd>
+ <dd>Add to <var title="">urls</var> the result of <a href=#resolve-a-url title="resolve a
+ url">resolving</a> the element's <code title=attr-img-src><a href=#attr-img-src>src</a></code> content attribute
+ relative to the element.</dd>
<!-- DND-v2: more -->
</dl></li>
- <li><p>If <var title="">urls</var> is still empty, abort these
- substeps.</li>
+ <li><p>If <var title="">urls</var> is still empty, abort these substeps.</li>
- <li><p>Let <var title="">url string</var> be the result of
- concatenating the strings in <var title="">urls</var>, in the
- order they were added, separated by a U+000D CARRIAGE RETURN
- U+000A LINE FEED character pair (CRLF).</li>
+ <li><p>Let <var title="">url string</var> be the result of concatenating the strings in <var title="">urls</var>, in the order they were added, separated by a U+000D CARRIAGE RETURN U+000A
+ LINE FEED character pair (CRLF).</li>
- <li><p>Add one item to the <a href=#drag-data-store-item-list>drag data store item
- list</a>, with its properties set as follows:</p>
+ <li><p>Add one item to the <a href=#drag-data-store-item-list>drag data store item list</a>, with its properties set as
+ follows:</p>
<dl><dt><a href=#the-drag-data-item-type-string>The drag data item type string</a>
<dd><code>text/uri-list</code></dd>
@@ -76650,131 +76549,113 @@
<li>
- <p>Update the <a href=#drag-data-store-default-feedback>drag data store default feedback</a> as
- appropriate for the user agent (if the user is dragging the
- selection, then the selection would likely be the basis for this
- feedback; if the user is dragging an element, then that element's
- rendering would be used; if the drag began outside the user agent,
- then the platform conventions for determining the drag feedback
- should be used).</p>
+ <p>Update the <a href=#drag-data-store-default-feedback>drag data store default feedback</a> as appropriate for the user agent
+ (if the user is dragging the selection, then the selection would likely be the basis for this
+ feedback; if the user is dragging an element, then that element's rendering would be used; if
+ the drag began outside the user agent, then the platform conventions for determining the drag
+ feedback should be used).</p>
</li>
<li>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> at the <a href=#source-node>source
- node</a>.</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> at the
+ <a href=#source-node>source node</a>.</p>
- <p>If the event is canceled, then the drag-and-drop operation
- should not occur; abort these steps.</p> <!-- only a should
- because the UA can always allow the user to drag without the page
+ <p>If the event is canceled, then the drag-and-drop operation should not occur; abort these
+ steps.</p> <!-- only a should because the UA can always allow the user to drag without the page
knowing -->
- <p class=note>Since events with no event listeners registered
- are, almost by definition, never canceled, drag-and-drop is always
- available to the user if the author does not specifically prevent
- it.</p>
+ <p class=note>Since events with no event listeners registered are, almost by definition, never
+ canceled, drag-and-drop is always available to the user if the author does not specifically
+ prevent it.</p>
</li>
<li>
- <p><a href=#initiate-the-drag-and-drop-operation>Initiate the drag-and-drop operation</a> in a manner
- consistent with platform conventions, and as described below.</p>
+ <p><a href=#initiate-the-drag-and-drop-operation>Initiate the drag-and-drop operation</a> in a manner consistent with platform
+ conventions, and as described below.</p>
- <p id=base-dnd-feedback>The drag-and-drop feedback must be
- generated from the first of the following sources that is
- available:</p>
+ <p id=base-dnd-feedback>The drag-and-drop feedback must be generated from the first of the
+ following sources that is available:</p>
- <ol><li>The <a href=#drag-data-store-bitmap>drag data store bitmap</a>, if any. In this
- case, the <a href=#drag-data-store-hot-spot-coordinate>drag data store hot spot coordinate</a> should
- be used as hints for where to put the cursor relative to the
- resulting image. The values are expressed as distances in CSS
- pixels from the left side and from the top side of the image
- respectively. <a href=#refsCSS>[CSS]</a></li>
+ <ol><li>The <a href=#drag-data-store-bitmap>drag data store bitmap</a>, if any. In this case, the <a href=#drag-data-store-hot-spot-coordinate>drag data store
+ hot spot coordinate</a> should be used as hints for where to put the cursor relative to the
+ resulting image. The values are expressed as distances in CSS pixels from the left side and
+ from the top side of the image respectively. <a href=#refsCSS>[CSS]</a></li>
<li>The <a href=#drag-data-store-default-feedback>drag data store default feedback</a>.</li>
</ol></li>
- </ol><p>From the moment that the user agent is to <dfn id=initiate-the-drag-and-drop-operation>initiate the
- drag-and-drop operation</dfn>, until the end of the drag-and-drop
- operation, device input events (e.g. mouse and keyboard events) must
- be suppressed.</p>
+ </ol><p>From the moment that the user agent is to <dfn id=initiate-the-drag-and-drop-operation>initiate the drag-and-drop operation</dfn>,
+ until the end of the drag-and-drop operation, device input events (e.g. mouse and keyboard events)
+ must be suppressed.</p>
- <p>During the drag operation, the element directly indicated by the
- user as the drop target is called the <dfn id=immediate-user-selection>immediate user
- selection</dfn>. (Only elements can be selected by the user; other
- nodes must not be made available as drop targets.) However, the
- <a href=#immediate-user-selection>immediate user selection</a> is not necessarily the
- <dfn id=current-target-element>current target element</dfn>, which is the element currently
- selected for the drop part of the drag-and-drop operation.</p>
+ <p>During the drag operation, the element directly indicated by the user as the drop target is
+ called the <dfn id=immediate-user-selection>immediate user selection</dfn>. (Only elements can be selected by the user; other
+ nodes must not be made available as drop targets.) However, the <a href=#immediate-user-selection>immediate user
+ selection</a> is not necessarily the <dfn id=current-target-element>current target element</dfn>, which is the element
+ currently selected for the drop part of the drag-and-drop operation.</p>
- <p>The <a href=#immediate-user-selection>immediate user selection</a> changes as the user
- selects different elements (either by pointing at them with a
- pointing device, or by selecting them in some other way). The
- <a href=#current-target-element>current target element</a> changes when the <a href=#immediate-user-selection>immediate
- user selection</a> changes, based on the results of event
- listeners in the document, as described below.</p>
+ <p>The <a href=#immediate-user-selection>immediate user selection</a> changes as the user selects different elements
+ (either by pointing at them with a pointing device, or by selecting them in some other way). The
+ <a href=#current-target-element>current target element</a> changes when the <a href=#immediate-user-selection>immediate user selection</a>
+ changes, based on the results of event listeners in the document, as described below.</p>
- <p>Both the <a href=#current-target-element>current target element</a> and the
- <a href=#immediate-user-selection>immediate user selection</a> can be null, which means no
- target element is selected. They can also both be elements in other
- (DOM-based) documents, or other (non-Web) programs altogether. (For
- example, a user could drag text to a word-processor.) The
- <a href=#current-target-element>current target element</a> is initially null.</p>
+ <p>Both the <a href=#current-target-element>current target element</a> and the <a href=#immediate-user-selection>immediate user selection</a> can
+ be null, which means no target element is selected. They can also both be elements in other
+ (DOM-based) documents, or other (non-Web) programs altogether. (For example, a user could drag
+ text to a word-processor.) The <a href=#current-target-element>current target element</a> is initially null.</p>
- <p>In addition, there is also a <dfn id=current-drag-operation>current drag operation</dfn>,
- which can take on the values "<code title="">none</code>", "<code title="">copy</code>", "<code title="">link</code>", and "<code title="">move</code>". Initially, it has the value "<code title="">none</code>". It is updated by the user agent as described
- in the steps below.</p>
+ <p>In addition, there is also a <dfn id=current-drag-operation>current drag operation</dfn>, which can take on the values
+ "<code title="">none</code>", "<code title="">copy</code>", "<code title="">link</code>", and
+ "<code title="">move</code>". Initially, it has the value "<code title="">none</code>". It is
+ updated by the user agent as described in the steps below.</p>
- <p>User agents must, as soon as the drag operation is <a href=#initiate-the-drag-and-drop-operation title="initiate the drag-and-drop operation">initiated</a> and
- every 350ms (±200ms) thereafter for as long as the drag
- operation is ongoing, <a href=#queue-a-task>queue a task</a> to perform the
- following steps in sequence:</p>
+ <p>User agents must, as soon as the drag operation is <a href=#initiate-the-drag-and-drop-operation title="initiate the drag-and-drop
+ operation">initiated</a> and every 350ms (±200ms) thereafter for as long as the drag
+ operation is ongoing, <a href=#queue-a-task>queue a task</a> to perform the following steps in sequence:</p>
<ol><li>
- <p>If the user agent is still performing the previous iteration of
- the sequence (if any) when the next iteration becomes due, abort
- these steps for this iteration (effectively "skipping missed
- frames" of the drag-and-drop operation).</p>
+ <p>If the user agent is still performing the previous iteration of the sequence (if any) when
+ the next iteration becomes due, abort these steps for this iteration (effectively "skipping
+ missed frames" of the drag-and-drop operation).</p>
</li>
<li>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-drag><a href=#event-drag>drag</a></code> event at the <a href=#source-node>source
- node</a>. If this event is canceled, the user agent must set
- the <a href=#current-drag-operation>current drag operation</a> to "<code title="">none</code>" (no drag operation).</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-drag><a href=#event-drag>drag</a></code> event at the
+ <a href=#source-node>source node</a>. If this event is canceled, the user agent must set the <a href=#current-drag-operation>current
+ drag operation</a> to "<code title="">none</code>" (no drag operation).</p>
</li>
<li>
- <p>If the <code title=event-drag><a href=#event-drag>drag</a></code> event was not
- canceled and the user has not ended the drag-and-drop operation,
- check the state of the drag-and-drop operation, as follows:</p>
+ <p>If the <code title=event-drag><a href=#event-drag>drag</a></code> event was not canceled and the user has not ended
+ the drag-and-drop operation, check the state of the drag-and-drop operation, as follows:</p>
<ol><li>
- <p>If the user is indicating a different <a href=#immediate-user-selection>immediate user
- selection</a> than during the last iteration (or if this is
- the first iteration), and if this <a href=#immediate-user-selection>immediate user
- selection</a> is not the same as the <a href=#current-target-element>current target
- element</a>, then <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code> at the <a href=#current-target-element>current target element</a>, and then
- update the <a href=#current-target-element>current target element</a> as follows:</p>
+ <p>If the user is indicating a different <a href=#immediate-user-selection>immediate user selection</a> than during the
+ last iteration (or if this is the first iteration), and if this <a href=#immediate-user-selection>immediate user
+ selection</a> is not the same as the <a href=#current-target-element>current target element</a>, then <a href=#fire-a-dnd-event>fire a
+ DND event</a> named <code title=event-dragexit><a href=#event-dragexit>dragexit</a></code> at the <a href=#current-target-element>current
+ target element</a>, and then update the <a href=#current-target-element>current target element</a> as follows:</p>
<dl class=switch><dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is null</dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to null
- also.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to null also.</dd>
- <dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is in a
- non-DOM document or application</dt>
+ <dt>If the new <a href=#immediate-user-selection>immediate user selection</a> is in a non-DOM document or
+ application</dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to the
- <a href=#immediate-user-selection>immediate user selection</a>.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to the <a href=#immediate-user-selection>immediate user
+ selection</a>.</dd>
<dt>Otherwise</dt>
@@ -76783,72 +76664,57 @@
<p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at the
<a href=#immediate-user-selection>immediate user selection</a>.</p>
- <p>If the event is canceled, then set the <a href=#current-target-element>current target
- element</a> to the <a href=#immediate-user-selection>immediate user
- selection</a>.</p>
+ <p>If the event is canceled, then set the <a href=#current-target-element>current target element</a> to the
+ <a href=#immediate-user-selection>immediate user selection</a>.</p>
- <p>Otherwise, run the appropriate step from the following
- list:</p>
+ <p>Otherwise, run the appropriate step from the following list:</p>
- <dl class=switch><dt>If the <a href=#immediate-user-selection>immediate user selection</a> is a text
- field (e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code>
- element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
- attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element,
- and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
- with <a href=#the-drag-data-item-type-string>the drag data item type string</a>
- "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item
- kind</a> <i>Plain Unicode string</i></dt>
+ <dl class=switch><dt>If the <a href=#immediate-user-selection>immediate user selection</a> is a text field (e.g.
+ <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an <a href=#editing-host>editing host</a> or
+ <a href=#editable>editable</a> element, and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
+ with <a href=#the-drag-data-item-type-string>the drag data item type string</a> "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the
+ drag data item kind</a> <i>Plain Unicode string</i></dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to the
- <a href=#immediate-user-selection>immediate user selection</a> anyway.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to the <a href=#immediate-user-selection>immediate user
+ selection</a> anyway.</dd>
- <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element
- with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute
- that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the
- <a href=#drag-data-store>drag data store</a></dt>
+ <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a></dt>
- <dd><p>Set the <a href=#current-target-element>current target element</a> to the
- <a href=#immediate-user-selection>immediate user selection</a> anyway.</dd>
+ <dd><p>Set the <a href=#current-target-element>current target element</a> to the <a href=#immediate-user-selection>immediate user
+ selection</a> anyway.</dd>
- <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element
- that itself has an ancestor element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag
- data store</a></dt>
+ <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is an element that itself has an ancestor
+ element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a></dt>
<dd>
- <p>Let <var title="">new target</var> be the nearest
- (deepest) such ancestor element.</p>
+ <p>Let <var title="">new target</var> be the nearest (deepest) such ancestor element.</p>
- <p>If the <a href=#immediate-user-selection>immediate user selection</a> is <var title="">new target</var>, then leave the <a href=#current-target-element>current
- target element</a> unchanged.</p>
+ <p>If the <a href=#immediate-user-selection>immediate user selection</a> is <var title="">new target</var>, then
+ leave the <a href=#current-target-element>current target element</a> unchanged.</p>
- <p>Otherwise, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <var title="">new target</var>. Then, set the <a href=#current-target-element>current
- target element</a> to <var title="">new target</var>,
- regardless of whether that event was canceled or not.</p>
+ <p>Otherwise, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <var title="">new target</var>. Then, set the
+ <a href=#current-target-element>current target element</a> to <var title="">new target</var>, regardless of
+ whether that event was canceled or not.</p>
</dd>
- <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is
- <a href=#the-body-element-0>the body element</a></dt>
+ <dt>If the <a href=#immediate-user-selection>immediate user selection</a> is <a href=#the-body-element-0>the body element</a></dt>
- <dd><p>Leave the <a href=#current-target-element>current target element</a>
- unchanged.</dd>
+ <dd><p>Leave the <a href=#current-target-element>current target element</a> unchanged.</dd>
<dt>Otherwise</dt>
<dd>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at <a href=#the-body-element-0>the body
- element</a>, if there is one, or at the
- <code><a href=#document>Document</a></code> object, if not. Then, set the
- <a href=#current-target-element>current target element</a> to <a href=#the-body-element-0>the body
- element</a>, regardless of whether that event was
- canceled or not.</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragenter><a href=#event-dragenter>dragenter</a></code> at
+ <a href=#the-body-element-0>the body element</a>, if there is one, or at the <code><a href=#document>Document</a></code> object, if
+ not. Then, set the <a href=#current-target-element>current target element</a> to <a href=#the-body-element-0>the body element</a>,
+ regardless of whether that event was canceled or not.</p>
</dd>
@@ -76858,9 +76724,8 @@
<li>
- <p>If the previous step caused the <a href=#current-target-element>current target
- element</a> to change, and if the previous target element was
- not null or a part of a non-DOM document, then <a href=#fire-a-dnd-event>fire a DND
+ <p>If the previous step caused the <a href=#current-target-element>current target element</a> to change, and if the
+ previous target element was not null or a part of a non-DOM document, then <a href=#fire-a-dnd-event>fire a DND
event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at the previous target
element.</p>
@@ -76868,46 +76733,32 @@
<li>
- <p>If the <a href=#current-target-element>current target element</a> is a DOM element,
- then <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragover><a href=#event-dragover>dragover</a></code> at this <a href=#current-target-element>current
- target element</a>.</p>
+ <p>If the <a href=#current-target-element>current target element</a> is a DOM element, then <a href=#fire-a-dnd-event>fire a DND
+ event</a> named <code title=event-dragover><a href=#event-dragover>dragover</a></code> at this <a href=#current-target-element>current target
+ element</a>.</p>
- <p>If the <code title=event-dragover><a href=#event-dragover>dragover</a></code> event is
- not canceled, run the appropriate step from the following
- list:</p>
+ <p>If the <code title=event-dragover><a href=#event-dragover>dragover</a></code> event is not canceled, run the
+ appropriate step from the following list:</p>
- <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field
- (e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code> element
- whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element, and
- the <a href=#drag-data-store-item-list>drag data store item list</a> has an item with
- <a href=#the-drag-data-item-type-string>the drag data item type string</a>
- "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item
- kind</a> <i>Plain Unicode string</i></dt>
+ <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field (e.g. <code><a href=#the-textarea-element>textarea</a></code>,
+ or an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is
+ in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an <a href=#editing-host>editing host</a>
+ or <a href=#editable>editable</a> element, and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
+ with <a href=#the-drag-data-item-type-string>the drag data item type string</a> "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag
+ data item kind</a> <i>Plain Unicode string</i></dt>
- <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to either
- "<code title="">copy</code>" or "<code title="">move</code>",
- as appropriate given the platform conventions.</dd>
+ <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to either "<code title="">copy</code>" or
+ "<code title="">move</code>", as appropriate given the platform conventions.</dd>
- <dt>If the <a href=#current-target-element>current target element</a> is an element
- with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute
- that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the
- <a href=#drag-data-store>drag data store</a> and <a href=#concept-dropzone-operation title=concept-dropzone-operation>specifies an
- operation</a></dt>
+ <dt>If the <a href=#current-target-element>current target element</a> is an element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a> and <a href=#concept-dropzone-operation title=concept-dropzone-operation>specifies an operation</a></dt>
- <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to the
- operation <a href=#concept-dropzone-operation title=concept-dropzone-operation>specified</a> by the
- <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute of the
- <a href=#current-target-element>current target element</a>.</p>
+ <dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to the operation <a href=#concept-dropzone-operation title=concept-dropzone-operation>specified</a> by the <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute of the <a href=#current-target-element>current target
+ element</a>.</p>
- <dt>If the <a href=#current-target-element>current target element</a> is an element
- with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute
- that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the
- <a href=#drag-data-store>drag data store</a> and does not <a href=#concept-dropzone-operation title=concept-dropzone-operation>specify an
- operation</a></dt>
+ <dt>If the <a href=#current-target-element>current target element</a> is an element with a <code title=attr-dropzone><a href=#the-dropzone-attribute>dropzone</a></code> attribute that <a href=#concept-dropzone-match title=concept-dropzone-match>matches</a> the <a href=#drag-data-store>drag data store</a> and does not
+ <a href=#concept-dropzone-operation title=concept-dropzone-operation>specify an operation</a></dt>
<dd><p>Set the <a href=#current-drag-operation>current drag operation</a> to "<code title="">copy</code>".</p>
@@ -76940,18 +76791,16 @@
<li>
- <p>Otherwise, if the <a href=#current-target-element>current target element</a> is not
- a DOM element, use platform-specific mechanisms to determine
- what drag operation is being performed (none, copy, link, or
- move), and set the <i><a href=#current-drag-operation>current drag operation</a></i>
- accordingly.</p>
+ <p>Otherwise, if the <a href=#current-target-element>current target element</a> is not a DOM element, use
+ platform-specific mechanisms to determine what drag operation is being performed (none, copy,
+ link, or move), and set the <i><a href=#current-drag-operation>current drag operation</a></i> accordingly.</p>
</li>
<li>
- <p>Update the drag feedback (e.g. the mouse cursor) to match the
- <a href=#current-drag-operation>current drag operation</a>, as follows:</p>
+ <p>Update the drag feedback (e.g. the mouse cursor) to match the <a href=#current-drag-operation>current drag
+ operation</a>, as follows:</p>
<table><thead><tr><th>Drag operation</th>
<th>Feedback</th>
@@ -76969,34 +76818,30 @@
<li>
- <p>Otherwise, if the user ended the drag-and-drop operation (e.g.
- by releasing the mouse button in a mouse-driven drag-and-drop
- interface), or if the <code title=event-drag><a href=#event-drag>drag</a></code> event
- was canceled, then this will be the last iteration. Run the
- following steps, then stop the drag-and-drop operation:</p>
+ <p>Otherwise, if the user ended the drag-and-drop operation (e.g. by releasing the mouse button
+ in a mouse-driven drag-and-drop interface), or if the <code title=event-drag><a href=#event-drag>drag</a></code> event
+ was canceled, then this will be the last iteration. Run the following steps, then stop the
+ drag-and-drop operation:</p>
<ol><li>
- <p>If the <a href=#current-drag-operation>current drag operation</a> is "<code title="">none</code>" (no drag operation), or, if the user ended
- the drag-and-drop operation by canceling it (e.g. by hitting the
- <kbd>Escape</kbd> key), or if the <a href=#current-target-element>current target
- element</a> is null, then the drag operation failed. Run
- these substeps:</p>
+ <p>If the <a href=#current-drag-operation>current drag operation</a> is "<code title="">none</code>" (no drag
+ operation), or, if the user ended the drag-and-drop operation by canceling it (e.g. by hitting
+ the <kbd>Escape</kbd> key), or if the <a href=#current-target-element>current target element</a> is null, then the
+ drag operation failed. Run these substeps:</p>
<ol><li><p>Let <var title="">dropped</var> be false.</li>
- <li><p>If the <a href=#current-target-element>current target element</a> is a DOM
- element, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at it; otherwise, if
- it is not null, use platform-specific conventions for drag
- cancellation.</p>
+ <li><p>If the <a href=#current-target-element>current target element</a> is a DOM element, <a href=#fire-a-dnd-event>fire a DND
+ event</a> named <code title=event-dragleave><a href=#event-dragleave>dragleave</a></code> at it; otherwise, if it is
+ not null, use platform-specific conventions for drag cancellation.</p>
- </ol><p>Otherwise, the drag operation might be a success; run these
- substeps:</p>
+ </ol><p>Otherwise, the drag operation might be a success; run these substeps:</p>
<ol><li><p>Let <var title="">dropped</var> be true.</li>
- <li><p>If the <a href=#current-target-element>current target element</a> is a DOM
- element, <a href=#fire-a-dnd-event>fire a DND event</a> named <code title=event-drop><a href=#event-drop>drop</a></code> at it; otherwise, use
+ <li><p>If the <a href=#current-target-element>current target element</a> is a DOM element, <a href=#fire-a-dnd-event>fire a DND
+ event</a> named <code title=event-drop><a href=#event-drop>drop</a></code> at it; otherwise, use
platform-specific conventions for indicating a drop.</li>
<li>
@@ -77007,33 +76852,28 @@
object as it stood after the event <a href=#concept-event-dispatch title=concept-event-dispatch>dispatch</a>
finished.</p>
- <p>Otherwise, the event is not canceled; perform the event's
- default action, which depends on the exact target as
- follows:</p>
+ <p>Otherwise, the event is not canceled; perform the event's default action, which depends
+ on the exact target as follows:</p>
- <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text
- field (e.g. <code><a href=#the-textarea-element>textarea</a></code>, or an <code><a href=#the-input-element>input</a></code>
- element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code>
- attribute is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element,
- and the <a href=#drag-data-store-item-list>drag data store item list</a> has an item
- with <a href=#the-drag-data-item-type-string>the drag data item type string</a>
- "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item
- kind</a> <i>Plain Unicode string</i></dt>
+ <dl class=switch><dt>If the <a href=#current-target-element>current target element</a> is a text field (e.g. <code><a href=#the-textarea-element>textarea</a></code>,
+ or an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute
+ is in the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state) or an <a href=#editing-host>editing
+ host</a> or <a href=#editable>editable</a> element, and the <a href=#drag-data-store-item-list>drag data store item
+ list</a> has an item with <a href=#the-drag-data-item-type-string>the drag data item type string</a>
+ "<code>text/plain</code>" and <a href=#the-drag-data-item-kind>the drag data item kind</a> <i>Plain Unicode
+ string</i></dt>
- <dd><p>Insert the actual data of the first item in the
- <a href=#drag-data-store-item-list>drag data store item list</a> to have <a href=#the-drag-data-item-type-string title="the drag data item type string">a drag data item type
- string</a> of "<code>text/plain</code>" and <a href=#the-drag-data-item-kind title="the drag data item kind">a drag data item kind</a>
- that is <i>Plain Unicode string</i> into the text field or
- <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element in
- a manner consistent with platform-specific conventions (e.g.
- inserting it at the current mouse cursor position, or
+ <dd><p>Insert the actual data of the first item in the <a href=#drag-data-store-item-list>drag data store item
+ list</a> to have <a href=#the-drag-data-item-type-string title="the drag data item type string">a drag data item type
+ string</a> of "<code>text/plain</code>" and <a href=#the-drag-data-item-kind title="the drag data item kind">a drag
+ data item kind</a> that is <i>Plain Unicode string</i> into the text field or
+ <a href=#editing-host>editing host</a> or <a href=#editable>editable</a> element in a manner consistent with
+ platform-specific conventions (e.g. inserting it at the current mouse cursor position, or
inserting it at the end of the field).</dd>
<dt>Otherwise</dt>
- <dd><p>Reset the <a href=#current-drag-operation>current drag operation</a> to
- "<code title="">none</code>".</dd>
+ <dd><p>Reset the <a href=#current-drag-operation>current drag operation</a> to "<code title="">none</code>".</dd>
</dl></li>
@@ -77041,49 +76881,42 @@
<li>
- <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragend><a href=#event-dragend>dragend</a></code> at the <a href=#source-node>source
- node</a>.</p>
+ <p><a href=#fire-a-dnd-event>Fire a DND event</a> named <code title=event-dragend><a href=#event-dragend>dragend</a></code> at the
+ <a href=#source-node>source node</a>.</p>
</li>
<li>
- <p>Run the appropriate steps from the following list as the
- default action of the <code title=event-dragend><a href=#event-dragend>dragend</a></code>
- event:</p>
+ <p>Run the appropriate steps from the following list as the default action of the <code title=event-dragend><a href=#event-dragend>dragend</a></code> event:</p>
- <dl class=switch><dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
- target element</a> is a <i>text field</i> (see below), the
- <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
- operation is a selection in the DOM that is entirely contained
- within an <a href=#editing-host>editing host</a></dt>
+ <dl class=switch><dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current target element</a> is a
+ <i>text field</i> (see below), the <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop operation is a selection in the
+ DOM that is entirely contained within an <a href=#editing-host>editing host</a></dt>
<dd><p><a href=#delete-the-selection>Delete the selection</a>.</dd>
- <dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current
- target element</a> is a <i>text field</i> (see below), the
- <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop
- operation is a selection in a text field</dt>
+ <dt>If <var title="">dropped</var> is true, the <a href=#current-target-element>current target element</a> is a
+ <i>text field</i> (see below), the <a href=#current-drag-operation>current drag operation</a> is "<code title="">move</code>", and the source of the drag-and-drop operation is a selection in a text
+ field</dt>
- <dd><p>The user agent should delete the dragged selection from
- the relevant text field.</dd>
+ <dd><p>The user agent should delete the dragged selection from the relevant text
+ field.</dd>
- <dt>If <var title="">dropped</var> is false or if the
- <a href=#current-drag-operation>current drag operation</a> is "<code title="">none</code>"</dt>
+ <dt>If <var title="">dropped</var> is false or if the <a href=#current-drag-operation>current drag operation</a> is
+ "<code title="">none</code>"</dt>
- <dd><p>The drag was canceled. If the platform conventions
- dictate that this be represented to the user (e.g. by animating
- the dragged selection going back to the source of the
+ <dd><p>The drag was canceled. If the platform conventions dictate that this be represented to
+ the user (e.g. by animating the dragged selection going back to the source of the
drag-and-drop operation), then do so.</dd>
<dt>Otherwise</dt>
<dd><p>The event has no default action.</dd>
- </dl><p>For the purposes of this step, a <i>text field</i> is a
- <code><a href=#the-textarea-element>textarea</a></code> element or an <code><a href=#the-input-element>input</a></code> element
- whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- one of the
+ </dl><p>For the purposes of this step, a <i>text field</i> is a <code><a href=#the-textarea-element>textarea</a></code> element or an
+ <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in one
+ of the
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a>,
<a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-search>Search</a>,
<a href="#telephone-state-(type=tel)" title=attr-input-type-tel>Tel</a>,
@@ -77098,17 +76931,14 @@
</ol></li>
- </ol><p class=note>User agents are encouraged to consider how to react
- to drags near the edge of scrollable regions. For example, if a user
- drags a link to the bottom of the viewport on a long page, it might
- make sense to scroll the page so that the user can drop the link
- lower on the page.</p>
+ </ol><p class=note>User agents are encouraged to consider how to react to drags near the edge of
+ scrollable regions. For example, if a user drags a link to the bottom of the viewport on a long
+ page, it might make sense to scroll the page so that the user can drop the link lower on the
+ page.</p>
- <p class=note>This model is independent of which
- <code><a href=#document>Document</a></code> object the nodes involved are from; the events
- are fired as described above and the rest of the processing model
- runs as described above, irrespective of how many documents are
- involved in the operation.</p>
+ <p class=note>This model is independent of which <code><a href=#document>Document</a></code> object the nodes involved
+ are from; the events are fired as described above and the rest of the processing model runs as
+ described above, irrespective of how many documents are involved in the operation.</p>
</div>
@@ -80214,26 +80044,23 @@
</ol></li>
- </ol><p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user
- agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
- set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code>
- object. <strong>Once the user agent has <a href=#fail-the-connection title="fail the
- connection">failed the connection</a>, it does <em>not</em>
- attempt to reconnect!</strong></p>
+ </ol><p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user agent must <a href=#queue-a-task>queue a
+ task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple
+ event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code> object.
+ <strong>Once the user agent has <a href=#fail-the-connection title="fail the connection">failed the connection</a>, it
+ does <em>not</em> attempt to reconnect!</strong></p>
- <hr><p>The <a href=#task-source>task source</a> for any <a href=#concept-task title=concept-task>tasks</a> that are <a href=#queue-a-task title="queue a
- task">queued</a> by <code><a href=#eventsource>EventSource</a></code> objects is the
- <dfn id=remote-event-task-source>remote event task source</dfn>.</p>
+ <hr><p>The <a href=#task-source>task source</a> for any <a href=#concept-task title=concept-task>tasks</a> that are <a href=#queue-a-task title="queue a task">queued</a> by <code><a href=#eventsource>EventSource</a></code> objects is the <dfn id=remote-event-task-source>remote event
+ task source</dfn>.</p>
<h4 id=parsing-an-event-stream><span class=secno>10.2.4 </span>Parsing an event stream</h4>
- <p>This event stream format's <a href=#mime-type>MIME type</a> is
- <code><a href=#text/event-stream>text/event-stream</a></code>.</p>
+ <p>This event stream format's <a href=#mime-type>MIME type</a> is <code><a href=#text/event-stream>text/event-stream</a></code>.</p>
- <p>The event stream format is as described by the <code title="">stream</code> production of the following ABNF, the
- character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
+ <p>The event stream format is as described by the <code title="">stream</code> production of the
+ following ABNF, the character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
<pre>stream = [ bom ] *event
event = *( comment / field ) end-of-line
@@ -80252,19 +80079,17 @@
any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
; a <a href=#unicode-character>Unicode character</a> other than U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)</pre>
- <p>Event streams in this format must always be encoded as
- UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p>
+ <p>Event streams in this format must always be encoded as UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p>
- <p>Lines must be separated by either a U+000D CARRIAGE RETURN U+000A
- LINE FEED (CRLF) character pair, a single U+000A LINE FEED (LF)
- character, or a single U+000D CARRIAGE RETURN (CR) character.</p>
+ <p>Lines must be separated by either a U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character
+ pair, a single U+000A LINE FEED (LF) character, or a single U+000D CARRIAGE RETURN (CR)
+ character.</p>
- <p>Since connections established to remote servers for such
- resources are expected to be long-lived, UAs should ensure that
- appropriate buffering is used. In particular, while line buffering
- with lines are defined to end with a single U+000A LINE FEED (LF)
- character is safe, block buffering or line buffering with different
- expected line endings can cause delays in event dispatch.</p>
+ <p>Since connections established to remote servers for such resources are expected to be
+ long-lived, UAs should ensure that appropriate buffering is used. In particular, while line
+ buffering with lines are defined to end with a single U+000A LINE FEED (LF) character is safe,
+ block buffering or line buffering with different expected line endings can cause delays in event
+ dispatch.</p>
<h4 id=event-stream-interpretation><span class=secno>10.2.5 </span>Interpreting an event stream</h4>
@@ -80273,28 +80098,23 @@
handling</a>.
</p>
- <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if
- any are present.</p>
+ <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if any are present.</p>
- <p>The stream must then be parsed by reading everything line by
- line, with a U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF)
- character pair, a single U+000A LINE FEED (LF) character not
- preceded by a U+000D CARRIAGE RETURN (CR) character, and a single
- U+000D CARRIAGE RETURN (CR) character not followed by a U+000A LINE
- FEED (LF) character being the ways in which a line can end.</p>
+ <p>The stream must then be parsed by reading everything line by line, with a U+000D CARRIAGE
+ RETURN U+000A LINE FEED (CRLF) character pair, a single U+000A LINE FEED (LF) character not
+ preceded by a U+000D CARRIAGE RETURN (CR) character, and a single U+000D CARRIAGE RETURN (CR)
+ character not followed by a U+000A LINE FEED (LF) character being the ways in which a line can
+ end.</p>
- <p>When a stream is parsed, a <var title="">data</var> buffer, an
- <var title="">event type</var> buffer, and a <var title="">last
- event ID</var> buffer must be associated with it. They must be
+ <p>When a stream is parsed, a <var title="">data</var> buffer, an <var title="">event type</var>
+ buffer, and a <var title="">last event ID</var> buffer must be associated with it. They must be
initialized to the empty string</p>
- <p>Lines must be processed, in the order they are received, as
- follows:</p>
+ <p>Lines must be processed, in the order they are received, as follows:</p>
<dl class=switch><dt>If the line is empty (a blank line)</dt>
- <dd><p><a href=#dispatchMessage>Dispatch the event</a>, as
- defined below.</dd>
+ <dd><p><a href=#dispatchMessage>Dispatch the event</a>, as defined below.</dd>
<dt>If the line starts with a U+003A COLON character (:)</dt>
@@ -80306,18 +80126,12 @@
<dd>
- <p>Collect the characters on the line before the first U+003A
- COLON character (:), and let <var title="">field</var> be that
- string.</p>
+ <p>Collect the characters on the line before the first U+003A COLON character (:), and let <var title="">field</var> be that string.</p>
- <p>Collect the characters on the line after the first U+003A COLON
- character (:), and let <var title="">value</var> be that
- string. If <var title="">value</var> starts with a U+0020
- SPACE character, remove it from <var title="">value</var>.</p>
+ <p>Collect the characters on the line after the first U+003A COLON character (:), and let <var title="">value</var> be that string. If <var title="">value</var> starts with a U+0020 SPACE
+ character, remove it from <var title="">value</var>.</p>
- <p><a href=#processField>Process the field</a> using the steps
- described below, using <var title="">field</var> as the field name
- and <var title="">value</var> as the field value.</p>
+ <p><a href=#processField>Process the field</a> using the steps described below, using <var title="">field</var> as the field name and <var title="">value</var> as the field value.</p>
</dd>
@@ -85132,31 +84946,25 @@
</ol><h5 id=the-stack-of-open-elements><span class=secno>12.2.3.2 </span>The stack of open elements</h5>
-<!--CLEANUP-->
- <p>Initially, the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The
- stack grows downwards; the topmost node on the stack is the first
- one added to the stack, and the bottommost node of the stack is the
- most recently added node in the stack (notwithstanding when the
- stack is manipulated in a random access fashion as part of <a href=#adoptionAgency>the handling for misnested tags</a>).</p>
+ <p>Initially, the <dfn id=stack-of-open-elements>stack of open elements</dfn> is empty. The stack grows downwards; the
+ topmost node on the stack is the first one added to the stack, and the bottommost node of the
+ stack is the most recently added node in the stack (notwithstanding when the stack is manipulated
+ in a random access fashion as part of <a href=#adoptionAgency>the handling for misnested
+ tags</a>).</p>
- <p class=note>The "<a href=#the-before-html-insertion-mode title="insertion mode: before html">before
- html</a>" <a href=#insertion-mode>insertion mode</a> creates the
- <code><a href=#the-html-element>html</a></code> root element node, which is then added to the
- stack.</p>
+ <p class=note>The "<a href=#the-before-html-insertion-mode title="insertion mode: before html">before html</a>" <a href=#insertion-mode>insertion
+ mode</a> creates the <code><a href=#the-html-element>html</a></code> root element node, which is then added to the stack.</p>
- <p class=note>In the <a href=#fragment-case>fragment case</a>, the <a href=#stack-of-open-elements>stack of open
- elements</a> is initialized to contain an <code><a href=#the-html-element>html</a></code>
- element that is created as part of <a href=#html-fragment-parsing-algorithm title="html fragment
- parsing algorithm">that algorithm</a>. (The <a href=#fragment-case>fragment
- case</a> skips the "<a href=#the-before-html-insertion-mode title="insertion mode: before
- html">before html</a>" <a href=#insertion-mode>insertion mode</a>.)</p>
+ <p class=note>In the <a href=#fragment-case>fragment case</a>, the <a href=#stack-of-open-elements>stack of open elements</a> is
+ initialized to contain an <code><a href=#the-html-element>html</a></code> element that is created as part of <a href=#html-fragment-parsing-algorithm title="html
+ fragment parsing algorithm">that algorithm</a>. (The <a href=#fragment-case>fragment case</a> skips the
+ "<a href=#the-before-html-insertion-mode title="insertion mode: before html">before html</a>" <a href=#insertion-mode>insertion mode</a>.)</p>
- <p>The <code><a href=#the-html-element>html</a></code> node, however it is created, is the topmost
- node of the stack. It only gets popped off the stack when the parser
- <a href=#stop-parsing title="stop parsing">finishes</a>.</p>
+ <p>The <code><a href=#the-html-element>html</a></code> node, however it is created, is the topmost node of the stack. It only
+ gets popped off the stack when the parser <a href=#stop-parsing title="stop parsing">finishes</a>.</p>
- <p>The <dfn id=current-node>current node</dfn> is the bottommost node in this
- <a href=#stack-of-open-elements>stack of open elements</a>.</p>
+ <p>The <dfn id=current-node>current node</dfn> is the bottommost node in this <a href=#stack-of-open-elements>stack of open
+ elements</a>.</p>
<p>The <dfn id=adjusted-current-node>adjusted current node</dfn> is the <i title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></i>
element if the <a href=#stack-of-open-elements>stack of open elements</a> has only one element in it and the parser was
@@ -85179,53 +84987,45 @@
<code><a href=#the-hr-element>hr</a></code>, <code><a href=#the-html-element>html</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <!-- <code>image</code>, (commented out
because this isn't an element that can end up on the stack, so it doesn't matter) -->
<code><a href=#the-img-element>img</a></code>, <code><a href=#the-input-element>input</a></code>, <code><a href=#isindex-0>isindex</a></code>, <code><a href=#the-li-element>li</a></code>, <code><a href=#the-link-element>link</a></code>,
- <code><a href=#listing>listing</a></code>, <code><a href=#the-main-element>main</a></code>, <code><a href=#the-marquee-element>marquee</a></code>, <code><a href=#the-menu-element>menu</a></code>, <code><a href=#the-menuitem-element>menuitem</a></code>,
- <code><a href=#the-meta-element>meta</a></code>, <code><a href=#the-nav-element>nav</a></code>, <code><a href=#noembed>noembed</a></code>, <code><a href=#noframes>noframes</a></code>,
- <code><a href=#the-noscript-element>noscript</a></code>, <code><a href=#the-object-element>object</a></code>, <code><a href=#the-ol-element>ol</a></code>, <code><a href=#the-p-element>p</a></code>, <code><a href=#the-param-element>param</a></code>,
- <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>, <code><a href=#the-script-element>script</a></code>, <code><a href=#the-section-element>section</a></code>,
- <code><a href=#the-select-element>select</a></code>, <code><a href=#the-source-element>source</a></code>, <code><a href=#the-style-element>style</a></code>, <code><a href=#the-summary-element>summary</a></code>,
- <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-td-element>td</a></code>, <code><a href=#the-textarea-element>textarea</a></code>,
- <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-th-element>th</a></code>, <code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-title-element>title</a></code>, <code><a href=#the-tr-element>tr</a></code>,
- <code><a href=#the-track-element>track</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#the-wbr-element>wbr</a></code>, and <code><a href=#xmp>xmp</a></code>; MathML's <code title="">mi</code>, <code title="">mo</code>, <code title="">mn</code>, <code title="">ms</code>,
- <code title="">mtext</code>, and <code title="">annotation-xml</code>; and SVG's <code title="">foreignObject</code>, <code title="">desc</code>, and <code title="">title</code>.</dd> <!-- we could actually put all non-HTML elements in this list, I
- think -->
+ <code><a href=#listing>listing</a></code>, <code><a href=#the-main-element>main</a></code>, <code><a href=#the-marquee-element>marquee</a></code>, <code><a href=#the-menu-element>menu</a></code>,
+ <code><a href=#the-menuitem-element>menuitem</a></code>, <code><a href=#the-meta-element>meta</a></code>, <code><a href=#the-nav-element>nav</a></code>, <code><a href=#noembed>noembed</a></code>,
+ <code><a href=#noframes>noframes</a></code>, <code><a href=#the-noscript-element>noscript</a></code>, <code><a href=#the-object-element>object</a></code>, <code><a href=#the-ol-element>ol</a></code>,
+ <code><a href=#the-p-element>p</a></code>, <code><a href=#the-param-element>param</a></code>, <code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>,
+ <code><a href=#the-script-element>script</a></code>, <code><a href=#the-section-element>section</a></code>, <code><a href=#the-select-element>select</a></code>, <code><a href=#the-source-element>source</a></code>,
+ <code><a href=#the-style-element>style</a></code>, <code><a href=#the-summary-element>summary</a></code>, <code><a href=#the-table-element>table</a></code>, <code><a href=#the-tbody-element>tbody</a></code>,
+ <code><a href=#the-td-element>td</a></code>, <code><a href=#the-textarea-element>textarea</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-th-element>th</a></code>, <code><a href=#the-thead-element>thead</a></code>,
+ <code><a href=#the-title-element>title</a></code>, <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-track-element>track</a></code>, <code><a href=#the-ul-element>ul</a></code>, <code><a href=#the-wbr-element>wbr</a></code>, and
+ <code><a href=#xmp>xmp</a></code>; MathML's <code title="">mi</code>, <code title="">mo</code>, <code title="">mn</code>, <code title="">ms</code>, <code title="">mtext</code>, and <code title="">annotation-xml</code>; and SVG's <code title="">foreignObject</code>, <code title="">desc</code>, and <code title="">title</code>.</dd> <!-- we could actually put all
+ non-HTML elements in this list, I think -->
<dt><dfn id=formatting>Formatting</dfn></dt>
- <dd><p>The following HTML elements are those that end up in the
- <a href=#list-of-active-formatting-elements>list of active formatting elements</a>: <code><a href=#the-a-element>a</a></code>,
- <code><a href=#the-b-element>b</a></code>, <code><a href=#big>big</a></code>, <code><a href=#the-code-element>code</a></code>,
- <code><a href=#the-em-element>em</a></code>, <code><a href=#font>font</a></code>, <code><a href=#the-i-element>i</a></code>,
- <code><a href=#nobr>nobr</a></code>, <code><a href=#the-s-element>s</a></code>, <code><a href=#the-small-element>small</a></code>,
- <code><a href=#strike>strike</a></code>, <code><a href=#the-strong-element>strong</a></code>, <code><a href=#tt>tt</a></code>, and
+ <dd><p>The following HTML elements are those that end up in the <a href=#list-of-active-formatting-elements>list of active formatting
+ elements</a>: <code><a href=#the-a-element>a</a></code>, <code><a href=#the-b-element>b</a></code>, <code><a href=#big>big</a></code>, <code><a href=#the-code-element>code</a></code>,
+ <code><a href=#the-em-element>em</a></code>, <code><a href=#font>font</a></code>, <code><a href=#the-i-element>i</a></code>, <code><a href=#nobr>nobr</a></code>, <code><a href=#the-s-element>s</a></code>,
+ <code><a href=#the-small-element>small</a></code>, <code><a href=#strike>strike</a></code>, <code><a href=#the-strong-element>strong</a></code>, <code><a href=#tt>tt</a></code>, and
<code><a href=#the-u-element>u</a></code>.</dd>
<dt><dfn id=ordinary>Ordinary</dfn></dt>
- <dd><p>All other elements found while parsing an HTML
- document.</dd>
+ <dd><p>All other elements found while parsing an HTML document.</dd>
- </dl><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-the-specific-scope title="has an element in the specific scope">have an element in a
- specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a
- match state:</p>
+ </dl><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-the-specific-scope title="has an element in the specific
+ scope">have an element in a specific scope</dfn> consisting of a list of element types <var title="">list</var> when the following algorithm terminates in a match state:</p>
- <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
- node</a> (the bottommost node of the stack).</li>
+ <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current node</a> (the bottommost
+ node of the stack).</li>
- <li><p>If <var title="">node</var> is the target node, terminate in
- a match state.</li>
+ <li><p>If <var title="">node</var> is the target node, terminate in a match state.</li>
- <li><p>Otherwise, if <var title="">node</var> is one of the element
- types in <var title="">list</var>, terminate in a failure
- state.</li>
+ <li><p>Otherwise, if <var title="">node</var> is one of the element types in <var title="">list</var>, terminate in a failure state.</li>
- <li><p>Otherwise, set <var title="">node</var> to the previous
- entry in the <a href=#stack-of-open-elements>stack of open elements</a> and return to step
- 2. (This will never fail, since the loop will always terminate in
- the previous step if the top of the stack — an
- <code><a href=#the-html-element>html</a></code> element — is reached.)</li>
+ <li><p>Otherwise, set <var title="">node</var> to the previous entry in the <a href=#stack-of-open-elements>stack of open
+ elements</a> and return to step 2. (This will never fail, since the loop will always terminate
+ in the previous step if the top of the stack — an <code><a href=#the-html-element>html</a></code> element — is
+ reached.)</li>
- </ol><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-scope title="has an element in scope">have an element in scope</dfn> when
- it <a href=#has-an-element-in-the-specific-scope>has an element in the specific scope</a> consisting
- of the following element types:</p>
+ </ol><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-scope title="has an element in scope">have an
+ element in scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific scope</a> consisting of the
+ following element types:</p>
<ul class=brief><li><code><a href=#the-applet-element>applet</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
<li><code><a href=#the-caption-element>caption</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
@@ -85244,43 +85044,40 @@
<li><code title="">foreignObject</code> in the <a href=#svg-namespace>SVG namespace</a></li>
<li><code title="">desc</code> in the <a href=#svg-namespace>SVG namespace</a></li>
<li><code title="">title</code> in the <a href=#svg-namespace>SVG namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-list-item-scope title="has an element in list item scope">have an element in list
- item scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-list-item-scope title="has an element in list item
+ scope">have an element in list item scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
scope</a> consisting of the following element types:</p>
<ul class=brief><li>All the element types listed above for the <i><a href=#has-an-element-in-scope>has an element
in scope</a></i> algorithm.</li>
<li><code><a href=#the-ol-element>ol</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
<li><code><a href=#the-ul-element>ul</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-button-scope title="has an element in button scope">have an element in button
- scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-button-scope title="has an element in button
+ scope">have an element in button scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
scope</a> consisting of the following element types:</p>
<ul class=brief><li>All the element types listed above for the <i><a href=#has-an-element-in-scope>has an element
in scope</a></i> algorithm.</li>
<li><code><a href=#the-button-element>button</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-table-scope title="has an element in table scope">have an element in table
- scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-table-scope title="has an element in table
+ scope">have an element in table scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
scope</a> consisting of the following element types:</p>
<ul class=brief><li><code><a href=#the-html-element>html</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li> <!-- (This can only happen if the <var title="">node</var> is the topmost node of the <span>stack of open elements</span>, and prevents the next step from being invoked if there are no more elements in the stack.) -->
<li><code><a href=#the-table-element>table</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-select-scope title="has an element in select scope">have an element in select
- scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
- scope</a> consisting of all element types <em>except</em> the
- following:</p>
+ </ul><p>The <a href=#stack-of-open-elements>stack of open elements</a> is said to <dfn id=has-an-element-in-select-scope title="has an element in select
+ scope">have an element in select scope</dfn> when it <a href=#has-an-element-in-the-specific-scope>has an element in the specific
+ scope</a> consisting of all element types <em>except</em> the following:</p>
<ul class=brief><!--<li><code>select</code> in the <span>HTML namespace</span></li>--><li><code><a href=#the-optgroup-element>optgroup</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
<li><code><a href=#the-option-element>option</a></code> in the <a href=#html-namespace-0>HTML namespace</a></li>
- </ul><p>Nothing happens if at any time any of the elements in the
- <a href=#stack-of-open-elements>stack of open elements</a> are moved to a new location in,
- or removed from, the <code><a href=#document>Document</a></code> tree. In particular, the
- stack is not changed in this situation. This can cause, amongst
- other strange effects, content to be appended to nodes that are no
- longer in the DOM.</p>
+ </ul><p>Nothing happens if at any time any of the elements in the <a href=#stack-of-open-elements>stack of open elements</a>
+ are moved to a new location in, or removed from, the <code><a href=#document>Document</a></code> tree. In particular,
+ the stack is not changed in this situation. This can cause, amongst other strange effects, content
+ to be appended to nodes that are no longer in the DOM.</p>
- <p class=note>In some cases (namely, when <a href=#adoptionAgency>closing misnested formatting elements</a>),
- the stack is manipulated in a random-access fashion.</p>
+ <p class=note>In some cases (namely, when <a href=#adoptionAgency>closing misnested formatting
+ elements</a>), the stack is manipulated in a random-access fashion.</p>
<h5 id=the-list-of-active-formatting-elements><span class=secno>12.2.3.3 </span>The list of active formatting elements</h5>
@@ -87608,20 +87405,18 @@
the stack when you hit a limit, or something. -->
<h4 id=tree-construction><span class=secno>12.2.5 </span><dfn>Tree construction</dfn></h4>
-<!--CLEANUP-->
- <p>The input to the tree construction stage is a sequence of tokens
- from the <a href=#tokenization>tokenization</a> stage. The tree construction
- stage is associated with a DOM <code><a href=#document>Document</a></code> object when a
- parser is created. The "output" of this stage consists of
+ <p>The input to the tree construction stage is a sequence of tokens from the
+ <a href=#tokenization>tokenization</a> stage. The tree construction stage is associated with a DOM
+ <code><a href=#document>Document</a></code> object when a parser is created. The "output" of this stage consists of
dynamically modifying or extending that document's DOM tree.</p>
- <p>This specification does not define when an interactive user agent
- has to render the <code><a href=#document>Document</a></code> so that it is available to
- the user, or when it has to begin accepting user input.</p>
+ <p>This specification does not define when an interactive user agent has to render the
+ <code><a href=#document>Document</a></code> so that it is available to the user, or when it has to begin accepting user
+ input.</p>
- <hr><p>As each token is emitted from the tokenizer, the user agent must
- follow the appropriate steps from the following list:</p>
+ <hr><p>As each token is emitted from the tokenizer, the user agent must follow the appropriate steps
+ from the following list:</p>
<dl class=switch><dt>If there is no <a href=#adjusted-current-node>adjusted current node</a></dt>
<dt>If the <a href=#adjusted-current-node>adjusted current node</a> is an element in the <a href=#html-namespace-0>HTML namespace</a></dt>
@@ -87632,49 +87427,41 @@
<dt>If the <a href=#adjusted-current-node>adjusted current node</a> is an <a href=#html-integration-point>HTML integration point</a> and the token is a character token</dt>
<dt>If the token is an end-of-file token</dt>
- <dd>Process the token according to the rules given in the section
- corresponding to the current <a href=#insertion-mode>insertion mode</a> in HTML
- content.</dd>
+ <dd>Process the token according to the rules given in the section corresponding to the current
+ <a href=#insertion-mode>insertion mode</a> in HTML content.</dd>
<dt>Otherwise</dt>
- <dd>Process the token according to the rules given in the section
- for parsing tokens <a href=#parsing-main-inforeign title="insertion mode: in foreign
- content">in foreign content</a>.</dd>
+ <dd>Process the token according to the rules given in the section for parsing tokens <a href=#parsing-main-inforeign title="insertion mode: in foreign content">in foreign content</a>.</dd>
- </dl><p>When the specification says that a user agent is to <dfn id=act-as-if-a-token-had-been-seen>act as
- if a token had been seen</dfn>, it means that the user agent is to
- follow the appropriate steps from the above list.</p>
+ </dl><p>When the specification says that a user agent is to <dfn id=act-as-if-a-token-had-been-seen>act as if a token had been seen</dfn>,
+ it means that the user agent is to follow the appropriate steps from the above list.</p>
- <p>A node is a <dfn id=mathml-text-integration-point>MathML text
- integration point</dfn> if it is one of the following elements:</p>
+ <p>A node is a <dfn id=mathml-text-integration-point>MathML text integration point</dfn> if it is one of the following
+ elements:</p>
<ul class=brief><li>An <code title="">mi</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">mo</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">mn</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">ms</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
<li>An <code title="">mtext</code> element in the <a href=#mathml-namespace>MathML namespace</a></li>
- </ul><p>A node is an <dfn id=html-integration-point>HTML
- integration point</dfn> if it is one of the following elements:</p>
+ </ul><p>A node is an <dfn id=html-integration-point>HTML integration point</dfn> if it is one of the following elements:</p>
<ul class=brief><li>An <code title="">annotation-xml</code> element in the <a href=#mathml-namespace>MathML namespace</a> whose start tag token had an attribute with the name "encoding" whose value was an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">text/html</code>"</li>
<li>An <code title="">annotation-xml</code> element in the <a href=#mathml-namespace>MathML namespace</a> whose start tag token had an attribute with the name "encoding" whose value was an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string "<code title="">application/xhtml+xml</code>"</li>
<li>A <code title="">foreignObject</code> element in the <a href=#svg-namespace>SVG namespace</a></li>
<li>A <code title="">desc</code> element in the <a href=#svg-namespace>SVG namespace</a></li>
<li>A <code title="">title</code> element in the <a href=#svg-namespace>SVG namespace</a></li>
- </ul><hr><p>When the steps below require the UA to <dfn id=insert-a-character>insert a
- character</dfn> into a node, if that node has a child immediately
- before where the character is to be inserted, and that child is a
- <code><a href=#text>Text</a></code> node, then the character must be appended to that
- <code><a href=#text>Text</a></code> node; otherwise, a new <code><a href=#text>Text</a></code> node
- whose data is just that character must be inserted in the
+ </ul><hr><p>When the steps below require the UA to <dfn id=insert-a-character>insert a character</dfn> into a node, if that node
+ has a child immediately before where the character is to be inserted, and that child is a
+ <code><a href=#text>Text</a></code> node, then the character must be appended to that <code><a href=#text>Text</a></code> node;
+ otherwise, a new <code><a href=#text>Text</a></code> node whose data is just that character must be inserted in the
appropriate place.</p>
<div class=example>
- <p>Here are some sample inputs to the parser and the corresponding
- number of <code><a href=#text>Text</a></code> nodes that they result in, assuming a user agent
- that executes scripts.</p>
+ <p>Here are some sample inputs to the parser and the corresponding number of <code><a href=#text>Text</a></code>
+ nodes that they result in, assuming a user agent that executes scripts.</p>
<table><thead><tr><th>Input <th>Number of <code><a href=#text>Text</a></code> nodes
<tbody><tr><td><pre>A<script>
@@ -87706,18 +87493,14 @@
<p>However, mutation observers <em>do</em> fire, as required by the DOM specification.</p>
- <p class=note>Not all of the tag names mentioned below are
- conformant tag names in this specification; many are included to
- handle legacy content. They still form part of the algorithm that
- implementations are required to implement to claim conformance.</p>
+ <p class=note>Not all of the tag names mentioned below are conformant tag names in this
+ specification; many are included to handle legacy content. They still form part of the algorithm
+ that implementations are required to implement to claim conformance.</p>
- <p class=note>The algorithm described below places no limit on the
- depth of the DOM tree generated, or on the length of tag names,
- attribute names, attribute values, <code><a href=#text>Text</a></code> nodes, etc. While
- implementors are encouraged to avoid arbitrary limits, it is
- recognized that <a href=#hardwareLimitations>practical
- concerns</a> will likely force user agents to impose nesting depth
- constraints.</p>
+ <p class=note>The algorithm described below places no limit on the depth of the DOM tree
+ generated, or on the length of tag names, attribute names, attribute values, <code><a href=#text>Text</a></code>
+ nodes, etc. While implementors are encouraged to avoid arbitrary limits, it is recognized that <a href=#hardwareLimitations>practical concerns</a> will likely force user agents to impose nesting
+ depth constraints.</p>
<h5 id=creating-and-inserting-elements><span class=secno>12.2.5.1 </span>Creating and inserting elements</h5>
@@ -91124,34 +90907,31 @@
</dd>
</dl><h5 id=parsing-main-inforeign><span class=secno>12.2.5.5 </span>The rules for parsing tokens <dfn title="insertion mode: in foreign content">in foreign content</dfn></h5>
-<!--CLEANUP-->
<p>When the user agent is to apply the rules for parsing tokens in foreign content, the user agent must handle the token as follows:</p>
<dl class=switch><dt>A character token that is U+0000 NULL</dt>
<dd>
- <p><a href=#parse-error>Parse error</a>. <a href=#insert-a-character title="insert a
- character">Insert a U+FFFD REPLACEMENT CHARACTER character</a>
- into the <a href=#current-node>current node</a>.</p>
+ <p><a href=#parse-error>Parse error</a>. <a href=#insert-a-character title="insert a character">Insert a U+FFFD REPLACEMENT
+ CHARACTER character</a> into the <a href=#current-node>current node</a>.</p>
</dd>
- <dt>A character token that is one of U+0009 CHARACTER TABULATION,
- U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE
- RETURN (CR), or U+0020 SPACE</dt>
+ <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
+ FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt>
<dd>
- <p><a href=#insert-a-character title="insert a character">Insert the token's
- character</a> into the <a href=#current-node>current node</a>.</p>
+ <p><a href=#insert-a-character title="insert a character">Insert the token's character</a> into the <a href=#current-node>current
+ node</a>.</p>
</dd>
<dt>Any other character token</dt>
<dd>
- <p><a href=#insert-a-character title="insert a character">Insert the token's
- character</a> into the <a href=#current-node>current node</a>.</p>
+ <p><a href=#insert-a-character title="insert a character">Insert the token's character</a> into the <a href=#current-node>current
+ node</a>.</p>
<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>
@@ -91159,9 +90939,9 @@
<dt>A comment token</dt>
<dd>
- <p>Append a <code><a href=#comment-0>Comment</a></code> node to the <a href=#current-node>current
- node</a> with the <code title="">data</code> attribute set to
- the data given in the comment token.</p>
+
+ <p>Append a <code><a href=#comment-0>Comment</a></code> node to the <a href=#current-node>current node</a> with the <code title="">data</code> attribute set to the data given in the comment token.</p>
+
</dd>
<dt>A DOCTYPE token</dt>
@@ -91169,25 +90949,19 @@
<p><a href=#parse-error>Parse error</a>. Ignore the token.</p>
</dd>
- <dt>A start tag whose tag name is one of: <!--"a",--> "b", "big",
- "blockquote", "body"<!--by inspection-->, "br", "center", "code",
- "dd", "div", "dl", "dt"<!-- so that dd and dt can be handled
- uniformly throughout the parser -->, "em", "embed", "h1", "h2",
- "h3", "h4"<!--for completeness-->, "h5", "h6"<!--for
- completeness-->, "head"<!--by inspection-->, "hr", "i", "img",
- "li", "listing"<!-- so that pre and listing can be handled
- uniformly throughout the parser -->, "menu", "meta", "nobr",
- "ol"<!-- so that dl, ul, and ol can be handled uniformly throughout
- the parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small",
- "span", "strong", "strike"<!-- so that s and strike can be handled
- uniformly throughout the parser -->, <!--"style",--> "sub", "sup",
- "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this
- list was determined empirically by studying over 6,000,000,000
- pages that were specifically not XML pages -->
- <dt>A start tag whose tag name is "font", if the token has any
- attributes named "color", "face", or "size"</dt> <!-- the
- attributes here are required so that SVG <font> will go through as
- SVG but legacy <font>s won't -->
+ <dt>A start tag whose tag name is one of: <!--"a",--> "b", "big", "blockquote", "body"<!--by
+ inspection-->, "br", "center", "code", "dd", "div", "dl", "dt"<!-- so that dd and dt can be
+ handled uniformly throughout the parser -->, "em", "embed", "h1", "h2", "h3", "h4"<!--for
+ completeness-->, "h5", "h6"<!--for completeness-->, "head"<!--by inspection-->, "hr", "i", "img",
+ "li", "listing"<!-- so that pre and listing can be handled uniformly throughout the parser -->,
+ "menu", "meta", "nobr", "ol"<!-- so that dl, ul, and ol can be handled uniformly throughout the
+ parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so
+ that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub",
+ "sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined
+ empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A
+ start tag whose tag name is "font", if the token has any attributes named "color", "face", or
+ "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but
+ legacy <font>s won't -->
<dd>
@@ -91202,12 +90976,10 @@
<p>Otherwise:</p>
- <p>Pop an element from the <a href=#stack-of-open-elements>stack of open elements</a>,
- and then keep popping more elements from the <a href=#stack-of-open-elements>stack of open
- elements</a> until the <a href=#current-node>current node</a> is a
- <a href=#mathml-text-integration-point>MathML text integration point</a>, an <a href=#html-integration-point>HTML
- integration point</a>, or an element in the <a href=#html-namespace-0>HTML
- namespace</a>.</p>
+ <p>Pop an element from the <a href=#stack-of-open-elements>stack of open elements</a>, and then keep popping more
+ elements from the <a href=#stack-of-open-elements>stack of open elements</a> until the <a href=#current-node>current node</a> is a
+ <a href=#mathml-text-integration-point>MathML text integration point</a>, an <a href=#html-integration-point>HTML integration point</a>, or an
+ element in the <a href=#html-namespace-0>HTML namespace</a>.</p>
<p>Then, reprocess the token.</p>
@@ -91216,17 +90988,14 @@
<dt>Any other start tag</dt>
<dd>
- <p>If the <a href=#current-node>current node</a> is an element in the
- <a href=#mathml-namespace>MathML namespace</a>, <a href=#adjust-mathml-attributes>adjust MathML
- attributes</a> for the token. (This fixes the case of MathML
- attributes that are not all lowercase.)</p>
+ <p>If the <a href=#current-node>current node</a> is an element in the <a href=#mathml-namespace>MathML namespace</a>,
+ <a href=#adjust-mathml-attributes>adjust MathML attributes</a> for the token. (This fixes the case of MathML attributes
+ that are not all lowercase.)</p>
- <p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG
- namespace</a>, and the token's tag name is one of the ones in
- the first column of the following table, change the tag name to
- the name given in the corresponding cell in the second
- column. (This fixes the case of SVG elements that are not all
- lowercase.)</p>
+ <p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG namespace</a>, and the
+ token's tag name is one of the ones in the first column of the following table, change the tag
+ name to the name given in the corresponding cell in the second column. (This fixes the case of
+ SVG elements that are not all lowercase.)</p>
<table><thead><tr><th> Tag name <th> Element name
<tbody><tr><td> <code title="">altglyph</code> <td> <code title="">altGlyph</code>
@@ -91266,28 +91035,25 @@
<tr><td> <code title="">radialgradient</code> <td> <code title="">radialGradient</code>
<!--<tr> <td> <code title="">solidcolor</code> <td> <code title="">solidColor</code> (SVG 1.2)-->
<tr><td> <code title="">textpath</code> <td> <code title="">textPath</code>
- </table><p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG
- namespace</a>, <a href=#adjust-svg-attributes>adjust SVG attributes</a> for the
- token. (This fixes the case of SVG attributes that are not all
- lowercase.)</p>
+ </table><p>If the <a href=#current-node>current node</a> is an element in the <a href=#svg-namespace>SVG namespace</a>,
+ <a href=#adjust-svg-attributes>adjust SVG attributes</a> for the token. (This fixes the case of SVG attributes that
+ are not all lowercase.)</p>
- <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This
- fixes the use of namespaced attributes, in particular XLink in
- SVG.)</p>
+ <p><a href=#adjust-foreign-attributes>Adjust foreign attributes</a> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink in SVG.)</p>
- <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the
- same namespace as the <a href=#current-node>current node</a>.</p>
+ <p><a href=#insert-a-foreign-element>Insert a foreign element</a> for the token, in the same namespace as the
+ <a href=#current-node>current node</a>.</p>
- <p>If the token has its <i>self-closing flag</i> set, then run the
- appropriate steps from the following list:</p>
+ <p>If the token has its <i>self-closing flag</i> set, then run the appropriate steps from the
+ following list:</p>
<dl class=switch><dt>If the token's tag name is "script"</dt>
<dd>
- <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></a>, and then act as if an
- end tag with the tag name "script" had been seen.</p>
+ <p><a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></a>, and then act as if an end tag with the tag name "script" had been seen.</p>
</dd>
@@ -91295,9 +91061,7 @@
<dd>
- <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing
+ <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a> and <a href=#acknowledge-self-closing-flag title="acknowledge self-closing flag">acknowledge the token's <i>self-closing
flag</i></a>.</p>
</dd>
@@ -91307,32 +91071,29 @@
<dt id=scriptForeignEndTag>An end tag whose tag name is "script", if the <a href=#current-node>current node</a> is a <code title="">script</code> element in the <a href=#svg-namespace>SVG namespace</a></dt>
<dd>
- <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</p>
+ <p>Pop the <a href=#current-node>current node</a> off the <a href=#stack-of-open-elements>stack of open elements</a>.</p>
- <p>Let the <var title="">old insertion point</var> have the
- same value as the current <a href=#insertion-point>insertion point</a>. Let
- the <a href=#insertion-point>insertion point</a> be just before the <a href=#next-input-character>next
+ <p>Let the <var title="">old insertion point</var> have the same value as the current
+ <a href=#insertion-point>insertion point</a>. Let the <a href=#insertion-point>insertion point</a> be just before the <a href=#next-input-character>next
input character</a>.</p>
- <p>Increment the parser's <a href=#script-nesting-level>script nesting level</a> by
- one. Set the <a href=#parser-pause-flag>parser pause flag</a> to true.</p>
+ <p>Increment the parser's <a href=#script-nesting-level>script nesting level</a> by one. Set the <a href=#parser-pause-flag>parser pause
+ flag</a> to true.</p>
- <p><a href=http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing>Process
- the <code title="">script</code> element</a> according to the SVG
- rules, if the user agent supports SVG. <a href=#refsSVG>[SVG]</a></p>
+ <p><a href=http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing>Process the
+ <code title="">script</code> element</a> according to the SVG rules, if the user agent supports
+ SVG. <a href=#refsSVG>[SVG]</a></p>
- <p class=note>Even if this causes <a href=#dom-document-write title=dom-document-write>new characters to be inserted into the
- tokenizer</a>, the parser will not be executed reentrantly,
- since the <a href=#parser-pause-flag>parser pause flag</a> is true.</p>
+ <p class=note>Even if this causes <a href=#dom-document-write title=dom-document-write>new characters to be
+ inserted into the tokenizer</a>, the parser will not be executed reentrantly, since the
+ <a href=#parser-pause-flag>parser pause flag</a> is true.</p>
- <p>Decrement the parser's <a href=#script-nesting-level>script nesting level</a> by
- one. If the parser's <a href=#script-nesting-level>script nesting level</a> is zero,
- then set the <a href=#parser-pause-flag>parser pause flag</a> to false.</p>
+ <p>Decrement the parser's <a href=#script-nesting-level>script nesting level</a> by one. If the parser's <a href=#script-nesting-level>script
+ nesting level</a> is zero, then set the <a href=#parser-pause-flag>parser pause flag</a> to false.</p>
- <p>Let the <a href=#insertion-point>insertion point</a> have the value of the <var title="">old insertion point</var>. (In other words, restore the
- <a href=#insertion-point>insertion point</a> to its previous value. This value
- might be the "undefined" value.)</p>
+ <p>Let the <a href=#insertion-point>insertion point</a> have the value of the <var title="">old insertion
+ point</var>. (In other words, restore the <a href=#insertion-point>insertion point</a> to its previous value.
+ This value might be the "undefined" value.)</p>
</dd>
@@ -91342,32 +91103,28 @@
<p>Run these steps:</p>
- <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current
- node</a> (the bottommost node of the stack).</li>
+ <ol><li><p>Initialize <var title="">node</var> to be the <a href=#current-node>current node</a> (the bottommost
+ node of the stack).</li>
- <li><p>If <var title="">node</var> is not an element with the
- same tag name as the token, then this is a <a href=#parse-error>parse
- error</a>.</li>
+ <li><p>If <var title="">node</var> is not an element with the same tag name as the token, then
+ this is a <a href=#parse-error>parse error</a>.</li>
<li><p><i>Loop</i>: If <var title="">node</var> is the topmost element in the <a href=#stack-of-open-elements>stack of
open elements</a>, abort these steps. (<a href=#fragment-case>fragment case</a>)</li>
- <li><p>If <var title="">node</var>'s tag name,
- <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, is the same as the tag
- name of the token, pop elements from the <a href=#stack-of-open-elements>stack of open
- elements</a> until <var title="">node</var> has been popped
- from the stack, and then abort these steps.</li>
+ <li><p>If <var title="">node</var>'s tag name, <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, is
+ the same as the tag name of the token, pop elements from the <a href=#stack-of-open-elements>stack of open
+ elements</a> until <var title="">node</var> has been popped from the stack, and then abort
+ these steps.</li>
- <li><p>Set <var title="">node</var> to the previous entry in the
- <a href=#stack-of-open-elements>stack of open elements</a>.</li>
+ <li><p>Set <var title="">node</var> to the previous entry in the <a href=#stack-of-open-elements>stack of open
+ elements</a>.</li>
- <li><p>If <var title="">node</var> is not an element in the
- <a href=#html-namespace-0>HTML namespace</a>, return to the step labeled
- <i>loop</i>.</li>
+ <li><p>If <var title="">node</var> is not an element in the <a href=#html-namespace-0>HTML namespace</a>, return
+ to the step labeled <i>loop</i>.</li>
- <li><p>Otherwise, process the token according to the rules given
- in the section corresponding to the current <a href=#insertion-mode>insertion
- mode</a> in HTML content.</li>
+ <li><p>Otherwise, process the token according to the rules given in the section corresponding
+ to the current <a href=#insertion-mode>insertion mode</a> in HTML content.</li>
</ol></dd>
@@ -91378,8 +91135,8 @@
<h4 id=the-end><span class=secno>12.2.6 </span>The end</h4>
- <p>Once the user agent <dfn id=stop-parsing title="stop parsing">stops parsing</dfn>
- the document, the user agent must run the following steps:</p>
+ <p>Once the user agent <dfn id=stop-parsing title="stop parsing">stops parsing</dfn> the document, the user agent
+ must run the following steps:</p>
<ol><!-- this happens as part of one of the tasks that runs the parser --><li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">interactive</code>"
<!-- this also synchronously fires an event --> and the <a href=#insertion-point>insertion point</a> to
@@ -91437,17 +91194,14 @@
<li>
- <p>If the <code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing
- context</a>, then <a href=#queue-a-task>queue a task</a> to run the
- following substeps:</p>
+ <p>If the <code><a href=#document>Document</a></code> is in a <a href=#browsing-context>browsing context</a>, then <a href=#queue-a-task>queue a
+ task</a> to run the following substeps:</p>
- <ol><li><p>If the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a>
- flag is true, then abort this task (i.e. don't fire the event
- below).</li> <!-- i don't see how this could be, but just to
- be sure... -->
+ <ol><li><p>If the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a> flag is true, then abort this
+ task (i.e. don't fire the event below).</li> <!-- i don't see how this could be, but just
+ to be sure... -->
- <li><p>Set the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a>
- flag to true.</li>
+ <li><p>Set the <code><a href=#document>Document</a></code>'s <a href=#page-showing>page showing</a> flag to true.</li>
<li><p><a href=#concept-event-fire title=concept-event-fire>Fire</a> a <a href=#concept-events-trusted title=concept-events-trusted>trusted</a> event with the name <code title=event-pageshow><a href=#event-pageshow>pageshow</a></code> at the <code><a href=#window>Window</a></code> object of the
<code><a href=#document>Document</a></code>, but with its <code title=dom-event-target><a href=#dom-event-target>target</a></code> set to the
@@ -91457,50 +91211,39 @@
</ol></li>
- <li><p>If the <code><a href=#document>Document</a></code> has any <a href=#pending-application-cache-download-process-tasks>pending
- application cache download process tasks</a>, then <a href=#queue-a-task title="queue a task">queue</a> each such <a href=#concept-task title=concept-task>task</a> in the order they were added to
- the list of <a href=#pending-application-cache-download-process-tasks>pending application cache download process
- tasks</a>, and then empty the list of <a href=#pending-application-cache-download-process-tasks>pending application
- cache download process tasks</a>. The <a href=#task-source>task source</a>
- for these <a href=#concept-task title=concept-task>tasks</a> is the
- <a href=#networking-task-source>networking task source</a>.</li>
+ <li><p>If the <code><a href=#document>Document</a></code> has any <a href=#pending-application-cache-download-process-tasks>pending application cache download process
+ tasks</a>, then <a href=#queue-a-task title="queue a task">queue</a> each such <a href=#concept-task title=concept-task>task</a> in the order they were added to the list of <a href=#pending-application-cache-download-process-tasks>pending
+ application cache download process tasks</a>, and then empty the list of <a href=#pending-application-cache-download-process-tasks>pending
+ application cache download process tasks</a>. The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#networking-task-source>networking task source</a>.</li>
- <li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when
- loaded</a> flag is set, then run the <a href=#printing-steps>printing
- steps</a>.</li>
+ <li><p>If the <code><a href=#document>Document</a></code>'s <a href=#print-when-loaded>print when loaded</a> flag is set, then run the
+ <a href=#printing-steps>printing steps</a>.</li>
- <li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load
- tasks</dfn>.</li>
+ <li><p>The <code><a href=#document>Document</a></code> is now <dfn id=ready-for-post-load-tasks>ready for post-load tasks</dfn>.</li>
- <li><p><a href=#queue-a-task>Queue a task</a> to mark the <code><a href=#document>Document</a></code>
- as <dfn id=completely-loaded>completely loaded</dfn>.</li>
+ <li><p><a href=#queue-a-task>Queue a task</a> to mark the <code><a href=#document>Document</a></code> as <dfn id=completely-loaded>completely
+ loaded</dfn>.</li>
- </ol><p>When the user agent is to <dfn id=abort-a-parser>abort a parser</dfn>, it must run
- the following steps:</p>
+ </ol><p>When the user agent is to <dfn id=abort-a-parser>abort a parser</dfn>, it must run the following steps:</p>
- <ol><li><p>Throw away any pending content in the <a href=#input-stream>input
- stream</a>, and discard any future content that would have been
- added to it.</li>
+ <ol><li><p>Throw away any pending content in the <a href=#input-stream>input stream</a>, and discard any future
+ content that would have been added to it.</li>
- <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">interactive</code>"<!-- this synchronously fires an event
- -->.</li>
+ <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">interactive</code>"<!--
+ this synchronously fires an event -->.</li>
- <li><p>Pop <em>all</em> the nodes off the <a href=#stack-of-open-elements>stack of open
- elements</a>.</li>
+ <li><p>Pop <em>all</em> the nodes off the <a href=#stack-of-open-elements>stack of open elements</a>.</li>
- <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">complete</code>"<!-- this also synchronously fires an
- event -->.</li>
+ <li><p>Set the <a href=#current-document-readiness>current document readiness</a> to "<code title="">complete</code>"<!--
+ this also synchronously fires an event -->.</li>
- <!-- anything else? this is things that happen when you call
- document.open() on a document that's still being parsed, or when
- you navigate a document that's still parsing, or navigate the
- parent of a frame with a document that's still parsing, or the user
- hits "stop". Should the pending scripts be blown away or anything?
- -->
+ <!-- anything else? this is things that happen when you call document.open() on a document that's
+ still being parsed, or when you navigate a document that's still parsing, or navigate the parent
+ of a frame with a document that's still parsing, or the user hits "stop". Should the pending
+ scripts be blown away or anything? -->
- </ol><p>Except where otherwise specified, the <a href=#task-source>task source</a>
- for the <a href=#concept-task title=concept-task>tasks</a> mentioned in this
- section is the <a href=#dom-manipulation-task-source>DOM manipulation task source</a>.</p>
+ </ol><p>Except where otherwise specified, the <a href=#task-source>task source</a> for the <a href=#concept-task title=concept-task>tasks</a> mentioned in this section is the <a href=#dom-manipulation-task-source>DOM manipulation task
+ source</a>.</p>
</div>
@@ -92666,43 +92409,36 @@
<h3 id=introduction-13><span class=secno>14.1 </span>Introduction</h3>
-<!--CLEANUP-->
- <p>In general, user agents are expected to support CSS, and many of
- the suggestions in this section are expressed in CSS terms. User
- agents that use other presentation mechanisms can derive their
- expected behavior by translating from the CSS rules given in this
- section.</p>
+ <p>In general, user agents are expected to support CSS, and many of the suggestions in this
+ section are expressed in CSS terms. User agents that use other presentation mechanisms can derive
+ their expected behavior by translating from the CSS rules given in this section.</p>
- <p>In the absence of style-layer rules to the contrary (e.g. author
- style sheets), user agents are expected to render an element so that
- it conveys to the user the meaning that the element
- <span title=represent>represents</span>, as described by this specification.</p>
+ <p>In the absence of style-layer rules to the contrary (e.g. author style sheets), user agents are
+ expected to render an element so that it conveys to the user the meaning that the element <span title=represent>represents</span>, as described by this specification.</p>
- <p>The suggestions in this section generally assume a visual output
- medium with a resolution of 96dpi or greater, but HTML is intended
- to apply to multiple media (it is a <i>media-independent</i>
- language). User agent implementors are encouraged to adapt the
+ <p>The suggestions in this section generally assume a visual output medium with a resolution of
+ 96dpi or greater, but HTML is intended to apply to multiple media (it is a
+ <i>media-independent</i> language). User agent implementors are encouraged to adapt the
suggestions in this section to their target media.</p>
- <hr><p>An element is <dfn id=being-rendered>being rendered</dfn> if it is <a href=#in-a-document>in a
- <code>Document</code></a>, either its parent node is itself
- <a href=#being-rendered>being rendered</a> or it is the <code><a href=#document>Document</a></code> node,
- and it is not explicitly excluded from the rendering using either:</p>
+ <hr><p>An element is <dfn id=being-rendered>being rendered</dfn> if it is <a href=#in-a-document>in a <code>Document</code></a>,
+ either its parent node is itself <a href=#being-rendered>being rendered</a> or it is the <code><a href=#document>Document</a></code>
+ node, and it is not explicitly excluded from the rendering using either:</p>
+
<ul class=brief><li>the CSS 'display' property's 'none' value, or</li>
<li>the 'visibility' property's 'collapse' value unless it is being treated as equivalent to the 'hidden' value, or</li>
<li>some equivalent in other styling languages.</li>
- </ul><p class=note>Just being off-screen does not mean the element is
- not <a href=#being-rendered>being rendered</a>. The presence of the <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute normally means the
- element is not <a href=#being-rendered>being rendered</a>, though this might be
- overridden by the style sheets.</p>
+ </ul><p class=note>Just being off-screen does not mean the element is not <a href=#being-rendered>being
+ rendered</a>. The presence of the <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute normally
+ means the element is not <a href=#being-rendered>being rendered</a>, though this might be overridden by the style
+ sheets.</p>
- <hr><p>User agents that do not honor author-level CSS style sheets are
- nonetheless expected to act as if they applied the CSS rules given
- in these sections in a manner consistent with this specification and
- the relevant CSS and Unicode specifications. <a href=#refsCSS>[CSS]</a> <a href=#refsUNICODE>[UNICODE]</a> <a href=#refsBIDI>[BIDI]</a></p>
+ <hr><p>User agents that do not honor author-level CSS style sheets are nonetheless expected to act as
+ if they applied the CSS rules given in these sections in a manner consistent with this
+ specification and the relevant CSS and Unicode specifications. <a href=#refsCSS>[CSS]</a> <a href=#refsUNICODE>[UNICODE]</a> <a href=#refsBIDI>[BIDI]</a></p>
- <p class=note>This is especially important for issues relating to
- the 'display', 'unicode-bidi', and 'direction' properties.</p>
+ <p class=note>This is especially important for issues relating to the 'display', 'unicode-bidi',
+ and 'direction' properties.</p>
@@ -92770,10 +92506,9 @@
embed[hidden] { display: inline; height: 0; width: 0; }</pre> <!-- because for legacy reasons it still needs to instantiate the plugin -->
-<!--CLEANUP-->
- <p>The user agent is expected to force the 'display' property of
- <code><a href=#the-noscript-element>noscript</a></code> elements for whom <a href=#concept-n-script title=concept-n-script>scripting is enabled</a> to compute to
- 'none', irrespective of CSS rules.</p>
+ <p>The user agent is expected to force the 'display' property of <code><a href=#the-noscript-element>noscript</a></code> elements
+ for whom <a href=#concept-n-script title=concept-n-script>scripting is enabled</a> to compute to 'none',
+ irrespective of CSS rules.</p>
<p>The user agent is expected to force the 'display' property of <code><a href=#the-input-element>input</a></code> elements whose
<code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#hidden-state-(type=hidden)" title=attr-input-type-hidden>Hidden</a> state to compute to 'none', irrespective of CSS
@@ -94016,13 +93751,12 @@
<td>On the right
<tr><td><code title="">center</code>
<td>In the middle
- </table><!--CLEANUP--><h3 id=replaced-elements><span class=secno>14.4 </span>Replaced elements</h3>
+ </table><h3 id=replaced-elements><span class=secno>14.4 </span>Replaced elements</h3>
<h4 id=embedded-content-2><span class=secno>14.4.1 </span>Embedded content</h4>
- <p>The <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, and
- <code><a href=#the-video-element>video</a></code> elements are expected to be treated as replaced
- elements.</p>
+ <p>The <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, and <code><a href=#the-video-element>video</a></code> elements are expected to be
+ treated as replaced elements.</p>
<p>A <code><a href=#the-canvas-element>canvas</a></code> element that <a href=#represents>represents</a> <a href=#embedded-content>embedded content</a> is
expected to be treated as a replaced element; the contents of such elements are the element's
@@ -94030,56 +93764,44 @@
element. Other <code><a href=#the-canvas-element>canvas</a></code> elements are expected to be treated as ordinary elements in the
rendering model.</p>
- <p>An <code><a href=#the-object-element>object</a></code> element that <a href=#represents>represents</a> an
- image, plugin, or <a href=#nested-browsing-context>nested browsing context</a> is expected
- to be treated as a replaced element. Other <code><a href=#the-object-element>object</a></code>
- elements are expected to be treated as ordinary elements in the
- rendering model.</p>
+ <p>An <code><a href=#the-object-element>object</a></code> element that <a href=#represents>represents</a> an image, plugin, or <a href=#nested-browsing-context>nested
+ browsing context</a> is expected to be treated as a replaced element. Other <code><a href=#the-object-element>object</a></code>
+ elements are expected to be treated as ordinary elements in the rendering model.</p>
- <p>An <code><a href=#the-applet-element>applet</a></code> element that <a href=#represents>represents</a> a
- <a href=#plugin>plugin</a> is expected to be treated as a replaced
- element. Other <code><a href=#the-applet-element>applet</a></code> elements are expected to be
- treated as ordinary elements in the rendering model.</p>
+ <p>An <code><a href=#the-applet-element>applet</a></code> element that <a href=#represents>represents</a> a <a href=#plugin>plugin</a> is expected
+ to be treated as a replaced element. Other <code><a href=#the-applet-element>applet</a></code> elements are expected to be treated
+ as ordinary elements in the rendering model.</p>
- <p>The <code><a href=#the-audio-element>audio</a></code> element, when it is <a href=#expose-a-user-interface-to-the-user title="expose a
- user interface to the user">exposing a user interface</a>, is
- expected to be treated as a replaced element about one line high, as
- wide as is necessary to expose the user agent's user interface
- features. When an <code><a href=#the-audio-element>audio</a></code> element is not <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a user
- interface</a>, the user agent is expected to force its 'display'
- property to compute to 'none', irrespective of CSS rules.</p>
+ <p>The <code><a href=#the-audio-element>audio</a></code> element, when it is <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the
+ user">exposing a user interface</a>, is expected to be treated as a replaced element about one
+ line high, as wide as is necessary to expose the user agent's user interface features. When an
+ <code><a href=#the-audio-element>audio</a></code> element is not <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a
+ user interface</a>, the user agent is expected to force its 'display' property to compute to
+ 'none', irrespective of CSS rules.</p>
- <p>Whether a <code><a href=#the-video-element>video</a></code> element is <a href=#expose-a-user-interface-to-the-user title="expose a
- user interface to the user">exposing a user interface</a> is not
- expected to affect the size of the rendering; controls are expected
- to be overlaid above the page content without causing any layout
- changes, and are expected to disappear when the user does not need
- them.</p>
+ <p>Whether a <code><a href=#the-video-element>video</a></code> element is <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the
+ user">exposing a user interface</a> is not expected to affect the size of the rendering;
+ controls are expected to be overlaid above the page content without causing any layout changes,
+ and are expected to disappear when the user does not need them.</p>
- <p>When a <code><a href=#the-video-element>video</a></code> element represents a poster frame or
- frame of video, the poster frame or frame of video is expected to be
- rendered at the largest size that maintains the aspect ratio of that
- poster frame or frame of video without being taller or wider than
- the <code><a href=#the-video-element>video</a></code> element itself, and is expected to be
- centered in the <code><a href=#the-video-element>video</a></code> element.</p>
+ <p>When a <code><a href=#the-video-element>video</a></code> element represents a poster frame or frame of video, the poster frame
+ or frame of video is expected to be rendered at the largest size that maintains the aspect ratio
+ of that poster frame or frame of video without being taller or wider than the <code><a href=#the-video-element>video</a></code>
+ element itself, and is expected to be centered in the <code><a href=#the-video-element>video</a></code> element.</p>
- <p>Any subtitles or captions are expected to be overlayed directly
- on top of their <code><a href=#the-video-element>video</a></code> element, as defined by the
- relevant rendering rules; for <a href=#webvtt>WebVTT</a>, those are the
- <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
+ <p>Any subtitles or captions are expected to be overlayed directly on top of their
+ <code><a href=#the-video-element>video</a></code> element, as defined by the relevant rendering rules; for <a href=#webvtt>WebVTT</a>,
+ those are the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text tracks</a>. <a href=#refsWEBVTT>[WEBVTT]</a></p>
- <p>When the user agent starts <a href=#expose-a-user-interface-to-the-user title="expose a user interface
- to the user">exposing a user interface</a> for a
- <code><a href=#the-video-element>video</a></code> element, the user agent should run the
- <a href=#rules-for-updating-the-text-track-rendering>rules for updating the text track rendering</a> of each of
- the <a href=#text-track title="text track">text tracks</a> in the
- <code><a href=#the-video-element>video</a></code> element's <a href=#list-of-text-tracks>list of text tracks</a> that
- are <a href=#text-track-showing title="text track showing">showing</a> (e.g., for <a href=#text-track title="text track">text tracks</a> based on <a href=#webvtt>WebVTT</a>,
- the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
+ <p>When the user agent starts <a href=#expose-a-user-interface-to-the-user title="expose a user interface to the user">exposing a user
+ interface</a> for a <code><a href=#the-video-element>video</a></code> element, the user agent should run the <a href=#rules-for-updating-the-text-track-rendering>rules for
+ updating the text track rendering</a> of each of the <a href=#text-track title="text track">text
+ tracks</a> in the <code><a href=#the-video-element>video</a></code> element's <a href=#list-of-text-tracks>list of text tracks</a> that are <a href=#text-track-showing title="text track showing">showing</a> (e.g., for <a href=#text-track title="text track">text tracks</a>
+ based on <a href=#webvtt>WebVTT</a>, the <a href=#rules-for-updating-the-display-of-webvtt-text-tracks>rules for updating the display of WebVTT text
tracks</a>). <a href=#refsWEBVTT>[WEBVTT]</a></p>
- <p class=note>Resizing <code><a href=#the-video-element>video</a></code> and <code><a href=#the-canvas-element>canvas</a></code>
- elements does not interrupt video playback or clear the canvas.</p>
+ <p class=note>Resizing <code><a href=#the-video-element>video</a></code> and <code><a href=#the-canvas-element>canvas</a></code> elements does not interrupt
+ video playback or clear the canvas.</p>
<hr><p>The following CSS rules are expected to apply:</p>
@@ -94092,75 +93814,56 @@
<h4 id=images-0><span class=secno>14.4.2 </span>Images</h4>
- <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element
- when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state
- <a href=#represents>represents</a> an image, it is expected to be treated as a
- replaced element.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image
+ Button</a> state <a href=#represents>represents</a> an image, it is expected to be treated as a replaced
+ element.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element
- when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in
- the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state
- does not <a href=#represents title=represents>represent</a> an image, but the
- element already has intrinsic dimensions (e.g. from the
- <a href=#dimension-attributes>dimension attributes</a> or CSS rules), and either the user
- agent has reason to believe that the image will become <i title=img-available><a href=#img-available>available</a></i><!--input-img-available also-->
- and be rendered in due course or the <code><a href=#document>Document</a></code> is in
- <a href=#quirks-mode>quirks mode</a>, the element is expected to be treated as a
- replaced element whose content is the text that the element
- represents, if any, optionally alongside an icon indicating that the
- image is being obtained. For <code><a href=#the-input-element>input</a></code> elements, the text
- is expected to appear button-like to indicate that the element is a
- <a href=#concept-button title=concept-button>button</a>.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element or an <code><a href=#the-input-element>input</a></code> element when its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image
+ Button</a> state does not <a href=#represents title=represents>represent</a> an image, but the element
+ already has intrinsic dimensions (e.g. from the <a href=#dimension-attributes>dimension attributes</a> or CSS rules),
+ and either the user agent has reason to believe that the image will become <i title=img-available><a href=#img-available>available</a></i><!--input-img-available also--> and be rendered in due course
+ or the <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>, the element is expected to be treated
+ as a replaced element whose content is the text that the element represents, if any, optionally
+ alongside an icon indicating that the image is being obtained. For <code><a href=#the-input-element>input</a></code> elements,
+ the text is expected to appear button-like to indicate that the element is a <a href=#concept-button title=concept-button>button</a>.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> some
- text and the user agent does not expect this to change, the element
- is expected to be treated as a non-replaced phrasing element whose
- content is the text, optionally with an icon indicating that an
- image is missing.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> some text and the user agent does not
+ expect this to change, the element is expected to be treated as a non-replaced phrasing element
+ whose content is the text, optionally with an icon indicating that an image is missing.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> nothing
- and the user agent does not expect this to change, the element is
- expected to not be rendered at all.</p>
+ <p>When an <code><a href=#the-img-element>img</a></code> element <a href=#represents>represents</a> nothing and the user agent does not
+ expect this to change, the element is expected to not be rendered at all.</p>
- <p>When an <code><a href=#the-img-element>img</a></code> element might be a key part of the
- content, but neither the image nor any kind of alternative text is
- available, and the user agent does not expect this to change, the
- element is expected to be treated as a non-replaced phrasing element
- whose content is an icon indicating that an image is missing.</p>
- <!-- there's also a should requirement for this case in the <img>
- section itself -->
+ <p>When an <code><a href=#the-img-element>img</a></code> element might be a key part of the content, but neither the image nor
+ any kind of alternative text is available, and the user agent does not expect this to change, the
+ element is expected to be treated as a non-replaced phrasing element whose content is an icon
+ indicating that an image is missing.</p> <!-- there's also a should requirement for this case in
+ the <img> section itself -->
- <p>When an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state does not
- <a href=#represents title=represents>represent</a> an image and the user
- agent does not expect this to change, the element is expected to be
- treated as a replaced element consisting of a button whose content
- is the element's alternative text. The intrinsic dimensions of the
- button are expected to be about one line in height and whatever
- width is necessary to render the text on one line.</p>
+ <p>When an <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is
+ in the <a href="#image-button-state-(type=image)" title=attr-input-type-image>Image Button</a> state does not <a href=#represents title=represents>represent</a> an image and the user agent does not expect this to change,
+ the element is expected to be treated as a replaced element consisting of a button whose content
+ is the element's alternative text. The intrinsic dimensions of the button are expected to be about
+ one line in height and whatever width is necessary to render the text on one line.</p>
- <p>The icons mentioned above are expected to be relatively small so
- as not to disrupt most text but be easily clickable. In a visual
- environment, for instance, icons could be 16 pixels by 16 pixels
- square, or 1em by 1em if the images are scalable. In an audio
- environment, the icon could be a short bleep. The icons are intended
- to indicate to the user that they can be used to get to whatever
- options the UA provides for images, and, where appropriate, are
- expected to provide access to the context menu that would have come
- up if the user interacted with the actual image.</p>
+ <p>The icons mentioned above are expected to be relatively small so as not to disrupt most text
+ but be easily clickable. In a visual environment, for instance, icons could be 16 pixels by 16
+ pixels square, or 1em by 1em if the images are scalable. In an audio environment, the icon could
+ be a short bleep. The icons are intended to indicate to the user that they can be used to get to
+ whatever options the UA provides for images, and, where appropriate, are expected to provide
+ access to the context menu that would have come up if the user interacted with the actual
+ image.</p>
- <hr><p>All animated images with the same <a href=#absolute-url>absolute URL</a> and
- the same image data are expected to be rendered synchronized to the
- same timeline as a group, with the timeline starting at the time of
- the most recent addition to the group.</p>
+ <hr><p>All animated images with the same <a href=#absolute-url>absolute URL</a> and the same image data are
+ expected to be rendered synchronized to the same timeline as a group, with the timeline starting
+ at the time of the most recent addition to the group.</p>
- <p class=note>In other words, the animation loop of an animated
- image is restarted each time another image with the same
- <a href=#absolute-url>absolute URL</a> and image data begins to animate, e.g.
- after being inserted into the document.</p>
+ <p class=note>In other words, the animation loop of an animated image is restarted each time
+ another image with the same <a href=#absolute-url>absolute URL</a> and image data begins to animate, e.g. after
+ being inserted into the document.</p>
- <hr><p>The following CSS rules are expected to apply when the
- <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks mode</a>:</p>
+ <hr><p>The following CSS rules are expected to apply when the <code><a href=#document>Document</a></code> is in <a href=#quirks-mode>quirks
+ mode</a>:</p>
<pre class=css>@namespace url(http://www.w3.org/1999/xhtml);
@@ -96957,12 +96660,11 @@
<!-- http://www.w3.org/2002/06/registering-mediatype.html -->
-<!--CLEANUP-->
<h3 id=text/html><span class=secno>16.1 </span><dfn><code>text/html</code></dfn></h3>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
@@ -97002,43 +96704,34 @@
<dt>Security considerations:</dt>
<dd>
- <p>Entire novels have been written about the security
- considerations that apply to HTML documents. Many are listed in
- this document, to which the reader is referred for more
- details. Some general concerns bear mentioning here, however:</p>
+ <p>Entire novels have been written about the security considerations that apply to HTML
+ documents. Many are listed in this document, to which the reader is referred for more details.
+ Some general concerns bear mentioning here, however:</p>
- <p>HTML is scripted language, and has a large number of APIs (some
- of which are described in this document). Script can expose the
- user to potential risks of information leakage, credential
- leakage, cross-site scripting attacks, cross-site request
- forgeries, and a host of other problems. While the designs in this
- specification are intended to be safe if implemented correctly, a
- full implementation is a massive undertaking and, as with any
- software, user agents are likely to have security bugs.</p>
+ <p>HTML is scripted language, and has a large number of APIs (some of which are described in
+ this document). Script can expose the user to potential risks of information leakage, credential
+ leakage, cross-site scripting attacks, cross-site request forgeries, and a host of other
+ problems. While the designs in this specification are intended to be safe if implemented
+ correctly, a full implementation is a massive undertaking and, as with any software, user agents
+ are likely to have security bugs.</p>
- <p>Even without scripting, there are specific features in HTML
- which, for historical reasons, are required for broad
- compatibility with legacy content but that expose the user to
- unfortunate security problems. In particular, the <code><a href=#the-img-element>img</a></code>
- element can be used in conjunction with some other features as a
- way to effect a port scan from the user's location on the
- Internet. This can expose local network topologies that the
- attacker would otherwise not be able to determine.</p>
+ <p>Even without scripting, there are specific features in HTML which, for historical reasons,
+ are required for broad compatibility with legacy content but that expose the user to unfortunate
+ security problems. In particular, the <code><a href=#the-img-element>img</a></code> element can be used in conjunction with
+ some other features as a way to effect a port scan from the user's location on the Internet.
+ This can expose local network topologies that the attacker would otherwise not be able to
+ determine.</p>
- <p>HTML relies on a compartmentalization scheme sometimes known as
- the <i>same-origin policy</i>. An <a href=#origin>origin</a> in most
- cases consists of all the pages served from the same host, on the
- same port, using the same protocol.</p>
+ <p>HTML relies on a compartmentalization scheme sometimes known as the <i>same-origin
+ policy</i>. An <a href=#origin>origin</a> in most cases consists of all the pages served from the same
+ host, on the same port, using the same protocol.</p>
- <p>It is critical, therefore, to ensure that any untrusted content
- that forms part of a site be hosted on a different
- <a href=#origin>origin</a> than any sensitive content on that site.
- Untrusted content can easily spoof any other page on the same
- origin, read data from that origin, cause scripts in that origin
- to execute, submit forms to and from that origin even if they are
- protected from cross-site request forgery attacks by unique
- tokens, and make use of any third-party resources exposed to or
- rights granted to that origin.</p>
+ <p>It is critical, therefore, to ensure that any untrusted content that forms part of a site be
+ hosted on a different <a href=#origin>origin</a> than any sensitive content on that site. Untrusted
+ content can easily spoof any other page on the same origin, read data from that origin, cause
+ scripts in that origin to execute, submit forms to and from that origin even if they are
+ protected from cross-site request forgery attacks by unique tokens, and make use of any
+ third-party resources exposed to or rights granted to that origin.</p>
</dd>
<!--REMOVE-TOPIC:Security-->
@@ -97082,17 +96775,16 @@
<dd>Ian Hickson <ian at hixie.ch></dd>
<dt>Change controller:</dt>
<dd>W3C</dd>
- </dl><p>Fragment identifiers used with <code><a href=#text/html>text/html</a></code> resources
- either refer to <a href=#the-indicated-part-of-the-document>the indicated part of the document</a> or
- provide state information for in-page scripts.</p>
+ </dl><p>Fragment identifiers used with <code><a href=#text/html>text/html</a></code> resources either refer to <a href=#the-indicated-part-of-the-document>the
+ indicated part of the document</a> or provide state information for in-page scripts.</p>
<h3 id=multipart/x-mixed-replace><span class=secno>16.2 </span><dfn><code>multipart/x-mixed-replace</code></dfn></h3>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
Modified: source
===================================================================
--- source 2013-03-25 23:18:45 UTC (rev 7770)
+++ source 2013-03-25 23:36:37 UTC (rev 7771)
@@ -6434,15 +6434,14 @@
<h4 id="content-type-sniffing">Determining the type of a resource</h4>
-<!--CLEANUP-->
<p>The <dfn title="Content-Type">Content-Type metadata</dfn> of a resource must be obtained and
- interpreted in a manner consistent with the requirements of the MIME Sniffing specification.
- <a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
+ interpreted in a manner consistent with the requirements of the MIME Sniffing specification. <a
+ href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
<p>The <dfn title="Content-Type sniffing">sniffed type of a resource</dfn> must be found in a
- manner consistent with the requirements given in the MIME Sniffing specification for finding
- the <i>sniffed media type</i> of the relevant sequence of octets. <a
+ manner consistent with the requirements given in the MIME Sniffing specification for finding the
+ <i>sniffed media type</i> of the relevant sequence of octets. <a
href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
<p>The <dfn title="Content-Type sniffing: image">rules for sniffing images specifically</dfn> and
@@ -6450,10 +6449,10 @@
text or binary</dfn> are also defined in the MIME Sniffing specification. Both sets of rules
return a <span>MIME type</span> as their result. <a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
- <p class="warning">It is imperative that the rules in the MIME Sniffing specification be
- followed exactly. When a user agent uses different heuristics for content type detection than the
- server expects, security problems can occur. For more details, see the MIME Sniffing
- specification. <a href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
+ <p class="warning">It is imperative that the rules in the MIME Sniffing specification be followed
+ exactly. When a user agent uses different heuristics for content type detection than the server
+ expects, security problems can occur. For more details, see the MIME Sniffing specification. <a
+ href="#refsMIMESNIFF">[MIMESNIFF]</a></p>
<h4>Extracting character encodings from <code>meta</code> elements</h4>
@@ -14305,9 +14304,9 @@
href="#refsABNF">[ABNF]</a></p>
<pre>style = no-c-start *( c-start no-c-end c-end no-c-start )
-no-c-start = <any string that doesn't contain a substring that matches c-start >
+no-c-start = < any string that doesn't contain a substring that matches c-start >
c-start = "<!--"
-no-c-end = <any string that doesn't contain a substring that matches c-end >
+no-c-end = < any string that doesn't contain a substring that matches c-end >
c-end = "-->"</pre>
<!-- Unmatched comment-like syntax is invalid on a temporary basis,
@@ -15582,17 +15581,15 @@
<!--<li>"<code>application/xhtml+xml</code>"-->
<!--<li>"<code>image/svg+xml</code>"-->
- <!-- the commented-out ones aren't listed here because they
- couldn't sanely be interpreted as a scripting language anyway:
- they're defined to be something else. I just don't want this to
+ <!-- the commented-out ones aren't listed here because they couldn't sanely be interpreted as a
+ scripting language anyway: they're defined to be something else. I just don't want this to
devolve into a list of every non-scripting type in existence. -->
</ul>
- <p class="note">These types are explicitly listed here because they
- are poorly-defined types that are nonetheless likely to be used as
- formats for data blocks, and it would be problematic if they were
- suddenly to be interpreted as script by a user agent.</p>
+ <p class="note">These types are explicitly listed here because they are poorly-defined types that
+ are nonetheless likely to be used as formats for data blocks, and it would be problematic if they
+ were suddenly to be interpreted as script by a user agent.</p>
<!-- a similar paragraph is also present in the <style> section -->
@@ -15609,21 +15606,20 @@
<h5><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
- <p>The <code>textContent</code> of a <code>script</code> element
- must match the <code title="">script</code> production in the
- following ABNF, the character set for which is Unicode. <a
- href="#refsABNF">[ABNF]</a></p>
+ <p>The <code>textContent</code> of a <code>script</code> element must match the <code
+ title="">script</code> production in the following ABNF, the character set for which is Unicode.
+ <a href="#refsABNF">[ABNF]</a></p>
<pre>script = data1 *( escape [ script-start data3 ] "-->" data1 ) [ escape ]
escape = "<!--" data2 *( script-start data3 script-end data2 )
-data1 = <any string that doesn't contain a substring that matches not-data1>
+data1 = < any string that doesn't contain a substring that matches not-data1 >
not-data1 = <!-- script-end / -->"<!--" <!-- the script-end is redundant here since it would close the element -->
-data2 = <any string that doesn't contain a substring that matches not-data2>
+data2 = < any string that doesn't contain a substring that matches not-data2 >
not-data2 = <!-- script-end / -->script-start / "-->" <!-- the script-end is redundant here since it would close the element -->
-data3 = <any string that doesn't contain a substring that matches not-data3>
+data3 = < any string that doesn't contain a substring that matches not-data3 >
not-data3 = script-end / "-->"
script-start = lt s c r i p t tag-end
@@ -15652,21 +15648,17 @@
tag-end =/ %x002F ; U+002F SOLIDUS (/)
tag-end =/ %x003E ; U+003E GREATER-THAN SIGN (>)</pre>
- <p>When a <code>script</code> element contains <span>script
- documentation</span>, there are further restrictions on the contents
- of the element, as described in the section below.</p>
+ <p>When a <code>script</code> element contains <span>script documentation</span>, there are
+ further restrictions on the contents of the element, as described in the section below.</p>
<h5><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
- <p>If a <code>script</code> element's <code
- title="attr-script-src">src</code> attribute is specified, then the
- contents of the <code>script</code> element, if any, must be such
- that the value of the <code title="dom-script-text">text</code> IDL
- attribute, which is derived from the element's contents, matches the
- <code title="">documentation</code> production in the following
- ABNF, the character set for which is Unicode. <a
- href="#refsABNF">[ABNF]</a></p>
+ <p>If a <code>script</code> element's <code title="attr-script-src">src</code> attribute is
+ specified, then the contents of the <code>script</code> element, if any, must be such that the
+ value of the <code title="dom-script-text">text</code> IDL attribute, which is derived from the
+ element's contents, matches the <code title="">documentation</code> production in the following
+ ABNF, the character set for which is Unicode. <a href="#refsABNF">[ABNF]</a></p>
<pre>documentation = *( *( space / tab / comment ) [ line-comment ] newline )
comment = slash star *( not-star / star not-slash ) 1*star slash
@@ -15685,21 +15677,18 @@
not-slash = %x0000-002E / %x0030-10FFFF
; a <span>Unicode character</span> other than U+002F SOLIDUS (/)</pre>
- <p class="note">This corresponds to putting the contents of the
- element in JavaScript comments.</p>
+ <p class="note">This corresponds to putting the contents of the element in JavaScript
+ comments.</p>
- <p class="note">This requirement is in addition to the earlier
- restrictions on the syntax of contents of <code>script</code>
- elements.</p>
+ <p class="note">This requirement is in addition to the earlier restrictions on the syntax of
+ contents of <code>script</code> elements.</p>
<div class="example">
- <p>This allows authors to include documentation, such as license
- information or API information, inside their documents while still
- referring to external script files. The syntax is constrained so
- that authors don't accidentally include what looks like valid
- script while also providing a <code
- title="attr-script-src">src</code> attribute.</p>
+ <p>This allows authors to include documentation, such as license information or API information,
+ inside their documents while still referring to external script files. The syntax is constrained
+ so that authors don't accidentally include what looks like valid script while also providing a
+ <code title="attr-script-src">src</code> attribute.</p>
<pre><script src="cool-effects.js">
// create new instances using:
@@ -27502,19 +27491,16 @@
<!-- could define how to sniff for an image here -->
- <li><p>If an image is thus obtained, the <span>poster frame</span>
- is that image. Otherwise, there is no <span>poster
- frame</span>.</p></li>
+ <li><p>If an image is thus obtained, the <span>poster frame</span> is that image. Otherwise,
+ there is no <span>poster frame</span>.</p></li>
</ol>
</div>
- <p class="note">The image given by the <code
- title="attr-video-poster">poster</code> attribute, the <i>poster
- frame</i>, is intended to be a representative frame of the video
- (typically one of the first non-blank frames) that gives the user an
- idea of what the video is like.</p>
+ <p class="note">The image given by the <code title="attr-video-poster">poster</code> attribute,
+ the <i>poster frame</i>, is intended to be a representative frame of the video (typically one of
+ the first non-blank frames) that gives the user an idea of what the video is like.</p>
<div class="impl">
@@ -27564,9 +27550,8 @@
</dl>
- <p class="note">Which frame in a video stream corresponds to a
- particular playback position is defined by the video stream's
- format.</p>
+ <p class="note">Which frame in a video stream corresponds to a particular playback position is
+ defined by the video stream's format.</p>
<p>The <code>video</code> element also <span>represents</span> any <span title="text track
cue">text track cues</span> whose <span>text track cue active flag</span> is set and whose
@@ -27576,29 +27561,23 @@
<p>Any audio associated with the <span>media resource</span> must, if played, be played
synchronized with the <span>current playback position</span>, at the element's <span>effective
media volume</span>.</p>
-<!--CLEANUP-->
- <p>In addition to the above, the user agent may provide messages to
- the user (such as "buffering", "no video loaded", "error", or more
- detailed information) by overlaying text or icons on the video or
- other areas of the element's playback area, or in another
- appropriate manner.</p>
+ <p>In addition to the above, the user agent may provide messages to the user (such as "buffering",
+ "no video loaded", "error", or more detailed information) by overlaying text or icons on the video
+ or other areas of the element's playback area, or in another appropriate manner.</p>
- <p>User agents that cannot render the video may instead make the
- element <span title="represents">represent</span> a link to an
- external video playback utility or to the video data itself.</p>
+ <p>User agents that cannot render the video may instead make the element <span
+ title="represents">represent</span> a link to an external video playback utility or to the video
+ data itself.</p>
- <p>When a <code>video</code> element's <span>media resource</span>
- has a video channel, the element <span>provides a paint
- source</span> whose width is the <span>media resource</span>'s <span
- title="concept-video-intrinsic-width">intrinsic width</span>, whose
- height is the <span>media resource</span>'s <span
- title="concept-video-intrinsic-height">intrinsic height</span>, and
- whose appearance is the frame of video corresponding to the <span
- title="current playback position">current playback position</span>,
- if that is available, or else (e.g. when the video is seeking or
- buffering) its previous appearance, if any, or else (e.g. because
- the video is still loading the first frame) blackness.</p>
+ <p>When a <code>video</code> element's <span>media resource</span> has a video channel, the
+ element <span>provides a paint source</span> whose width is the <span>media resource</span>'s
+ <span title="concept-video-intrinsic-width">intrinsic width</span>, whose height is the
+ <span>media resource</span>'s <span title="concept-video-intrinsic-height">intrinsic
+ height</span>, and whose appearance is the frame of video corresponding to the <span
+ title="current playback position">current playback position</span>, if that is available, or else
+ (e.g. when the video is seeking or buffering) its previous appearance, if any, or else (e.g.
+ because the video is still loading the first frame) blackness.</p>
<hr>
@@ -28078,46 +28057,38 @@
</div>
-<!--CLEANUP-->
- <p>The <dfn title="attr-source-media"><code>media</code></dfn>
- attribute gives the intended media type of the <span>media
- resource</span>, to help the user agent determine if this
- <span>media resource</span> is useful to the user before fetching
- it. Its value must be a <span>valid media query</span>.</p>
+ <p>The <dfn title="attr-source-media"><code>media</code></dfn> attribute gives the intended media
+ type of the <span>media resource</span>, to help the user agent determine if this <span>media
+ resource</span> is useful to the user before fetching it. Its value must be a <span>valid media
+ query</span>.</p>
<!-- for similar paragraphs, search for "The default, if the" -->
<p id="source-default-media" class="note">The <span title="concept-media-load-algorithm">resource
- selection algorithm</span> is defined in such a way that when the
- <code title="attr-source-media">media</code> attribute is omitted
- the user agent acts the same as if the value was "<code
- title="">all</code>", i.e. by default the <span>media
- resource</span> is suitable for all media.</p>
+ selection algorithm</span> is defined in such a way that when the <code
+ title="attr-source-media">media</code> attribute is omitted the user agent acts the same as if the
+ value was "<code title="">all</code>", i.e. by default the <span>media resource</span> is suitable
+ for all media.</p>
<div class="impl">
- <p>If a <code>source</code> element is inserted as a child of a
- <span>media element</span> that has no <code
- title="attr-media-src">src</code> attribute and whose <code
- title="dom-media-networkState">networkState</code> has the value
- <code title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, the user
- agent must invoke the <span>media element</span>'s <span
- title="concept-media-load-algorithm">resource selection
+ <p>If a <code>source</code> element is inserted as a child of a <span>media element</span> that
+ has no <code title="attr-media-src">src</code> attribute and whose <code
+ title="dom-media-networkState">networkState</code> has the value <code
+ title="dom-media-NETWORK_EMPTY">NETWORK_EMPTY</code>, the user agent must invoke the <span>media
+ element</span>'s <span title="concept-media-load-algorithm">resource selection
algorithm</span>.</p>
- <p>The IDL attributes <dfn
- title="dom-source-src"><code>src</code></dfn>, <dfn
+ <p>The IDL attributes <dfn title="dom-source-src"><code>src</code></dfn>, <dfn
title="dom-source-type"><code>type</code></dfn>, and <dfn
- title="dom-source-media"><code>media</code></dfn> must
- <span>reflect</span> the respective content attributes of the same
- name.</p>
+ title="dom-source-media"><code>media</code></dfn> must <span>reflect</span> the respective content
+ attributes of the same name.</p>
</div>
<div class="example">
- <p>If the author isn't sure if the user agents will all be able to
- render the media resources provided, the author can listen to the
- <code title="event-error">error</code> event on the last
+ <p>If the author isn't sure if the user agents will all be able to render the media resources
+ provided, the author can listen to the <code title="event-error">error</code> event on the last
<code>source</code> element and trigger fallback behavior:</p>
<pre><script>
@@ -33808,16 +33779,12 @@
<li>
-<!--CLEANUP-->
- <p>Create a new <span>text track</span> corresponding to the new
- object, and set its <span>text track kind</span> to <var
- title="">kind</var>, its <span>text track label</span> to <var
- title="">label</var>, its <span>text track language</span> to <var
- title="">language</var>, its <span>text track readiness
- state</span> to the <span>text track loaded</span> state, its
- <span>text track mode</span> to the <span>text track hidden</span>
- mode, and its <span>text track list of cues</span> to an empty
- list.</p>
+ <p>Create a new <span>text track</span> corresponding to the new object, and set its <span>text
+ track kind</span> to <var title="">kind</var>, its <span>text track label</span> to <var
+ title="">label</var>, its <span>text track language</span> to <var title="">language</var>, its
+ <span>text track readiness state</span> to the <span>text track loaded</span> state, its
+ <span>text track mode</span> to the <span>text track hidden</span> mode, and its <span>text
+ track list of cues</span> to an empty list.</p>
<p>Initially, the <span>text track list of cues</span> is not associated with any <span>rules
for updating the text track rendering</span>. When a <span>text track cue</span> is added to it,
@@ -33827,8 +33794,8 @@
<li>
- <p>Add the new <span>text track</span> to the <span>media
- element</span>'s <span>list of text tracks</span>.</p>
+ <p>Add the new <span>text track</span> to the <span>media element</span>'s <span>list of text
+ tracks</span>.</p>
</li>
@@ -33855,33 +33822,26 @@
<hr>
- <p>The <dfn title="dom-TextTrack-kind"><code>kind</code></dfn>
- attribute must return the <span>text track kind</span> of the
- <span>text track</span> that the <code>TextTrack</code> object
+ <p>The <dfn title="dom-TextTrack-kind"><code>kind</code></dfn> attribute must return the
+ <span>text track kind</span> of the <span>text track</span> that the <code>TextTrack</code> object
represents.</p>
- <p>The <dfn title="dom-TextTrack-label"><code>label</code></dfn>
- attribute must return the <span>text track label</span> of the
- <span>text track</span> that the <code>TextTrack</code> object
- represents.</p>
+ <p>The <dfn title="dom-TextTrack-label"><code>label</code></dfn> attribute must return the
+ <span>text track label</span> of the <span>text track</span> that the <code>TextTrack</code>
+ object represents.</p>
- <p>The <dfn
- title="dom-TextTrack-language"><code>language</code></dfn>
- attribute must return the <span>text track language</span> of the
- <span>text track</span> that the <code>TextTrack</code> object
- represents.</p>
+ <p>The <dfn title="dom-TextTrack-language"><code>language</code></dfn> attribute must return the
+ <span>text track language</span> of the <span>text track</span> that the <code>TextTrack</code>
+ object represents.</p>
<p>The <dfn
title="dom-TextTrack-inBandMetadataTrackDispatchType"><code>inBandMetadataTrackDispatchType</code></dfn>
- attribute must return the <span>text track in-band metadata track
- dispatch type</span> of the <span>text track</span> that the
- <code>TextTrack</code> object represents.</p>
+ attribute must return the <span>text track in-band metadata track dispatch type</span> of the
+ <span>text track</span> that the <code>TextTrack</code> object represents.</p>
- <p>The <dfn title="dom-TextTrack-mode"><code>mode</code></dfn>
- attribute, on getting, must return the string corresponding to the
- <span>text track mode</span> of the <span>text track</span> that the
- <code>TextTrack</code> object represents, as defined by the
- following list:</p>
+ <p>The <dfn title="dom-TextTrack-mode"><code>mode</code></dfn> attribute, on getting, must return
+ the string corresponding to the <span>text track mode</span> of the <span>text track</span> that
+ the <code>TextTrack</code> object represents, as defined by the following list:</p>
<dl>
<dt>"<dfn title="dom-TextTrack-disabled"><code>disabled</code></dfn>"</dt>
@@ -33892,9 +33852,8 @@
<dd>The <span>text track showing</span> mode.</dd>
</dl>
- <p>On setting, if the new value isn't equal to what the attribute
- would currently return, the new value must be processed as
- follows:</p>
+ <p>On setting, if the new value isn't equal to what the attribute would currently return, the new
+ value must be processed as follows:</p>
<dl class="switch">
@@ -33902,9 +33861,8 @@
<dd>
- <p>Set the <span>text track mode</span> of the <span>text
- track</span> that the <code>TextTrack</code> object represents to
- the <span>text track disabled</span> mode.</p>
+ <p>Set the <span>text track mode</span> of the <span>text track</span> that the
+ <code>TextTrack</code> object represents to the <span>text track disabled</span> mode.</p>
</dd>
@@ -33912,9 +33870,8 @@
<dd>
- <p>Set the <span>text track mode</span> of the <span>text
- track</span> that the <code>TextTrack</code> object represents to
- the <span>text track hidden</span> mode.</p>
+ <p>Set the <span>text track mode</span> of the <span>text track</span> that the
+ <code>TextTrack</code> object represents to the <span>text track hidden</span> mode.</p>
</dd>
@@ -33922,9 +33879,8 @@
<dd>
- <p>Set the <span>text track mode</span> of the <span>text
- track</span> that the <code>TextTrack</code> object represents to
- the <span>text track showing</span> mode.</p>
+ <p>Set the <span>text track mode</span> of the <span>text track</span> that the
+ <code>TextTrack</code> object represents to the <span>text track showing</span> mode.</p>
</dd>
@@ -34143,134 +34099,107 @@
<div class="impl">
-<!--CLEANUP-->
- <p>The <dfn title="dom-TextTrackCue-track"><code>track</code></dfn>
- attribute, on getting, must return the <code>TextTrack</code> object
- of the <span>text track</span> in whose <span title="text track list
- of cues">list of cues</span> the <span>text track cue</span> that
- the <code>TextTrackCue</code> object represents finds itself, if
- any; or null otherwise.</p>
+ <p>The <dfn title="dom-TextTrackCue-track"><code>track</code></dfn> attribute, on getting, must
+ return the <code>TextTrack</code> object of the <span>text track</span> in whose <span title="text
+ track list of cues">list of cues</span> the <span>text track cue</span> that the
+ <code>TextTrackCue</code> object represents finds itself, if any; or null otherwise.</p>
- <p>The <dfn title="dom-TextTrackCue-id"><code>id</code></dfn>
- attribute, on getting, must return the <span>text track cue
- identifier</span> of the <span>text track cue</span> that the
+ <p>The <dfn title="dom-TextTrackCue-id"><code>id</code></dfn> attribute, on getting, must return
+ the <span>text track cue identifier</span> of the <span>text track cue</span> that the
<code>TextTrackCue</code> object represents. On setting, the <span>text track cue
identifier</span> must be set to the new value.</p>
- <p>The <dfn
- title="dom-TextTrackCue-startTime"><code>startTime</code></dfn>
- attribute, on getting, must return the <span>text track cue start
- time</span> of the <span>text track cue</span> that the
- <code>TextTrackCue</code> object represents, in seconds. On setting, the <span>text track cue start
- time</span> must be set to the new value, interpreted in seconds.</p>
+ <p>The <dfn title="dom-TextTrackCue-startTime"><code>startTime</code></dfn> attribute, on getting,
+ must return the <span>text track cue start time</span> of the <span>text track cue</span> that the
+ <code>TextTrackCue</code> object represents, in seconds. On setting, the <span>text track cue
+ start time</span> must be set to the new value, interpreted in seconds.</p>
- <p>The <dfn
- title="dom-TextTrackCue-endTime"><code>endTime</code></dfn>
- attribute, on getting, must return the <span>text track cue end
- time</span> of the <span>text track cue</span> that the
+ <p>The <dfn title="dom-TextTrackCue-endTime"><code>endTime</code></dfn> attribute, on getting,
+ must return the <span>text track cue end time</span> of the <span>text track cue</span> that the
<code>TextTrackCue</code> object represents, in seconds. On setting, the <span>text track cue end
time</span> must be set to the new value, interpreted in seconds.</p>
- <p>The <dfn
- title="dom-TextTrackCue-pauseOnExit"><code>pauseOnExit</code></dfn>
- attribute, on getting, must return true if the <span>text track cue
- pause-on-exit flag</span> of the <span>text track cue</span> that
- the <code>TextTrackCue</code> object represents is set; or false
- otherwise. On setting, the <span>text track cue pause-on-exit
- flag</span> must be set if the new value is true, and must be unset
- otherwise.</p>
+ <p>The <dfn title="dom-TextTrackCue-pauseOnExit"><code>pauseOnExit</code></dfn> attribute, on
+ getting, must return true if the <span>text track cue pause-on-exit flag</span> of the <span>text
+ track cue</span> that the <code>TextTrackCue</code> object represents is set; or false otherwise.
+ On setting, the <span>text track cue pause-on-exit flag</span> must be set if the new value is
+ true, and must be unset otherwise.</p>
</div>
<h6>Text tracks describing chapters</h6>
-<!--CLEANUP-->
- <p>Chapters are segments of a <span>media resource</span> with a
- given title. Chapters can be nested, in the same way that sections
- in a document outline can have subsections.</p>
+ <p>Chapters are segments of a <span>media resource</span> with a given title. Chapters can be
+ nested, in the same way that sections in a document outline can have subsections.</p>
- <p>Each <span>text track cue</span> in a <span>text track</span>
- being used for describing chapters has three key features: the
- <span>text track cue start time</span>, giving the start time of the
- chapter, the <span>text track cue end time</span>, giving the end
- time of the chapter, and the <span>text track cue text</span> giving
- the chapter title.</p>
+ <p>Each <span>text track cue</span> in a <span>text track</span> being used for describing
+ chapters has three key features: the <span>text track cue start time</span>, giving the start time
+ of the chapter, the <span>text track cue end time</span>, giving the end time of the chapter, and
+ the <span>text track cue text</span> giving the chapter title.</p>
<div class="impl">
- <p>The <dfn>rules for constructing the chapter tree from a text
- track</dfn> are as follows. They produce a potentially nested list
- of chapters, each of which have a start time, end time, title, and a
- list of nested chapters. This algorithm discards cues that do not
- correctly nest within each other, or that are out of order.</p>
+ <p>The <dfn>rules for constructing the chapter tree from a text track</dfn> are as follows. They
+ produce a potentially nested list of chapters, each of which have a start time, end time, title,
+ and a list of nested chapters. This algorithm discards cues that do not correctly nest within each
+ other, or that are out of order.</p>
<ol>
- <li><p>Let <var title="">list</var> be a copy of the <span
- title="text track list of cues">list of cues</span> of the
- <span>text track</span> being processed.</p></li>
+ <li><p>Let <var title="">list</var> be a copy of the <span title="text track list of cues">list
+ of cues</span> of the <span>text track</span> being processed.</p></li>
- <li><p>Remove from <var title="">list</var> any <span>text track
- cue</span> whose <span>text track cue end time</span> is before its
- <span>text track cue start time</span>.</p></li>
+ <li><p>Remove from <var title="">list</var> any <span>text track cue</span> whose <span>text
+ track cue end time</span> is before its <span>text track cue start time</span>.</p></li>
- <li><p>Let <var title="">output</var> be an empty list of chapters,
- where a chapter is a record consisting of a start time, an end
- time, a title, and a (potentially empty) list of nested chapters.
- For the purpose of this algorithm, each chapter also has a parent
- chapter.</p></li>
+ <li><p>Let <var title="">output</var> be an empty list of chapters, where a chapter is a record
+ consisting of a start time, an end time, a title, and a (potentially empty) list of nested
+ chapters. For the purpose of this algorithm, each chapter also has a parent chapter.</p></li>
- <li><p>Let <var title="">current chapter</var> be a stand-in
- chapter whose start time is negative infinity, whose end time is
- positive infinity, and whose list of nested chapters is <var
- title="">output</var>. (This is just used to make the algorithm
- easier to describe.)</p></li>
+ <li><p>Let <var title="">current chapter</var> be a stand-in chapter whose start time is negative
+ infinity, whose end time is positive infinity, and whose list of nested chapters is <var
+ title="">output</var>. (This is just used to make the algorithm easier to describe.)</p></li>
<!-- while not empty... -->
- <li><p><i>Loop</i>: If <var title="">list</var> is empty, jump to
- the step labeled <i>end</i>.</p></li>
+ <li><p><i>Loop</i>: If <var title="">list</var> is empty, jump to the step labeled
+ <i>end</i>.</p></li>
<!-- do... -->
- <li><p>Let <var title="">current cue</var> be the first cue in <var
- title="">list</var>, and then remove it from <var
- title="">list</var>.</p></li>
+ <li><p>Let <var title="">current cue</var> be the first cue in <var title="">list</var>, and then
+ remove it from <var title="">list</var>.</p></li>
- <li><p>If <var title="">current cue</var>'s <span>text track cue
- start time</span> is less than the start time of <var
- title="">current chapter</var>, then return to the step labeled
+ <li><p>If <var title="">current cue</var>'s <span>text track cue start time</span> is less than
+ the start time of <var title="">current chapter</var>, then return to the step labeled
<i>loop</i>.</p> <!-- out of order chapter -->
- <li><p>While <var title="">current cue</var>'s <span>text track cue
- start time</span> is greater than or equal to <var title="">current
- chapter</var>'s end time, let <var title="">current chapter</var>
- be <var title="">current chapter</var>'s parent chapter.</p></li>
+ <li><p>While <var title="">current cue</var>'s <span>text track cue start time</span> is greater
+ than or equal to <var title="">current chapter</var>'s end time, let <var title="">current
+ chapter</var> be <var title="">current chapter</var>'s parent chapter.</p></li>
- <li><p>If <var title="">current cue</var>'s <span>text track cue
- end time</span> is greater than the end time of <var
- title="">current chapter</var>, then return to the step labeled
+ <li><p>If <var title="">current cue</var>'s <span>text track cue end time</span> is greater than
+ the end time of <var title="">current chapter</var>, then return to the step labeled
<i>loop</i>.</p> <!-- misnested chapter -->
- <li><p>Create a new chapter <var title="">new chapter</var>, whose
- start time is <var title="">current cue</var>'s <span>text track
- cue start time</span>, whose end time is <var title="">current
- cue</var>'s <span>text track cue end time</span>, whose title is
- <var title="">current cue</var>'s <span>text track cue text</span>
- interpreted according to its <span>rules for rendering the cue in isolation</span>, and whose
- list of nested chapters is empty.</p>
+ <li>
+ <p>Create a new chapter <var title="">new chapter</var>, whose start time is <var
+ title="">current cue</var>'s <span>text track cue start time</span>, whose end time is <var
+ title="">current cue</var>'s <span>text track cue end time</span>, whose title is <var
+ title="">current cue</var>'s <span>text track cue text</span> interpreted according to its
+ <span>rules for rendering the cue in isolation</span>, and whose list of nested chapters is
+ empty.</p>
+
<p class="note">For WebVTT, the <span>rules for rendering the cue in isolation</span> are the
<span>rules for interpreting WebVTT cue text</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
</li>
- <li><p>Append <var title="">new chapter</var> to <var
- title="">current chapter</var>'s list of nested chapters, and let
- <var title="">current chapter</var> be <var title="">new
- chapter</var>'s parent.</p></li>
+ <li><p>Append <var title="">new chapter</var> to <var title="">current chapter</var>'s list of
+ nested chapters, and let <var title="">current chapter</var> be <var title="">new chapter</var>'s
+ parent.</p></li>
- <li><p>Let <var title="">current chapter</var> be <var title="">new
- chapter</var>.</p></li>
+ <li><p>Let <var title="">current chapter</var> be <var title="">new chapter</var>.</p></li>
<li><p>Return to the step labeled <i>loop</i>.</p></li>
<!-- ...end while -->
@@ -34283,11 +34212,10 @@
<div class="example">
- <p>The following snippet of a <span>WebVTT file</span> shows how
- nested chapters can be marked up. The file describes three
- 50-minute chapters, "Astrophysics", "Computational Physics", and
- "General Relativity". The first has three subchapters, the second
- has four, and the third has two. <a href="#refsWEBVTT">[WEBVTT]</a></p>
+ <p>The following snippet of a <span>WebVTT file</span> shows how nested chapters can be marked
+ up. The file describes three 50-minute chapters, "Astrophysics", "Computational Physics", and
+ "General Relativity". The first has three subchapters, the second has four, and the third has
+ two. <a href="#refsWEBVTT">[WEBVTT]</a></p>
<pre>WEBVTT
@@ -34334,11 +34262,9 @@
<h6 id="cue-events">Event definitions</h6>
- <p>The following are the <span>event handlers</span> that (and their
- corresponding <span title="event handler event type">event handler
- event types</span>) must be
- supported, as IDL attributes, by all objects implementing the
- <code>TextTrackList</code> interface:</p>
+ <p>The following are the <span>event handlers</span> that (and their corresponding <span
+ title="event handler event type">event handler event types</span>) must be supported, as IDL
+ attributes, by all objects implementing the <code>TextTrackList</code> interface:</p>
<table>
<thead>
@@ -34348,10 +34274,9 @@
<tr><td><dfn title="handler-TextTrackList-onremovetrack"><code>onremovetrack</code></dfn> <td> <code title="event-removetrack">removetrack</code>
</table>
- <p>The following are the <span>event handlers</span> that (and their
- corresponding <span title="event handler event type">event handler
- event types</span>) must be supported, as IDL attributes, by all
- objects implementing the <code>TextTrack</code> interface:</p>
+ <p>The following are the <span>event handlers</span> that (and their corresponding <span
+ title="event handler event type">event handler event types</span>) must be supported, as IDL
+ attributes, by all objects implementing the <code>TextTrack</code> interface:</p>
<table>
<thead>
@@ -34360,10 +34285,9 @@
<tr><td><dfn title="handler-TextTrack-oncuechange"><code>oncuechange</code></dfn> <td> <code title="event-cuechange">cuechange</code>
</table>
- <p>The following are the <span>event handlers</span> that (and their
- corresponding <span title="event handler event type">event handler
- event types</span>) must be supported, as IDL attributes, by all
- objects implementing the <code>TextTrackCue</code> interface:</p>
+ <p>The following are the <span>event handlers</span> that (and their corresponding <span
+ title="event handler event type">event handler event types</span>) must be supported, as IDL
+ attributes, by all objects implementing the <code>TextTrackCue</code> interface:</p>
<table>
<thead>
@@ -79481,7 +79405,6 @@
<p>Otherwise:</p>
-<!--CLEANUP-->
<p>If the new resource is to be fetched using HTTP GET <span
title="concept-http-equivalent-get">or equivalent</span>, and there are <span title="relevant
application cache">relevant application caches</span> that are identified by a URL with the
@@ -79489,9 +79412,9 @@
excluding entries marked as <span title="concept-appcache-foreign">foreign</span>, and whose
<span title="concept-appcache-mode">mode</span> is <span
title="concept-appcache-mode-fast">fast</span>, and the user agent is not in a mode where it
- will avoid using <span title="application cache">application caches</span> then <span>fetch</span> the resource
- from the <span title="concept-appcache-selection">most appropriate application cache</span> of
- those that match.</p>
+ will avoid using <span title="application cache">application caches</span> then
+ <span>fetch</span> the resource from the <span title="concept-appcache-selection">most
+ appropriate application cache</span> of those that match.</p>
<p class="example">For example, imagine an HTML page with an associated application cache
displaying an image and a form, where the image is also used by several other application
@@ -79569,8 +79492,9 @@
<li>
- <p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an <span>application cache</span>, and was to be fetched
- using HTTP GET <span title="concept-http-equivalent-get">or equivalent</span>, and its URL <span
+ <p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an
+ <span>application cache</span>, and was to be fetched using HTTP GET <span
+ title="concept-http-equivalent-get">or equivalent</span>, and its URL <span
title="concept-appcache-matches-fallback">matches the fallback namespace</span> of one or more
<span title="relevant application cache">relevant application caches</span>, and the <span
title="concept-appcache-selection">most appropriate application cache</span> of those that match
@@ -79606,14 +79530,14 @@
<li>
-<!--CLEANUP--><!--swap-->
- <p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an <span>application cache</span>, and was to be fetched
- using HTTP GET <span title="concept-http-equivalent-get">or equivalent</span>, and
- there are <span title="relevant application cache">relevant application caches</span> that are
- identified by a URL with the <span>same origin</span> as the URL in question, and that have this
- URL as one of their entries, excluding entries marked as <span
- title="concept-appcache-foreign">foreign</span>, and whose <span
- title="concept-appcache-mode">mode</span> is <span
+<!--XXXswap-->
+ <p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an
+ <span>application cache</span>, and was to be fetched using HTTP GET <span
+ title="concept-http-equivalent-get">or equivalent</span>, and there are <span title="relevant
+ application cache">relevant application caches</span> that are identified by a URL with the
+ <span>same origin</span> as the URL in question, and that have this URL as one of their entries,
+ excluding entries marked as <span title="concept-appcache-foreign">foreign</span>, and whose
+ <span title="concept-appcache-mode">mode</span> is <span
title="concept-appcache-mode-prefer-online">prefer-online</span>, and the user didn't cancel the
navigation attempt during the earlier step, and the navigation attempt failed (e.g. the server
returned a 4xx or 5xx status code <span title="concept-http-equivalent-codes">or
@@ -90421,64 +90345,51 @@
<div class="impl">
-<!--CLEANUP-->
- <p>The <dfn
- title="dom-DragEvent-dataTransfer"><code>dataTransfer</code></dfn>
- attribute of the <code>DragEvent</code> interface must return the
- value it was initialized to. When the object is created, this
- attribute must be initialized to null. It represents the context
- information for the event.</p>
+ <p>The <dfn title="dom-DragEvent-dataTransfer"><code>dataTransfer</code></dfn> attribute of the
+ <code>DragEvent</code> interface must return the value it was initialized to. When the object is
+ created, this attribute must be initialized to null. It represents the context information for the
+ event.</p>
</div>
<div class="impl">
- <p>When a user agent is required to <dfn>fire a DND event</dfn>
- named <var title="">e</var> at an element, using a particular
- <span>drag data store</span>, the user agent must run the following
+ <p>When a user agent is required to <dfn>fire a DND event</dfn> named <var title="">e</var> at an
+ element, using a particular <span>drag data store</span>, the user agent must run the following
steps:</p>
<ol>
<li>
- <p>If <var title="">e</var> is <code
- title="event-dragstart">dragstart</code>, set the <span>drag data
- store mode</span> to the <span title="concept-dnd-rw">read/write
+ <p>If <var title="">e</var> is <code title="event-dragstart">dragstart</code>, set the
+ <span>drag data store mode</span> to the <span title="concept-dnd-rw">read/write
mode</span>.</p>
- <p>If <var title="">e</var> is <code
- title="event-drop">drop</code>, set the <span>drag data store
- mode</span> to the <span title="concept-dnd-ro">read-only
- mode</span>.</p>
+ <p>If <var title="">e</var> is <code title="event-drop">drop</code>, set the <span>drag data
+ store mode</span> to the <span title="concept-dnd-ro">read-only mode</span>.</p>
</li>
- <li><p>Let <var title="">dataTransfer</var> be a newly created
- <code>DataTransfer</code> object associated with the given
- <span>drag data store</span>.</p></li>
+ <li><p>Let <var title="">dataTransfer</var> be a newly created <code>DataTransfer</code> object
+ associated with the given <span>drag data store</span>.</p></li>
<li><p id="effectAllowed-initialization">Set the <code
- title="dom-DataTransfer-effectAllowed">effectAllowed</code>
- attribute to the <span>drag data store</span>'s <span>drag data
- store allowed effects state</span>.</p></li>
+ title="dom-DataTransfer-effectAllowed">effectAllowed</code> attribute to the <span>drag data
+ store</span>'s <span>drag data store allowed effects state</span>.</p></li>
<li>
<p id="dropEffect-initialization">Set the <code
- title="dom-DataTransfer-dropEffect">dropEffect</code> attribute to
- "<code title="">none</code>" if <var title="">e</var> is <code
- title="event-dragstart">dragstart</code>, <code
- title="event-drag">drag</code>, <code
- title="event-dragexit">dragexit</code>, or <code
- title="event-dragleave">dragleave</code>; to the value
- corresponding to the <span>current drag operation</span> if <var
- title="">e</var> is <code title="event-drop">drop</code> or <code
- title="event-dragend">dragend</code>; and to a value based on the
- <code title="dom-DataTransfer-effectAllowed">effectAllowed</code>
- attribute's value and to the drag-and-drop source, as given by the
- following table, otherwise (i.e. if <var title="">e</var> is <code
- title="event-dragenter">dragenter</code> or <code
+ title="dom-DataTransfer-dropEffect">dropEffect</code> attribute to "<code title="">none</code>"
+ if <var title="">e</var> is <code title="event-dragstart">dragstart</code>, <code
+ title="event-drag">drag</code>, <code title="event-dragexit">dragexit</code>, or <code
+ title="event-dragleave">dragleave</code>; to the value corresponding to the <span>current drag
+ operation</span> if <var title="">e</var> is <code title="event-drop">drop</code> or <code
+ title="event-dragend">dragend</code>; and to a value based on the <code
+ title="dom-DataTransfer-effectAllowed">effectAllowed</code> attribute's value and to the
+ drag-and-drop source, as given by the following table, otherwise (i.e. if <var title="">e</var>
+ is <code title="event-dragenter">dragenter</code> or <code
title="event-dragover">dragover</code>):</p>
<table>
@@ -90538,19 +90449,15 @@
</tr>
</table>
- <p>Where the table above provides <dfn
- title="concept-platform-dropEffect-override">possibly appropriate
- alternatives</dfn>, user agents may instead use the listed
- alternative values if platform conventions dictate that the user
- has requested those alternate effects.</p>
+ <p>Where the table above provides <dfn title="concept-platform-dropEffect-override">possibly
+ appropriate alternatives</dfn>, user agents may instead use the listed alternative values if
+ platform conventions dictate that the user has requested those alternate effects.</p>
- <p class="example">For example, Windows platform conventions are
- such that dragging while holding the "alt" key indicates a
- preference for linking the data, rather than moving or copying it.
- Therefore, on a Windows system, if "<code title="">link</code>" is
- an option according to the table above while the "alt" key is
- depressed, the user agent could select that instead of "<code
- title="">copy</code>" or "<code title="">move</code>".</p>
+ <p class="example">For example, Windows platform conventions are such that dragging while
+ holding the "alt" key indicates a preference for linking the data, rather than moving or copying
+ it. Therefore, on a Windows system, if "<code title="">link</code>" is an option according to
+ the table above while the "alt" key is depressed, the user agent could select that instead of
+ "<code title="">copy</code>" or "<code title="">move</code>".</p>
</li>
@@ -90558,38 +90465,34 @@
<p>Create a <span title="concept-events-trusted">trusted</span> <code>DragEvent</code> object
and initialize it to have the given name <var title="">e</var>, to bubble, to be cancelable
- unless <var title="">e</var> is <code title="event-dragexit">dragexit</code>, <code title="event-dragleave">dragleave</code>, or <code
- title="event-dragend">dragend</code>, and to have the <code
- title="dom-UIEvent-detail">detail</code> attribute initialized to zero, the mouse and key
- attributes initialized according to the state of the input devices as they would be for user
- interaction events, the <code title="">relatedTarget</code> attribute initialized to null, and
- the <code title="dom-DragEvent-dataTransfer">dataTransfer</code> attribute initialized to <var
- title="">dataTransfer</var>, the <code>DataTransfer</code> object created above.</p>
+ unless <var title="">e</var> is <code title="event-dragexit">dragexit</code>, <code
+ title="event-dragleave">dragleave</code>, or <code title="event-dragend">dragend</code>, and to
+ have the <code title="dom-UIEvent-detail">detail</code> attribute initialized to zero, the mouse
+ and key attributes initialized according to the state of the input devices as they would be for
+ user interaction events, the <code title="">relatedTarget</code> attribute initialized to null,
+ and the <code title="dom-DragEvent-dataTransfer">dataTransfer</code> attribute initialized to
+ <var title="">dataTransfer</var>, the <code>DataTransfer</code> object created above.</p>
<!-- interaction event spec point -->
- <p>If there is no relevant pointing device, the object must have
- its <code title="">screenX</code>, <code title="">screenY</code>,
- <code title="">clientX</code>, <code title="">clientY</code>, and
- <code title="">button</code> attributes set to 0.</p>
+ <p>If there is no relevant pointing device, the object must have its <code
+ title="">screenX</code>, <code title="">screenY</code>, <code title="">clientX</code>, <code
+ title="">clientY</code>, and <code title="">button</code> attributes set to 0.</p>
</li>
<li><p><span title="concept-event-dispatch">Dispatch</span> the newly created
<code>DragEvent</code> object at the specified target element.</p></li>
- <li><p>Set the <span>drag data store allowed effects state</span>
- to the current value of <var title="">dataTransfer</var>'s <code
- title="dom-DataTransfer-effectAllowed">effectAllowed</code>
- attribute. (It can only have changed value if <var title="">e</var>
- is <code title="event-dragstart">dragstart</code>.)</p></li>
+ <li><p>Set the <span>drag data store allowed effects state</span> to the current value of <var
+ title="">dataTransfer</var>'s <code title="dom-DataTransfer-effectAllowed">effectAllowed</code>
+ attribute. (It can only have changed value if <var title="">e</var> is <code
+ title="event-dragstart">dragstart</code>.)</p></li>
<li><p>Set the <span>drag data store mode</span> back to the <span
- title="concept-dnd-p">protected mode</span> if it was changed in
- the first step.</p></li>
+ title="concept-dnd-p">protected mode</span> if it was changed in the first step.</p></li>
- <li><p>Break the association between <var
- title="">dataTransfer</var> and the <span>drag data
+ <li><p>Break the association between <var title="">dataTransfer</var> and the <span>drag data
store</span>.</p></li>
</ol>
@@ -90601,12 +90504,10 @@
<h4>Drag-and-drop processing model</h4>
- <p>When the user attempts to begin a drag operation, the user agent
- must run the following steps. User agents must act as if these steps
- were run even if the drag actually started in another document or
- application and the user agent was not aware that the drag was
- occurring until it intersected with a document under the user agent's
- purview.</p>
+ <p>When the user attempts to begin a drag operation, the user agent must run the following steps.
+ User agents must act as if these steps were run even if the drag actually started in another
+ document or application and the user agent was not aware that the drag was occurring until it
+ intersected with a document under the user agent's purview.</p>
<ol>
@@ -90614,57 +90515,47 @@
<p>Determine what is being dragged, as follows:</p>
- <p>If the drag operation was invoked on a selection, then it is
- the selection that is being dragged.</p>
+ <p>If the drag operation was invoked on a selection, then it is the selection that is being
+ dragged.</p>
- <p>Otherwise, if the drag operation was invoked on a
- <code>Document</code>, it is the first element, going up the
- ancestor chain, starting at the node that the user tried to drag,
- that has the IDL attribute <code
- title="dom-draggable">draggable</code> set to true. If there is no
- such element, then nothing is being dragged; abort these steps,
- the drag-and-drop operation is never started.</p>
+ <p>Otherwise, if the drag operation was invoked on a <code>Document</code>, it is the first
+ element, going up the ancestor chain, starting at the node that the user tried to drag, that has
+ the IDL attribute <code title="dom-draggable">draggable</code> set to true. If there is no such
+ element, then nothing is being dragged; abort these steps, the drag-and-drop operation is never
+ started.</p>
- <p>Otherwise, the drag operation was invoked outside the user
- agent's purview. What is being dragged is defined by the document
- or application where the drag was started.</p>
+ <p>Otherwise, the drag operation was invoked outside the user agent's purview. What is being
+ dragged is defined by the document or application where the drag was started.</p>
- <p class="note"><code>img</code> elements and <code>a</code>
- elements with an <code title="attr-hyperlink-href">href</code>
- attribute have their <code title="dom-draggable">draggable</code>
- attribute set to true by default.</p>
+ <p class="note"><code>img</code> elements and <code>a</code> elements with an <code
+ title="attr-hyperlink-href">href</code> attribute have their <code
+ title="dom-draggable">draggable</code> attribute set to true by default.</p>
</li>
- <li><p><span>Create a drag data store</span>. All the DND events
- fired subsequently by the steps in this section must use this
- <span>drag data store</span>.</p></li>
+ <li><p><span>Create a drag data store</span>. All the DND events fired subsequently by the steps
+ in this section must use this <span>drag data store</span>.</p></li>
<li>
- <p>Establish which DOM node is the <dfn>source node</dfn>, as
- follows:</p>
+ <p>Establish which DOM node is the <dfn>source node</dfn>, as follows:</p>
- <p>If it is a selection that is being dragged, then the
- <span>source node</span> is the <code>Text</code> node that the
- user started the drag on (typically the <code>Text</code> node
- that the user originally clicked). If the user did not specify a
- particular node, for example if the user just told the user agent
- to begin a drag of "the selection", then the <span>source
- node</span> is the first <code>Text</code> node containing a part
- of the selection.</p>
+ <p>If it is a selection that is being dragged, then the <span>source node</span> is the
+ <code>Text</code> node that the user started the drag on (typically the <code>Text</code> node
+ that the user originally clicked). If the user did not specify a particular node, for example if
+ the user just told the user agent to begin a drag of "the selection", then the <span>source
+ node</span> is the first <code>Text</code> node containing a part of the selection.</p>
- <p>Otherwise, if it is an element that is being dragged, then the
- <span>source node</span> is the element that is being dragged.</p>
+ <p>Otherwise, if it is an element that is being dragged, then the <span>source node</span> is
+ the element that is being dragged.</p>
- <p>Otherwise, the <span>source node</span> is part of another
- document or application. When this specification requires that an
- event be dispatched at the <span>source node</span> in this case,
- the user agent must instead follow the platform-specific
- conventions relevant to that situation.</p>
+ <p>Otherwise, the <span>source node</span> is part of another document or application. When this
+ specification requires that an event be dispatched at the <span>source node</span> in this case,
+ the user agent must instead follow the platform-specific conventions relevant to that
+ situation.</p>
- <p class="note">Multiple events are fired on the <span>source
- node</span> during the course of the drag-and-drop operation.</p>
+ <p class="note">Multiple events are fired on the <span>source node</span> during the course of
+ the drag-and-drop operation.</p>
</li>
@@ -90672,21 +90563,19 @@
<p>Determine the <dfn>list of dragged nodes</dfn>, as follows:</p>
- <p>If it is a selection that is being dragged, then the <span>list
- of dragged nodes</span> contains, in <span>tree order</span>,
- every node that is partially or completely included in the
+ <p>If it is a selection that is being dragged, then the <span>list of dragged nodes</span>
+ contains, in <span>tree order</span>, every node that is partially or completely included in the
selection (including all their ancestors).</p>
- <p>Otherwise, the <span>list of dragged nodes</span> contains only
- the <span>source node</span>, if any.</p>
+ <p>Otherwise, the <span>list of dragged nodes</span> contains only the <span>source node</span>,
+ if any.</p>
</li>
<li>
- <p>If it is a selection that is being dragged, then add an item to
- the <span>drag data store item list</span>, with its properties
- set as follows:</p>
+ <p>If it is a selection that is being dragged, then add an item to the <span>drag data store
+ item list</span>, with its properties set as follows:</p>
<dl>
@@ -90701,9 +90590,8 @@
</dl>
- <p>Otherwise, if any files are being dragged, then add one item
- per file to the <span>drag data store item list</span>, with their
- properties set as follows:</p>
+ <p>Otherwise, if any files are being dragged, then add one item per file to the <span>drag data
+ store item list</span>, with their properties set as follows:</p>
<dl>
@@ -90718,23 +90606,19 @@
</dl>
- <p class="note">Dragging files can currently only happen from
- outside a <span>browsing context</span>, for example from a file
- system manager application.</p>
+ <p class="note">Dragging files can currently only happen from outside a <span>browsing
+ context</span>, for example from a file system manager application.</p>
- <p>If the drag initiated outside of the application, the user
- agent must add items to the <span>drag data store item list</span>
- as appropriate for the data being dragged, honoring platform
- conventions where appropriate; however, if the platform
- conventions do not use <span title="MIME type">MIME types</span>
- to label dragged data, the user agent must make a best-effort
- attempt to map the types to MIME types, and, in any case, all the
- <span title="the drag data item type string">drag data item type
- strings</span> must be <span>converted to ASCII
+ <p>If the drag initiated outside of the application, the user agent must add items to the
+ <span>drag data store item list</span> as appropriate for the data being dragged, honoring
+ platform conventions where appropriate; however, if the platform conventions do not use <span
+ title="MIME type">MIME types</span> to label dragged data, the user agent must make a
+ best-effort attempt to map the types to MIME types, and, in any case, all the <span title="the
+ drag data item type string">drag data item type strings</span> must be <span>converted to ASCII
lowercase</span>.</p>
- <p>User agents may also add one or more items representing the
- selection or dragged element(s) in other forms, e.g. as HTML.</p>
+ <p>User agents may also add one or more items representing the selection or dragged element(s)
+ in other forms, e.g. as HTML.</p>
</li>
@@ -90742,11 +90626,9 @@
<li>
- <p>If the <span>list of dragged nodes</span> is not empty, then
- <span title="extracting JSON">extract the microdata from those
- nodes into a JSON form</span>, and add one item to the <span>drag
- data store item list</span>, with its properties set as
- follows:</p>
+ <p>If the <span>list of dragged nodes</span> is not empty, then <span title="extracting
+ JSON">extract the microdata from those nodes into a JSON form</span>, and add one item to the
+ <span>drag data store item list</span>, with its properties set as follows:</p>
<dl>
@@ -90769,31 +90651,28 @@
<ol>
- <li><p>Let <var title="">urls</var> be an empty list of <span
- title="absolute URL">absolute URLs</span>.</p></li>
+ <li><p>Let <var title="">urls</var> be an empty list of <span title="absolute URL">absolute
+ URLs</span>.</p></li>
<li>
- <p>For each <var title="">node</var> in the <span>list of
- dragged nodes</span>:</p>
+ <p>For each <var title="">node</var> in the <span>list of dragged nodes</span>:</p>
<dl>
<dt>If the node is an <code>a</code> element with an <code
title="attr-hyperlink-href">href</code> attribute</dt>
- <dd>Add to <var title="">urls</var> the result of <span
- title="resolve a url">resolving</span> the element's <code
- title="attr-hyperlink-href">href</code> content attribute
- relative to the element.</dd>
+ <dd>Add to <var title="">urls</var> the result of <span title="resolve a
+ url">resolving</span> the element's <code title="attr-hyperlink-href">href</code> content
+ attribute relative to the element.</dd>
- <dt>If the node is an <code>img</code> element with an <code
- title="attr-img-src">src</code> attribute</dt>
+ <dt>If the node is an <code>img</code> element with an <code title="attr-img-src">src</code>
+ attribute</dt>
- <dd>Add to <var title="">urls</var> the result of <span
- title="resolve a url">resolving</span> the element's <code
- title="attr-img-src">src</code> content attribute relative to
- the element.</dd>
+ <dd>Add to <var title="">urls</var> the result of <span title="resolve a
+ url">resolving</span> the element's <code title="attr-img-src">src</code> content attribute
+ relative to the element.</dd>
<!-- DND-v2: more -->
@@ -90801,16 +90680,14 @@
</li>
- <li><p>If <var title="">urls</var> is still empty, abort these
- substeps.</p></li>
+ <li><p>If <var title="">urls</var> is still empty, abort these substeps.</p></li>
- <li><p>Let <var title="">url string</var> be the result of
- concatenating the strings in <var title="">urls</var>, in the
- order they were added, separated by a U+000D CARRIAGE RETURN
- U+000A LINE FEED character pair (CRLF).</p></li>
+ <li><p>Let <var title="">url string</var> be the result of concatenating the strings in <var
+ title="">urls</var>, in the order they were added, separated by a U+000D CARRIAGE RETURN U+000A
+ LINE FEED character pair (CRLF).</p></li>
- <li><p>Add one item to the <span>drag data store item
- list</span>, with its properties set as follows:</p>
+ <li><p>Add one item to the <span>drag data store item list</span>, with its properties set as
+ follows:</p>
<dl>
@@ -90833,51 +90710,43 @@
<li>
- <p>Update the <span>drag data store default feedback</span> as
- appropriate for the user agent (if the user is dragging the
- selection, then the selection would likely be the basis for this
- feedback; if the user is dragging an element, then that element's
- rendering would be used; if the drag began outside the user agent,
- then the platform conventions for determining the drag feedback
- should be used).</p>
+ <p>Update the <span>drag data store default feedback</span> as appropriate for the user agent
+ (if the user is dragging the selection, then the selection would likely be the basis for this
+ feedback; if the user is dragging an element, then that element's rendering would be used; if
+ the drag began outside the user agent, then the platform conventions for determining the drag
+ feedback should be used).</p>
</li>
<li>
- <p><span>Fire a DND event</span> named <code
- title="event-dragstart">dragstart</code> at the <span>source
- node</span>.</p>
+ <p><span>Fire a DND event</span> named <code title="event-dragstart">dragstart</code> at the
+ <span>source node</span>.</p>
- <p>If the event is canceled, then the drag-and-drop operation
- should not occur; abort these steps.</p> <!-- only a should
- because the UA can always allow the user to drag without the page
+ <p>If the event is canceled, then the drag-and-drop operation should not occur; abort these
+ steps.</p> <!-- only a should because the UA can always allow the user to drag without the page
knowing -->
- <p class="note">Since events with no event listeners registered
- are, almost by definition, never canceled, drag-and-drop is always
- available to the user if the author does not specifically prevent
- it.</p>
+ <p class="note">Since events with no event listeners registered are, almost by definition, never
+ canceled, drag-and-drop is always available to the user if the author does not specifically
+ prevent it.</p>
</li>
<li>
- <p><span>Initiate the drag-and-drop operation</span> in a manner
- consistent with platform conventions, and as described below.</p>
+ <p><span>Initiate the drag-and-drop operation</span> in a manner consistent with platform
+ conventions, and as described below.</p>
- <p id="base-dnd-feedback">The drag-and-drop feedback must be
- generated from the first of the following sources that is
- available:</p>
+ <p id="base-dnd-feedback">The drag-and-drop feedback must be generated from the first of the
+ following sources that is available:</p>
<ol>
- <li>The <span>drag data store bitmap</span>, if any. In this
- case, the <span>drag data store hot spot coordinate</span> should
- be used as hints for where to put the cursor relative to the
- resulting image. The values are expressed as distances in CSS
- pixels from the left side and from the top side of the image
- respectively. <a href="#refsCSS">[CSS]</a></li>
+ <li>The <span>drag data store bitmap</span>, if any. In this case, the <span>drag data store
+ hot spot coordinate</span> should be used as hints for where to put the cursor relative to the
+ resulting image. The values are expressed as distances in CSS pixels from the left side and
+ from the top side of the image respectively. <a href="#refsCSS">[CSS]</a></li>
<li>The <span>drag data store default feedback</span>.</li>
@@ -90887,181 +90756,146 @@
</ol>
- <p>From the moment that the user agent is to <dfn>initiate the
- drag-and-drop operation</dfn>, until the end of the drag-and-drop
- operation, device input events (e.g. mouse and keyboard events) must
- be suppressed.</p>
+ <p>From the moment that the user agent is to <dfn>initiate the drag-and-drop operation</dfn>,
+ until the end of the drag-and-drop operation, device input events (e.g. mouse and keyboard events)
+ must be suppressed.</p>
- <p>During the drag operation, the element directly indicated by the
- user as the drop target is called the <dfn>immediate user
- selection</dfn>. (Only elements can be selected by the user; other
- nodes must not be made available as drop targets.) However, the
- <span>immediate user selection</span> is not necessarily the
- <dfn>current target element</dfn>, which is the element currently
- selected for the drop part of the drag-and-drop operation.</p>
+ <p>During the drag operation, the element directly indicated by the user as the drop target is
+ called the <dfn>immediate user selection</dfn>. (Only elements can be selected by the user; other
+ nodes must not be made available as drop targets.) However, the <span>immediate user
+ selection</span> is not necessarily the <dfn>current target element</dfn>, which is the element
+ currently selected for the drop part of the drag-and-drop operation.</p>
- <p>The <span>immediate user selection</span> changes as the user
- selects different elements (either by pointing at them with a
- pointing device, or by selecting them in some other way). The
- <span>current target element</span> changes when the <span>immediate
- user selection</span> changes, based on the results of event
- listeners in the document, as described below.</p>
+ <p>The <span>immediate user selection</span> changes as the user selects different elements
+ (either by pointing at them with a pointing device, or by selecting them in some other way). The
+ <span>current target element</span> changes when the <span>immediate user selection</span>
+ changes, based on the results of event listeners in the document, as described below.</p>
- <p>Both the <span>current target element</span> and the
- <span>immediate user selection</span> can be null, which means no
- target element is selected. They can also both be elements in other
- (DOM-based) documents, or other (non-Web) programs altogether. (For
- example, a user could drag text to a word-processor.) The
- <span>current target element</span> is initially null.</p>
+ <p>Both the <span>current target element</span> and the <span>immediate user selection</span> can
+ be null, which means no target element is selected. They can also both be elements in other
+ (DOM-based) documents, or other (non-Web) programs altogether. (For example, a user could drag
+ text to a word-processor.) The <span>current target element</span> is initially null.</p>
- <p>In addition, there is also a <dfn>current drag operation</dfn>,
- which can take on the values "<code title="">none</code>", "<code
- title="">copy</code>", "<code title="">link</code>", and "<code
- title="">move</code>". Initially, it has the value "<code
- title="">none</code>". It is updated by the user agent as described
- in the steps below.</p>
+ <p>In addition, there is also a <dfn>current drag operation</dfn>, which can take on the values
+ "<code title="">none</code>", "<code title="">copy</code>", "<code title="">link</code>", and
+ "<code title="">move</code>". Initially, it has the value "<code title="">none</code>". It is
+ updated by the user agent as described in the steps below.</p>
- <p>User agents must, as soon as the drag operation is <span
- title="initiate the drag-and-drop operation">initiated</span> and
- every 350ms (±200ms) thereafter for as long as the drag
- operation is ongoing, <span>queue a task</span> to perform the
- following steps in sequence:</p>
+ <p>User agents must, as soon as the drag operation is <span title="initiate the drag-and-drop
+ operation">initiated</span> and every 350ms (±200ms) thereafter for as long as the drag
+ operation is ongoing, <span>queue a task</span> to perform the following steps in sequence:</p>
<ol>
<li>
- <p>If the user agent is still performing the previous iteration of
- the sequence (if any) when the next iteration becomes due, abort
- these steps for this iteration (effectively "skipping missed
- frames" of the drag-and-drop operation).</p>
+ <p>If the user agent is still performing the previous iteration of the sequence (if any) when
+ the next iteration becomes due, abort these steps for this iteration (effectively "skipping
+ missed frames" of the drag-and-drop operation).</p>
</li>
<li>
- <p><span>Fire a DND event</span> named <code
- title="event-drag">drag</code> event at the <span>source
- node</span>. If this event is canceled, the user agent must set
- the <span>current drag operation</span> to "<code
- title="">none</code>" (no drag operation).</p>
+ <p><span>Fire a DND event</span> named <code title="event-drag">drag</code> event at the
+ <span>source node</span>. If this event is canceled, the user agent must set the <span>current
+ drag operation</span> to "<code title="">none</code>" (no drag operation).</p>
</li>
<li>
- <p>If the <code title="event-drag">drag</code> event was not
- canceled and the user has not ended the drag-and-drop operation,
- check the state of the drag-and-drop operation, as follows:</p>
+ <p>If the <code title="event-drag">drag</code> event was not canceled and the user has not ended
+ the drag-and-drop operation, check the state of the drag-and-drop operation, as follows:</p>
<ol>
<li>
- <p>If the user is indicating a different <span>immediate user
- selection</span> than during the last iteration (or if this is
- the first iteration), and if this <span>immediate user
- selection</span> is not the same as the <span>current target
- element</span>, then <span>fire a DND event</span> named <code
- title="event-dragexit">dragexit</code> at the <span>current target element</span>, and then
- update the <span>current target element</span> as follows:</p>
+ <p>If the user is indicating a different <span>immediate user selection</span> than during the
+ last iteration (or if this is the first iteration), and if this <span>immediate user
+ selection</span> is not the same as the <span>current target element</span>, then <span>fire a
+ DND event</span> named <code title="event-dragexit">dragexit</code> at the <span>current
+ target element</span>, and then update the <span>current target element</span> as follows:</p>
<dl class="switch">
<dt>If the new <span>immediate user selection</span> is null</dt>
- <dd><p>Set the <span>current target element</span> to null
- also.</p></dd>
+ <dd><p>Set the <span>current target element</span> to null also.</p></dd>
- <dt>If the new <span>immediate user selection</span> is in a
- non-DOM document or application</dt>
+ <dt>If the new <span>immediate user selection</span> is in a non-DOM document or
+ application</dt>
- <dd><p>Set the <span>current target element</span> to the
- <span>immediate user selection</span>.</p></dd>
+ <dd><p>Set the <span>current target element</span> to the <span>immediate user
+ selection</span>.</p></dd>
<dt>Otherwise</dt>
<dd>
- <p><span>Fire a DND event</span> named <code
- title="event-dragenter">dragenter</code> at the
+ <p><span>Fire a DND event</span> named <code title="event-dragenter">dragenter</code> at the
<span>immediate user selection</span>.</p>
- <p>If the event is canceled, then set the <span>current target
- element</span> to the <span>immediate user
- selection</span>.</p>
+ <p>If the event is canceled, then set the <span>current target element</span> to the
+ <span>immediate user selection</span>.</p>
- <p>Otherwise, run the appropriate step from the following
- list:</p>
+ <p>Otherwise, run the appropriate step from the following list:</p>
<dl class="switch">
- <dt>If the <span>immediate user selection</span> is a text
- field (e.g. <code>textarea</code>, or an <code>input</code>
- element whose <code title="attr-input-type">type</code>
- attribute is in the <span
- title="attr-input-type-text">Text</span> state) or an
- <span>editing host</span> or <span>editable</span> element,
- and the <span>drag data store item list</span> has an item
- with <span>the drag data item type string</span>
- "<code>text/plain</code>" and <span>the drag data item
- kind</span> <i>Plain Unicode string</i></dt>
+ <dt>If the <span>immediate user selection</span> is a text field (e.g.
+ <code>textarea</code>, or an <code>input</code> element whose <code
+ title="attr-input-type">type</code> attribute is in the <span
+ title="attr-input-type-text">Text</span> state) or an <span>editing host</span> or
+ <span>editable</span> element, and the <span>drag data store item list</span> has an item
+ with <span>the drag data item type string</span> "<code>text/plain</code>" and <span>the
+ drag data item kind</span> <i>Plain Unicode string</i></dt>
- <dd><p>Set the <span>current target element</span> to the
- <span>immediate user selection</span> anyway.</p></dd>
+ <dd><p>Set the <span>current target element</span> to the <span>immediate user
+ selection</span> anyway.</p></dd>
- <dt>If the <span>immediate user selection</span> is an element
- with a <code title="attr-dropzone">dropzone</code> attribute
- that <span title="concept-dropzone-match">matches</span> the
- <span>drag data store</span></dt>
+ <dt>If the <span>immediate user selection</span> is an element with a <code
+ title="attr-dropzone">dropzone</code> attribute that <span
+ title="concept-dropzone-match">matches</span> the <span>drag data store</span></dt>
- <dd><p>Set the <span>current target element</span> to the
- <span>immediate user selection</span> anyway.</p></dd>
+ <dd><p>Set the <span>current target element</span> to the <span>immediate user
+ selection</span> anyway.</p></dd>
- <dt>If the <span>immediate user selection</span> is an element
- that itself has an ancestor element with a <code
- title="attr-dropzone">dropzone</code> attribute that <span
- title="concept-dropzone-match">matches</span> the <span>drag
- data store</span></dt>
+ <dt>If the <span>immediate user selection</span> is an element that itself has an ancestor
+ element with a <code title="attr-dropzone">dropzone</code> attribute that <span
+ title="concept-dropzone-match">matches</span> the <span>drag data store</span></dt>
<dd>
- <p>Let <var title="">new target</var> be the nearest
- (deepest) such ancestor element.</p>
+ <p>Let <var title="">new target</var> be the nearest (deepest) such ancestor element.</p>
- <p>If the <span>immediate user selection</span> is <var
- title="">new target</var>, then leave the <span>current
- target element</span> unchanged.</p>
+ <p>If the <span>immediate user selection</span> is <var title="">new target</var>, then
+ leave the <span>current target element</span> unchanged.</p>
<p>Otherwise, <span>fire a DND event</span> named <code
- title="event-dragenter">dragenter</code> at <var
- title="">new target</var>. Then, set the <span>current
- target element</span> to <var title="">new target</var>,
- regardless of whether that event was canceled or not.</p>
+ title="event-dragenter">dragenter</code> at <var title="">new target</var>. Then, set the
+ <span>current target element</span> to <var title="">new target</var>, regardless of
+ whether that event was canceled or not.</p>
</dd>
- <dt>If the <span>immediate user selection</span> is
- <span>the body element</span></dt>
+ <dt>If the <span>immediate user selection</span> is <span>the body element</span></dt>
- <dd><p>Leave the <span>current target element</span>
- unchanged.</p></dd>
+ <dd><p>Leave the <span>current target element</span> unchanged.</p></dd>
<dt>Otherwise</dt>
<dd>
- <p><span>Fire a DND event</span> named <code
- title="event-dragenter">dragenter</code> at <span>the body
- element</span>, if there is one, or at the
- <code>Document</code> object, if not. Then, set the
- <span>current target element</span> to <span>the body
- element</span>, regardless of whether that event was
- canceled or not.</p>
+ <p><span>Fire a DND event</span> named <code title="event-dragenter">dragenter</code> at
+ <span>the body element</span>, if there is one, or at the <code>Document</code> object, if
+ not. Then, set the <span>current target element</span> to <span>the body element</span>,
+ regardless of whether that event was canceled or not.</p>
</dd>
@@ -91075,66 +90909,52 @@
<li>
- <p>If the previous step caused the <span>current target
- element</span> to change, and if the previous target element was
- not null or a part of a non-DOM document, then <span>fire a DND
- event</span> named <code
- title="event-dragleave">dragleave</code> at the previous target
+ <p>If the previous step caused the <span>current target element</span> to change, and if the
+ previous target element was not null or a part of a non-DOM document, then <span>fire a DND
+ event</span> named <code title="event-dragleave">dragleave</code> at the previous target
element.</p>
</li>
<li>
- <p>If the <span>current target element</span> is a DOM element,
- then <span>fire a DND event</span> named <code
- title="event-dragover">dragover</code> at this <span>current
- target element</span>.</p>
+ <p>If the <span>current target element</span> is a DOM element, then <span>fire a DND
+ event</span> named <code title="event-dragover">dragover</code> at this <span>current target
+ element</span>.</p>
- <p>If the <code title="event-dragover">dragover</code> event is
- not canceled, run the appropriate step from the following
- list:</p>
+ <p>If the <code title="event-dragover">dragover</code> event is not canceled, run the
+ appropriate step from the following list:</p>
<dl class="switch">
- <dt>If the <span>current target element</span> is a text field
- (e.g. <code>textarea</code>, or an <code>input</code> element
- whose <code title="attr-input-type">type</code> attribute is in
- the <span title="attr-input-type-text">Text</span> state) or an
- <span>editing host</span> or <span>editable</span> element, and
- the <span>drag data store item list</span> has an item with
- <span>the drag data item type string</span>
- "<code>text/plain</code>" and <span>the drag data item
- kind</span> <i>Plain Unicode string</i></dt>
+ <dt>If the <span>current target element</span> is a text field (e.g. <code>textarea</code>,
+ or an <code>input</code> element whose <code title="attr-input-type">type</code> attribute is
+ in the <span title="attr-input-type-text">Text</span> state) or an <span>editing host</span>
+ or <span>editable</span> element, and the <span>drag data store item list</span> has an item
+ with <span>the drag data item type string</span> "<code>text/plain</code>" and <span>the drag
+ data item kind</span> <i>Plain Unicode string</i></dt>
- <dd><p>Set the <span>current drag operation</span> to either
- "<code title="">copy</code>" or "<code title="">move</code>",
- as appropriate given the platform conventions.</p></dd>
+ <dd><p>Set the <span>current drag operation</span> to either "<code title="">copy</code>" or
+ "<code title="">move</code>", as appropriate given the platform conventions.</p></dd>
- <dt>If the <span>current target element</span> is an element
- with a <code title="attr-dropzone">dropzone</code> attribute
- that <span title="concept-dropzone-match">matches</span> the
- <span>drag data store</span> and <span
- title="concept-dropzone-operation">specifies an
- operation</span></dt>
+ <dt>If the <span>current target element</span> is an element with a <code
+ title="attr-dropzone">dropzone</code> attribute that <span
+ title="concept-dropzone-match">matches</span> the <span>drag data store</span> and <span
+ title="concept-dropzone-operation">specifies an operation</span></dt>
- <dd><p>Set the <span>current drag operation</span> to the
- operation <span
- title="concept-dropzone-operation">specified</span> by the
- <code title="attr-dropzone">dropzone</code> attribute of the
- <span>current target element</span>.</p>
+ <dd><p>Set the <span>current drag operation</span> to the operation <span
+ title="concept-dropzone-operation">specified</span> by the <code
+ title="attr-dropzone">dropzone</code> attribute of the <span>current target
+ element</span>.</p>
- <dt>If the <span>current target element</span> is an element
- with a <code title="attr-dropzone">dropzone</code> attribute
- that <span title="concept-dropzone-match">matches</span> the
- <span>drag data store</span> and does not <span
- title="concept-dropzone-operation">specify an
- operation</span></dt>
+ <dt>If the <span>current target element</span> is an element with a <code
+ title="attr-dropzone">dropzone</code> attribute that <span
+ title="concept-dropzone-match">matches</span> the <span>drag data store</span> and does not
+ <span title="concept-dropzone-operation">specify an operation</span></dt>
- <dd><p>Set the <span>current drag operation</span> to "<code
- title="">copy</code>".</p>
+ <dd><p>Set the <span>current drag operation</span> to "<code title="">copy</code>".</p>
<dt>Otherwise</dt>
@@ -91185,18 +91005,16 @@
<li>
- <p>Otherwise, if the <span>current target element</span> is not
- a DOM element, use platform-specific mechanisms to determine
- what drag operation is being performed (none, copy, link, or
- move), and set the <i>current drag operation</i>
- accordingly.</p>
+ <p>Otherwise, if the <span>current target element</span> is not a DOM element, use
+ platform-specific mechanisms to determine what drag operation is being performed (none, copy,
+ link, or move), and set the <i>current drag operation</i> accordingly.</p>
</li>
<li>
- <p>Update the drag feedback (e.g. the mouse cursor) to match the
- <span>current drag operation</span>, as follows:</p>
+ <p>Update the drag feedback (e.g. the mouse cursor) to match the <span>current drag
+ operation</span>, as follows:</p>
<table>
<thead>
@@ -91231,45 +91049,38 @@
<li>
- <p>Otherwise, if the user ended the drag-and-drop operation (e.g.
- by releasing the mouse button in a mouse-driven drag-and-drop
- interface), or if the <code title="event-drag">drag</code> event
- was canceled, then this will be the last iteration. Run the
- following steps, then stop the drag-and-drop operation:</p>
+ <p>Otherwise, if the user ended the drag-and-drop operation (e.g. by releasing the mouse button
+ in a mouse-driven drag-and-drop interface), or if the <code title="event-drag">drag</code> event
+ was canceled, then this will be the last iteration. Run the following steps, then stop the
+ drag-and-drop operation:</p>
<ol>
<li>
- <p>If the <span>current drag operation</span> is "<code
- title="">none</code>" (no drag operation), or, if the user ended
- the drag-and-drop operation by canceling it (e.g. by hitting the
- <kbd>Escape</kbd> key), or if the <span>current target
- element</span> is null, then the drag operation failed. Run
- these substeps:</p>
+ <p>If the <span>current drag operation</span> is "<code title="">none</code>" (no drag
+ operation), or, if the user ended the drag-and-drop operation by canceling it (e.g. by hitting
+ the <kbd>Escape</kbd> key), or if the <span>current target element</span> is null, then the
+ drag operation failed. Run these substeps:</p>
<ol>
<li><p>Let <var title="">dropped</var> be false.</p></li>
- <li><p>If the <span>current target element</span> is a DOM
- element, <span>fire a DND event</span> named <code
- title="event-dragleave">dragleave</code> at it; otherwise, if
- it is not null, use platform-specific conventions for drag
- cancellation.</p>
+ <li><p>If the <span>current target element</span> is a DOM element, <span>fire a DND
+ event</span> named <code title="event-dragleave">dragleave</code> at it; otherwise, if it is
+ not null, use platform-specific conventions for drag cancellation.</p>
</ol>
- <p>Otherwise, the drag operation might be a success; run these
- substeps:</p>
+ <p>Otherwise, the drag operation might be a success; run these substeps:</p>
<ol>
<li><p>Let <var title="">dropped</var> be true.</p></li>
- <li><p>If the <span>current target element</span> is a DOM
- element, <span>fire a DND event</span> named <code
- title="event-drop">drop</code> at it; otherwise, use
+ <li><p>If the <span>current target element</span> is a DOM element, <span>fire a DND
+ event</span> named <code title="event-drop">drop</code> at it; otherwise, use
platform-specific conventions for indicating a drop.</p></li>
<li>
@@ -91280,38 +91091,31 @@
object as it stood after the event <span title="concept-event-dispatch">dispatch</span>
finished.</p>
- <p>Otherwise, the event is not canceled; perform the event's
- default action, which depends on the exact target as
- follows:</p>
+ <p>Otherwise, the event is not canceled; perform the event's default action, which depends
+ on the exact target as follows:</p>
<dl class="switch">
- <dt>If the <span>current target element</span> is a text
- field (e.g. <code>textarea</code>, or an <code>input</code>
- element whose <code title="attr-input-type">type</code>
- attribute is in the <span
- title="attr-input-type-text">Text</span> state) or an
- <span>editing host</span> or <span>editable</span> element,
- and the <span>drag data store item list</span> has an item
- with <span>the drag data item type string</span>
- "<code>text/plain</code>" and <span>the drag data item
- kind</span> <i>Plain Unicode string</i></dt>
+ <dt>If the <span>current target element</span> is a text field (e.g. <code>textarea</code>,
+ or an <code>input</code> element whose <code title="attr-input-type">type</code> attribute
+ is in the <span title="attr-input-type-text">Text</span> state) or an <span>editing
+ host</span> or <span>editable</span> element, and the <span>drag data store item
+ list</span> has an item with <span>the drag data item type string</span>
+ "<code>text/plain</code>" and <span>the drag data item kind</span> <i>Plain Unicode
+ string</i></dt>
- <dd><p>Insert the actual data of the first item in the
- <span>drag data store item list</span> to have <span
- title="the drag data item type string">a drag data item type
- string</span> of "<code>text/plain</code>" and <span
- title="the drag data item kind">a drag data item kind</span>
- that is <i>Plain Unicode string</i> into the text field or
- <span>editing host</span> or <span>editable</span> element in
- a manner consistent with platform-specific conventions (e.g.
- inserting it at the current mouse cursor position, or
+ <dd><p>Insert the actual data of the first item in the <span>drag data store item
+ list</span> to have <span title="the drag data item type string">a drag data item type
+ string</span> of "<code>text/plain</code>" and <span title="the drag data item kind">a drag
+ data item kind</span> that is <i>Plain Unicode string</i> into the text field or
+ <span>editing host</span> or <span>editable</span> element in a manner consistent with
+ platform-specific conventions (e.g. inserting it at the current mouse cursor position, or
inserting it at the end of the field).</p></dd>
<dt>Otherwise</dt>
- <dd><p>Reset the <span>current drag operation</span> to
- "<code title="">none</code>".</p></dd>
+ <dd><p>Reset the <span>current drag operation</span> to "<code
+ title="">none</code>".</p></dd>
</dl>
@@ -91323,45 +91127,38 @@
<li>
- <p><span>Fire a DND event</span> named <code
- title="event-dragend">dragend</code> at the <span>source
- node</span>.</p>
+ <p><span>Fire a DND event</span> named <code title="event-dragend">dragend</code> at the
+ <span>source node</span>.</p>
</li>
<li>
- <p>Run the appropriate steps from the following list as the
- default action of the <code title="event-dragend">dragend</code>
- event:</p>
+ <p>Run the appropriate steps from the following list as the default action of the <code
+ title="event-dragend">dragend</code> event:</p>
<dl class="switch">
- <dt>If <var title="">dropped</var> is true, the <span>current
- target element</span> is a <i>text field</i> (see below), the
- <span>current drag operation</span> is "<code
- title="">move</code>", and the source of the drag-and-drop
- operation is a selection in the DOM that is entirely contained
- within an <span>editing host</span></dt>
+ <dt>If <var title="">dropped</var> is true, the <span>current target element</span> is a
+ <i>text field</i> (see below), the <span>current drag operation</span> is "<code
+ title="">move</code>", and the source of the drag-and-drop operation is a selection in the
+ DOM that is entirely contained within an <span>editing host</span></dt>
<dd><p><span>Delete the selection</span>.</p></dd>
- <dt>If <var title="">dropped</var> is true, the <span>current
- target element</span> is a <i>text field</i> (see below), the
- <span>current drag operation</span> is "<code
- title="">move</code>", and the source of the drag-and-drop
- operation is a selection in a text field</dt>
+ <dt>If <var title="">dropped</var> is true, the <span>current target element</span> is a
+ <i>text field</i> (see below), the <span>current drag operation</span> is "<code
+ title="">move</code>", and the source of the drag-and-drop operation is a selection in a text
+ field</dt>
- <dd><p>The user agent should delete the dragged selection from
- the relevant text field.</p></dd>
+ <dd><p>The user agent should delete the dragged selection from the relevant text
+ field.</p></dd>
- <dt>If <var title="">dropped</var> is false or if the
- <span>current drag operation</span> is "<code
- title="">none</code>"</dt>
+ <dt>If <var title="">dropped</var> is false or if the <span>current drag operation</span> is
+ "<code title="">none</code>"</dt>
- <dd><p>The drag was canceled. If the platform conventions
- dictate that this be represented to the user (e.g. by animating
- the dragged selection going back to the source of the
+ <dd><p>The drag was canceled. If the platform conventions dictate that this be represented to
+ the user (e.g. by animating the dragged selection going back to the source of the
drag-and-drop operation), then do so.</p></dd>
<dt>Otherwise</dt>
@@ -91370,10 +91167,9 @@
</dl>
- <p>For the purposes of this step, a <i>text field</i> is a
- <code>textarea</code> element or an <code>input</code> element
- whose <code title="attr-input-type">type</code> attribute is in
- one of the
+ <p>For the purposes of this step, a <i>text field</i> is a <code>textarea</code> element or an
+ <code>input</code> element whose <code title="attr-input-type">type</code> attribute is in one
+ of the
<span title="attr-input-type-text">Text</span>,
<span title="attr-input-type-search">Search</span>,
<span title="attr-input-type-tel">Tel</span>,
@@ -91392,17 +91188,14 @@
</ol>
- <p class="note">User agents are encouraged to consider how to react
- to drags near the edge of scrollable regions. For example, if a user
- drags a link to the bottom of the viewport on a long page, it might
- make sense to scroll the page so that the user can drop the link
- lower on the page.</p>
+ <p class="note">User agents are encouraged to consider how to react to drags near the edge of
+ scrollable regions. For example, if a user drags a link to the bottom of the viewport on a long
+ page, it might make sense to scroll the page so that the user can drop the link lower on the
+ page.</p>
- <p class="note">This model is independent of which
- <code>Document</code> object the nodes involved are from; the events
- are fired as described above and the rest of the processing model
- runs as described above, irrespective of how many documents are
- involved in the operation.</p>
+ <p class="note">This model is independent of which <code>Document</code> object the nodes involved
+ are from; the events are fired as described above and the rest of the processing model runs as
+ described above, irrespective of how many documents are involved in the operation.</p>
</div>
@@ -94291,36 +94084,28 @@
</ol>
- <p>When a user agent is to <dfn>fail the connection</dfn>, the user
- agent must <span>queue a task</span> which, if the <code
- title="dom-EventSource-readyState">readyState</code> attribute is
- set to a value other than <code
- title="dom-EventSource-CLOSED">CLOSED</code>, sets the <code
- title="dom-EventSource-readyState">readyState</code> attribute to
- <code title="dom-EventSource-CLOSED">CLOSED</code> and <span
- title="fire a simple event">fires a simple event</span> named <code
- title="event-error">error</code> at the <code>EventSource</code>
- object. <strong>Once the user agent has <span title="fail the
- connection">failed the connection</span>, it does <em>not</em>
- attempt to reconnect!</strong></p>
+ <p>When a user agent is to <dfn>fail the connection</dfn>, the user agent must <span>queue a
+ task</span> which, if the <code title="dom-EventSource-readyState">readyState</code> attribute is
+ set to a value other than <code title="dom-EventSource-CLOSED">CLOSED</code>, sets the <code
+ title="dom-EventSource-readyState">readyState</code> attribute to <code
+ title="dom-EventSource-CLOSED">CLOSED</code> and <span title="fire a simple event">fires a simple
+ event</span> named <code title="event-error">error</code> at the <code>EventSource</code> object.
+ <strong>Once the user agent has <span title="fail the connection">failed the connection</span>, it
+ does <em>not</em> attempt to reconnect!</strong></p>
<hr>
- <p>The <span>task source</span> for any <span
- title="concept-task">tasks</span> that are <span title="queue a
- task">queued</span> by <code>EventSource</code> objects is the
- <dfn>remote event task source</dfn>.</p>
+ <p>The <span>task source</span> for any <span title="concept-task">tasks</span> that are <span
+ title="queue a task">queued</span> by <code>EventSource</code> objects is the <dfn>remote event
+ task source</dfn>.</p>
<h4>Parsing an event stream</h4>
- <p>This event stream format's <span>MIME type</span> is
- <code>text/event-stream</code>.</p>
+ <p>This event stream format's <span>MIME type</span> is <code>text/event-stream</code>.</p>
- <p>The event stream format is as described by the <code
- title="">stream</code> production of the following ABNF, the
- character set for which is Unicode. <a
- href="#refsABNF">[ABNF]</a></p>
+ <p>The event stream format is as described by the <code title="">stream</code> production of the
+ following ABNF, the character set for which is Unicode. <a href="#refsABNF">[ABNF]</a></p>
<pre>stream = [ bom ] *event
event = *( comment / field ) end-of-line
@@ -94339,19 +94124,18 @@
any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
; a <span>Unicode character</span> other than U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)</pre>
- <p>Event streams in this format must always be encoded as
- UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p>
+ <p>Event streams in this format must always be encoded as UTF-8. <a
+ href="#refsRFC3629">[RFC3629]</a></p>
- <p>Lines must be separated by either a U+000D CARRIAGE RETURN U+000A
- LINE FEED (CRLF) character pair, a single U+000A LINE FEED (LF)
- character, or a single U+000D CARRIAGE RETURN (CR) character.</p>
+ <p>Lines must be separated by either a U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF) character
+ pair, a single U+000A LINE FEED (LF) character, or a single U+000D CARRIAGE RETURN (CR)
+ character.</p>
- <p>Since connections established to remote servers for such
- resources are expected to be long-lived, UAs should ensure that
- appropriate buffering is used. In particular, while line buffering
- with lines are defined to end with a single U+000A LINE FEED (LF)
- character is safe, block buffering or line buffering with different
- expected line endings can cause delays in event dispatch.</p>
+ <p>Since connections established to remote servers for such resources are expected to be
+ long-lived, UAs should ensure that appropriate buffering is used. In particular, while line
+ buffering with lines are defined to end with a single U+000A LINE FEED (LF) character is safe,
+ block buffering or line buffering with different expected line endings can cause delays in event
+ dispatch.</p>
<h4 id="event-stream-interpretation">Interpreting an event stream</h4>
@@ -94363,30 +94147,25 @@
<!--START complete-->
</p>
- <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if
- any are present.</p>
+ <p>One leading U+FEFF BYTE ORDER MARK character must be ignored if any are present.</p>
- <p>The stream must then be parsed by reading everything line by
- line, with a U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF)
- character pair, a single U+000A LINE FEED (LF) character not
- preceded by a U+000D CARRIAGE RETURN (CR) character, and a single
- U+000D CARRIAGE RETURN (CR) character not followed by a U+000A LINE
- FEED (LF) character being the ways in which a line can end.</p>
+ <p>The stream must then be parsed by reading everything line by line, with a U+000D CARRIAGE
+ RETURN U+000A LINE FEED (CRLF) character pair, a single U+000A LINE FEED (LF) character not
+ preceded by a U+000D CARRIAGE RETURN (CR) character, and a single U+000D CARRIAGE RETURN (CR)
+ character not followed by a U+000A LINE FEED (LF) character being the ways in which a line can
+ end.</p>
- <p>When a stream is parsed, a <var title="">data</var> buffer, an
- <var title="">event type</var> buffer, and a <var title="">last
- event ID</var> buffer must be associated with it. They must be
+ <p>When a stream is parsed, a <var title="">data</var> buffer, an <var title="">event type</var>
+ buffer, and a <var title="">last event ID</var> buffer must be associated with it. They must be
initialized to the empty string</p>
- <p>Lines must be processed, in the order they are received, as
- follows:</p>
+ <p>Lines must be processed, in the order they are received, as follows:</p>
<dl class="switch">
<dt>If the line is empty (a blank line)</dt>
- <dd><p><a href="#dispatchMessage">Dispatch the event</a>, as
- defined below.</p></dd>
+ <dd><p><a href="#dispatchMessage">Dispatch the event</a>, as defined below.</p></dd>
<dt>If the line starts with a U+003A COLON character (:)</dt>
@@ -94398,18 +94177,15 @@
<dd>
- <p>Collect the characters on the line before the first U+003A
- COLON character (:), and let <var title="">field</var> be that
- string.</p>
+ <p>Collect the characters on the line before the first U+003A COLON character (:), and let <var
+ title="">field</var> be that string.</p>
- <p>Collect the characters on the line after the first U+003A COLON
- character (:), and let <var title="">value</var> be that
- string. If <var title="">value</var> starts with a U+0020
- SPACE character, remove it from <var title="">value</var>.</p>
+ <p>Collect the characters on the line after the first U+003A COLON character (:), and let <var
+ title="">value</var> be that string. If <var title="">value</var> starts with a U+0020 SPACE
+ character, remove it from <var title="">value</var>.</p>
- <p><a href="#processField">Process the field</a> using the steps
- described below, using <var title="">field</var> as the field name
- and <var title="">value</var> as the field value.</p>
+ <p><a href="#processField">Process the field</a> using the steps described below, using <var
+ title="">field</var> as the field name and <var title="">value</var> as the field value.</p>
</dd>
@@ -99968,32 +99744,25 @@
<h5>The stack of open elements</h5>
-<!--CLEANUP-->
- <p>Initially, the <dfn>stack of open elements</dfn> is empty. The
- stack grows downwards; the topmost node on the stack is the first
- one added to the stack, and the bottommost node of the stack is the
- most recently added node in the stack (notwithstanding when the
- stack is manipulated in a random access fashion as part of <a
- href="#adoptionAgency">the handling for misnested tags</a>).</p>
+ <p>Initially, the <dfn>stack of open elements</dfn> is empty. The stack grows downwards; the
+ topmost node on the stack is the first one added to the stack, and the bottommost node of the
+ stack is the most recently added node in the stack (notwithstanding when the stack is manipulated
+ in a random access fashion as part of <a href="#adoptionAgency">the handling for misnested
+ tags</a>).</p>
- <p class="note">The "<span title="insertion mode: before html">before
- html</span>" <span>insertion mode</span> creates the
- <code>html</code> root element node, which is then added to the
- stack.</p>
+ <p class="note">The "<span title="insertion mode: before html">before html</span>" <span>insertion
+ mode</span> creates the <code>html</code> root element node, which is then added to the stack.</p>
- <p class="note">In the <span>fragment case</span>, the <span>stack of open
- elements</span> is initialized to contain an <code>html</code>
- element that is created as part of <span title="html fragment
- parsing algorithm">that algorithm</span>. (The <span>fragment
- case</span> skips the "<span title="insertion mode: before
- html">before html</span>" <span>insertion mode</span>.)</p>
+ <p class="note">In the <span>fragment case</span>, the <span>stack of open elements</span> is
+ initialized to contain an <code>html</code> element that is created as part of <span title="html
+ fragment parsing algorithm">that algorithm</span>. (The <span>fragment case</span> skips the
+ "<span title="insertion mode: before html">before html</span>" <span>insertion mode</span>.)</p>
- <p>The <code>html</code> node, however it is created, is the topmost
- node of the stack. It only gets popped off the stack when the parser
- <span title="stop parsing">finishes</span>.</p>
+ <p>The <code>html</code> node, however it is created, is the topmost node of the stack. It only
+ gets popped off the stack when the parser <span title="stop parsing">finishes</span>.</p>
- <p>The <dfn>current node</dfn> is the bottommost node in this
- <span>stack of open elements</span>.</p>
+ <p>The <dfn>current node</dfn> is the bottommost node in this <span>stack of open
+ elements</span>.</p>
<p>The <dfn>adjusted current node</dfn> is the <i title="concept-frag-parse-context">context</i>
element if the <span>stack of open elements</span> has only one element in it and the parser was
@@ -100018,65 +99787,56 @@
<code>hr</code>, <code>html</code>, <code>iframe</code>, <!-- <code>image</code>, (commented out
because this isn't an element that can end up on the stack, so it doesn't matter) -->
<code>img</code>, <code>input</code>, <code>isindex</code>, <code>li</code>, <code>link</code>,
- <code>listing</code>, <code>main</code>, <code>marquee</code>, <code>menu</code>, <code>menuitem</code>,
- <code>meta</code>, <code>nav</code>, <code>noembed</code>, <code>noframes</code>,
- <code>noscript</code>, <code>object</code>, <code>ol</code>, <code>p</code>, <code>param</code>,
- <code>plaintext</code>, <code>pre</code>, <code>script</code>, <code>section</code>,
- <code>select</code>, <code>source</code>, <code>style</code>, <code>summary</code>,
- <code>table</code>, <code>tbody</code>, <code>td</code>, <code>textarea</code>,
- <code>tfoot</code>, <code>th</code>, <code>thead</code>, <code>title</code>, <code>tr</code>,
- <code>track</code>, <code>ul</code>, <code>wbr</code>, and <code>xmp</code>; MathML's <code
- title="">mi</code>, <code title="">mo</code>, <code title="">mn</code>, <code title="">ms</code>,
- <code title="">mtext</code>, and <code title="">annotation-xml</code>; and SVG's <code
- title="">foreignObject</code>, <code title="">desc</code>, and <code
- title="">title</code>.</p></dd> <!-- we could actually put all non-HTML elements in this list, I
- think -->
+ <code>listing</code>, <code>main</code>, <code>marquee</code>, <code>menu</code>,
+ <code>menuitem</code>, <code>meta</code>, <code>nav</code>, <code>noembed</code>,
+ <code>noframes</code>, <code>noscript</code>, <code>object</code>, <code>ol</code>,
+ <code>p</code>, <code>param</code>, <code>plaintext</code>, <code>pre</code>,
+ <code>script</code>, <code>section</code>, <code>select</code>, <code>source</code>,
+ <code>style</code>, <code>summary</code>, <code>table</code>, <code>tbody</code>,
+ <code>td</code>, <code>textarea</code>, <code>tfoot</code>, <code>th</code>, <code>thead</code>,
+ <code>title</code>, <code>tr</code>, <code>track</code>, <code>ul</code>, <code>wbr</code>, and
+ <code>xmp</code>; MathML's <code title="">mi</code>, <code title="">mo</code>, <code
+ title="">mn</code>, <code title="">ms</code>, <code title="">mtext</code>, and <code
+ title="">annotation-xml</code>; and SVG's <code title="">foreignObject</code>, <code
+ title="">desc</code>, and <code title="">title</code>.</p></dd> <!-- we could actually put all
+ non-HTML elements in this list, I think -->
<dt><dfn>Formatting</dfn></dt>
- <dd><p>The following HTML elements are those that end up in the
- <span>list of active formatting elements</span>: <code>a</code>,
- <code>b</code>, <code>big</code>, <code>code</code>,
- <code>em</code>, <code>font</code>, <code>i</code>,
- <code>nobr</code>, <code>s</code>, <code>small</code>,
- <code>strike</code>, <code>strong</code>, <code>tt</code>, and
+ <dd><p>The following HTML elements are those that end up in the <span>list of active formatting
+ elements</span>: <code>a</code>, <code>b</code>, <code>big</code>, <code>code</code>,
+ <code>em</code>, <code>font</code>, <code>i</code>, <code>nobr</code>, <code>s</code>,
+ <code>small</code>, <code>strike</code>, <code>strong</code>, <code>tt</code>, and
<code>u</code>.</p></dd>
<dt><dfn>Ordinary</dfn></dt>
- <dd><p>All other elements found while parsing an HTML
- document.</p></dd>
+ <dd><p>All other elements found while parsing an HTML document.</p></dd>
</dl>
- <p>The <span>stack of open elements</span> is said to <dfn
- title="has an element in the specific scope">have an element in a
- specific scope</dfn> consisting of a list of element types <var
- title="">list</var> when the following algorithm terminates in a
- match state:</p>
+ <p>The <span>stack of open elements</span> is said to <dfn title="has an element in the specific
+ scope">have an element in a specific scope</dfn> consisting of a list of element types <var
+ title="">list</var> when the following algorithm terminates in a match state:</p>
<ol>
- <li><p>Initialize <var title="">node</var> to be the <span>current
- node</span> (the bottommost node of the stack).</p></li>
+ <li><p>Initialize <var title="">node</var> to be the <span>current node</span> (the bottommost
+ node of the stack).</p></li>
- <li><p>If <var title="">node</var> is the target node, terminate in
- a match state.</p></li>
+ <li><p>If <var title="">node</var> is the target node, terminate in a match state.</p></li>
- <li><p>Otherwise, if <var title="">node</var> is one of the element
- types in <var title="">list</var>, terminate in a failure
- state.</p></li>
+ <li><p>Otherwise, if <var title="">node</var> is one of the element types in <var
+ title="">list</var>, terminate in a failure state.</p></li>
- <li><p>Otherwise, set <var title="">node</var> to the previous
- entry in the <span>stack of open elements</span> and return to step
- 2. (This will never fail, since the loop will always terminate in
- the previous step if the top of the stack — an
- <code>html</code> element — is reached.)</p></li>
+ <li><p>Otherwise, set <var title="">node</var> to the previous entry in the <span>stack of open
+ elements</span> and return to step 2. (This will never fail, since the loop will always terminate
+ in the previous step if the top of the stack — an <code>html</code> element — is
+ reached.)</p></li>
</ol>
- <p>The <span>stack of open elements</span> is said to <dfn
- title="has an element in scope">have an element in scope</dfn> when
- it <span>has an element in the specific scope</span> consisting
- of the following element types:</p>
+ <p>The <span>stack of open elements</span> is said to <dfn title="has an element in scope">have an
+ element in scope</dfn> when it <span>has an element in the specific scope</span> consisting of the
+ following element types:</p>
<ul class="brief">
<li><code>applet</code> in the <span>HTML namespace</span></li>
@@ -100098,9 +99858,8 @@
<li><code title="">title</code> in the <span>SVG namespace</span></li>
</ul>
- <p>The <span>stack of open elements</span> is said to <dfn
- title="has an element in list item scope">have an element in list
- item scope</dfn> when it <span>has an element in the specific
+ <p>The <span>stack of open elements</span> is said to <dfn title="has an element in list item
+ scope">have an element in list item scope</dfn> when it <span>has an element in the specific
scope</span> consisting of the following element types:</p>
<ul class="brief">
@@ -100110,9 +99869,8 @@
<li><code>ul</code> in the <span>HTML namespace</span></li>
</ul>
- <p>The <span>stack of open elements</span> is said to <dfn
- title="has an element in button scope">have an element in button
- scope</dfn> when it <span>has an element in the specific
+ <p>The <span>stack of open elements</span> is said to <dfn title="has an element in button
+ scope">have an element in button scope</dfn> when it <span>has an element in the specific
scope</span> consisting of the following element types:</p>
<ul class="brief">
@@ -100121,9 +99879,8 @@
<li><code>button</code> in the <span>HTML namespace</span></li>
</ul>
- <p>The <span>stack of open elements</span> is said to <dfn
- title="has an element in table scope">have an element in table
- scope</dfn> when it <span>has an element in the specific
+ <p>The <span>stack of open elements</span> is said to <dfn title="has an element in table
+ scope">have an element in table scope</dfn> when it <span>has an element in the specific
scope</span> consisting of the following element types:</p>
<ul class="brief">
@@ -100131,11 +99888,9 @@
<li><code>table</code> in the <span>HTML namespace</span></li>
</ul>
- <p>The <span>stack of open elements</span> is said to <dfn
- title="has an element in select scope">have an element in select
- scope</dfn> when it <span>has an element in the specific
- scope</span> consisting of all element types <em>except</em> the
- following:</p>
+ <p>The <span>stack of open elements</span> is said to <dfn title="has an element in select
+ scope">have an element in select scope</dfn> when it <span>has an element in the specific
+ scope</span> consisting of all element types <em>except</em> the following:</p>
<ul class="brief">
<!--<li><code>select</code> in the <span>HTML namespace</span></li>-->
@@ -100143,16 +99898,13 @@
<li><code>option</code> in the <span>HTML namespace</span></li>
</ul>
- <p>Nothing happens if at any time any of the elements in the
- <span>stack of open elements</span> are moved to a new location in,
- or removed from, the <code>Document</code> tree. In particular, the
- stack is not changed in this situation. This can cause, amongst
- other strange effects, content to be appended to nodes that are no
- longer in the DOM.</p>
+ <p>Nothing happens if at any time any of the elements in the <span>stack of open elements</span>
+ are moved to a new location in, or removed from, the <code>Document</code> tree. In particular,
+ the stack is not changed in this situation. This can cause, amongst other strange effects, content
+ to be appended to nodes that are no longer in the DOM.</p>
- <p class="note">In some cases (namely, when <a
- href="#adoptionAgency">closing misnested formatting elements</a>),
- the stack is manipulated in a random-access fashion.</p>
+ <p class="note">In some cases (namely, when <a href="#adoptionAgency">closing misnested formatting
+ elements</a>), the stack is manipulated in a random-access fashion.</p>
<h5>The list of active formatting elements</h5>
@@ -102822,22 +102574,20 @@
the stack when you hit a limit, or something. -->
<h4><dfn>Tree construction</dfn></h4>
-<!--CLEANUP-->
- <p>The input to the tree construction stage is a sequence of tokens
- from the <span>tokenization</span> stage. The tree construction
- stage is associated with a DOM <code>Document</code> object when a
- parser is created. The "output" of this stage consists of
+ <p>The input to the tree construction stage is a sequence of tokens from the
+ <span>tokenization</span> stage. The tree construction stage is associated with a DOM
+ <code>Document</code> object when a parser is created. The "output" of this stage consists of
dynamically modifying or extending that document's DOM tree.</p>
- <p>This specification does not define when an interactive user agent
- has to render the <code>Document</code> so that it is available to
- the user, or when it has to begin accepting user input.</p>
+ <p>This specification does not define when an interactive user agent has to render the
+ <code>Document</code> so that it is available to the user, or when it has to begin accepting user
+ input.</p>
<hr>
- <p>As each token is emitted from the tokenizer, the user agent must
- follow the appropriate steps from the following list:</p>
+ <p>As each token is emitted from the tokenizer, the user agent must follow the appropriate steps
+ from the following list:</p>
<dl class="switch">
@@ -102850,24 +102600,21 @@
<dt>If the <span>adjusted current node</span> is an <span>HTML integration point</span> and the token is a character token</dt>
<dt>If the token is an end-of-file token</dt>
- <dd>Process the token according to the rules given in the section
- corresponding to the current <span>insertion mode</span> in HTML
- content.</dd>
+ <dd>Process the token according to the rules given in the section corresponding to the current
+ <span>insertion mode</span> in HTML content.</dd>
<dt>Otherwise</dt>
- <dd>Process the token according to the rules given in the section
- for parsing tokens <span title="insertion mode: in foreign
- content">in foreign content</span>.</dd>
+ <dd>Process the token according to the rules given in the section for parsing tokens <span
+ title="insertion mode: in foreign content">in foreign content</span>.</dd>
</dl>
- <p>When the specification says that a user agent is to <dfn>act as
- if a token had been seen</dfn>, it means that the user agent is to
- follow the appropriate steps from the above list.</p>
+ <p>When the specification says that a user agent is to <dfn>act as if a token had been seen</dfn>,
+ it means that the user agent is to follow the appropriate steps from the above list.</p>
- <p>A node is a <dfn>MathML text
- integration point</dfn> if it is one of the following elements:</p>
+ <p>A node is a <dfn>MathML text integration point</dfn> if it is one of the following
+ elements:</p>
<ul class="brief">
<li>An <code title="">mi</code> element in the <span>MathML namespace</span></li>
@@ -102877,8 +102624,7 @@
<li>An <code title="">mtext</code> element in the <span>MathML namespace</span></li>
</ul>
- <p>A node is an <dfn>HTML
- integration point</dfn> if it is one of the following elements:</p>
+ <p>A node is an <dfn>HTML integration point</dfn> if it is one of the following elements:</p>
<ul class="brief">
<li>An <code title="">annotation-xml</code> element in the <span>MathML namespace</span> whose start tag token had an attribute with the name "encoding" whose value was an <span>ASCII case-insensitive</span> match for the string "<code title="">text/html</code>"</li>
@@ -102890,19 +102636,16 @@
<hr>
- <p>When the steps below require the UA to <dfn>insert a
- character</dfn> into a node, if that node has a child immediately
- before where the character is to be inserted, and that child is a
- <code>Text</code> node, then the character must be appended to that
- <code>Text</code> node; otherwise, a new <code>Text</code> node
- whose data is just that character must be inserted in the
+ <p>When the steps below require the UA to <dfn>insert a character</dfn> into a node, if that node
+ has a child immediately before where the character is to be inserted, and that child is a
+ <code>Text</code> node, then the character must be appended to that <code>Text</code> node;
+ otherwise, a new <code>Text</code> node whose data is just that character must be inserted in the
appropriate place.</p>
<div class="example">
- <p>Here are some sample inputs to the parser and the corresponding
- number of <code>Text</code> nodes that they result in, assuming a user agent
- that executes scripts.</p>
+ <p>Here are some sample inputs to the parser and the corresponding number of <code>Text</code>
+ nodes that they result in, assuming a user agent that executes scripts.</p>
<table>
<thead>
@@ -102949,18 +102692,15 @@
<p>However, mutation observers <em>do</em> fire, as required by the DOM specification.</p>
- <p class="note">Not all of the tag names mentioned below are
- conformant tag names in this specification; many are included to
- handle legacy content. They still form part of the algorithm that
- implementations are required to implement to claim conformance.</p>
+ <p class="note">Not all of the tag names mentioned below are conformant tag names in this
+ specification; many are included to handle legacy content. They still form part of the algorithm
+ that implementations are required to implement to claim conformance.</p>
- <p class="note">The algorithm described below places no limit on the
- depth of the DOM tree generated, or on the length of tag names,
- attribute names, attribute values, <code>Text</code> nodes, etc. While
- implementors are encouraged to avoid arbitrary limits, it is
- recognized that <a href="#hardwareLimitations">practical
- concerns</a> will likely force user agents to impose nesting depth
- constraints.</p>
+ <p class="note">The algorithm described below places no limit on the depth of the DOM tree
+ generated, or on the length of tag names, attribute names, attribute values, <code>Text</code>
+ nodes, etc. While implementors are encouraged to avoid arbitrary limits, it is recognized that <a
+ href="#hardwareLimitations">practical concerns</a> will likely force user agents to impose nesting
+ depth constraints.</p>
<h5>Creating and inserting elements</h5>
@@ -106701,7 +106441,6 @@
<h5 id="parsing-main-inforeign">The rules for parsing tokens <dfn title="insertion mode: in foreign content">in foreign content</dfn></h5>
-<!--CLEANUP-->
<p>When the user agent is to apply the rules for parsing tokens in foreign content, the user agent must handle the token as follows:</p>
@@ -106710,27 +106449,25 @@
<dt>A character token that is U+0000 NULL</dt>
<dd>
- <p><span>Parse error</span>. <span title="insert a
- character">Insert a U+FFFD REPLACEMENT CHARACTER character</span>
- into the <span>current node</span>.</p>
+ <p><span>Parse error</span>. <span title="insert a character">Insert a U+FFFD REPLACEMENT
+ CHARACTER character</span> into the <span>current node</span>.</p>
</dd>
- <dt>A character token that is one of U+0009 CHARACTER TABULATION,
- U+000A LINE FEED (LF), U+000C FORM FEED (FF), U+000D CARRIAGE
- RETURN (CR), or U+0020 SPACE</dt>
+ <dt>A character token that is one of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C
+ FORM FEED (FF), U+000D CARRIAGE RETURN (CR), or U+0020 SPACE</dt>
<dd>
- <p><span title="insert a character">Insert the token's
- character</span> into the <span>current node</span>.</p>
+ <p><span title="insert a character">Insert the token's character</span> into the <span>current
+ node</span>.</p>
</dd>
<dt>Any other character token</dt>
<dd>
- <p><span title="insert a character">Insert the token's
- character</span> into the <span>current node</span>.</p>
+ <p><span title="insert a character">Insert the token's character</span> into the <span>current
+ node</span>.</p>
<p>Set the <span>frameset-ok flag</span> to "not ok".</p>
@@ -106738,9 +106475,10 @@
<dt>A comment token</dt>
<dd>
- <p>Append a <code>Comment</code> node to the <span>current
- node</span> with the <code title="">data</code> attribute set to
- the data given in the comment token.</p>
+
+ <p>Append a <code>Comment</code> node to the <span>current node</span> with the <code
+ title="">data</code> attribute set to the data given in the comment token.</p>
+
</dd>
<dt>A DOCTYPE token</dt>
@@ -106748,25 +106486,19 @@
<p><span>Parse error</span>. Ignore the token.</p>
</dd>
- <dt>A start tag whose tag name is one of: <!--"a",--> "b", "big",
- "blockquote", "body"<!--by inspection-->, "br", "center", "code",
- "dd", "div", "dl", "dt"<!-- so that dd and dt can be handled
- uniformly throughout the parser -->, "em", "embed", "h1", "h2",
- "h3", "h4"<!--for completeness-->, "h5", "h6"<!--for
- completeness-->, "head"<!--by inspection-->, "hr", "i", "img",
- "li", "listing"<!-- so that pre and listing can be handled
- uniformly throughout the parser -->, "menu", "meta", "nobr",
- "ol"<!-- so that dl, ul, and ol can be handled uniformly throughout
- the parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small",
- "span", "strong", "strike"<!-- so that s and strike can be handled
- uniformly throughout the parser -->, <!--"style",--> "sub", "sup",
- "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this
- list was determined empirically by studying over 6,000,000,000
- pages that were specifically not XML pages -->
- <dt>A start tag whose tag name is "font", if the token has any
- attributes named "color", "face", or "size"</dt> <!-- the
- attributes here are required so that SVG <font> will go through as
- SVG but legacy <font>s won't -->
+ <dt>A start tag whose tag name is one of: <!--"a",--> "b", "big", "blockquote", "body"<!--by
+ inspection-->, "br", "center", "code", "dd", "div", "dl", "dt"<!-- so that dd and dt can be
+ handled uniformly throughout the parser -->, "em", "embed", "h1", "h2", "h3", "h4"<!--for
+ completeness-->, "h5", "h6"<!--for completeness-->, "head"<!--by inspection-->, "hr", "i", "img",
+ "li", "listing"<!-- so that pre and listing can be handled uniformly throughout the parser -->,
+ "menu", "meta", "nobr", "ol"<!-- so that dl, ul, and ol can be handled uniformly throughout the
+ parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so
+ that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub",
+ "sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined
+ empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A
+ start tag whose tag name is "font", if the token has any attributes named "color", "face", or
+ "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but
+ legacy <font>s won't -->
<dd>
@@ -106781,12 +106513,10 @@
<p>Otherwise:</p>
- <p>Pop an element from the <span>stack of open elements</span>,
- and then keep popping more elements from the <span>stack of open
- elements</span> until the <span>current node</span> is a
- <span>MathML text integration point</span>, an <span>HTML
- integration point</span>, or an element in the <span>HTML
- namespace</span>.</p>
+ <p>Pop an element from the <span>stack of open elements</span>, and then keep popping more
+ elements from the <span>stack of open elements</span> until the <span>current node</span> is a
+ <span>MathML text integration point</span>, an <span>HTML integration point</span>, or an
+ element in the <span>HTML namespace</span>.</p>
<p>Then, reprocess the token.</p>
@@ -106795,17 +106525,14 @@
<dt>Any other start tag</dt>
<dd>
- <p>If the <span>current node</span> is an element in the
- <span>MathML namespace</span>, <span>adjust MathML
- attributes</span> for the token. (This fixes the case of MathML
- attributes that are not all lowercase.)</p>
+ <p>If the <span>current node</span> is an element in the <span>MathML namespace</span>,
+ <span>adjust MathML attributes</span> for the token. (This fixes the case of MathML attributes
+ that are not all lowercase.)</p>
- <p>If the <span>current node</span> is an element in the <span>SVG
- namespace</span>, and the token's tag name is one of the ones in
- the first column of the following table, change the tag name to
- the name given in the corresponding cell in the second
- column. (This fixes the case of SVG elements that are not all
- lowercase.)</p>
+ <p>If the <span>current node</span> is an element in the <span>SVG namespace</span>, and the
+ token's tag name is one of the ones in the first column of the following table, change the tag
+ name to the name given in the corresponding cell in the second column. (This fixes the case of
+ SVG elements that are not all lowercase.)</p>
<table>
<thead>
@@ -106850,20 +106577,18 @@
<tr> <td> <code title="">textpath</code> <td> <code title="">textPath</code>
</table>
- <p>If the <span>current node</span> is an element in the <span>SVG
- namespace</span>, <span>adjust SVG attributes</span> for the
- token. (This fixes the case of SVG attributes that are not all
- lowercase.)</p>
+ <p>If the <span>current node</span> is an element in the <span>SVG namespace</span>,
+ <span>adjust SVG attributes</span> for the token. (This fixes the case of SVG attributes that
+ are not all lowercase.)</p>
- <p><span>Adjust foreign attributes</span> for the token. (This
- fixes the use of namespaced attributes, in particular XLink in
- SVG.)</p>
+ <p><span>Adjust foreign attributes</span> for the token. (This fixes the use of namespaced
+ attributes, in particular XLink in SVG.)</p>
- <p><span>Insert a foreign element</span> for the token, in the
- same namespace as the <span>current node</span>.</p>
+ <p><span>Insert a foreign element</span> for the token, in the same namespace as the
+ <span>current node</span>.</p>
- <p>If the token has its <i>self-closing flag</i> set, then run the
- appropriate steps from the following list:</p>
+ <p>If the token has its <i>self-closing flag</i> set, then run the appropriate steps from the
+ following list:</p>
<dl class="switch">
@@ -106871,9 +106596,8 @@
<dd>
- <p><span title="acknowledge self-closing flag">Acknowledge the
- token's <i>self-closing flag</i></span>, and then act as if an
- end tag with the tag name "script" had been seen.</p>
+ <p><span title="acknowledge self-closing flag">Acknowledge the token's <i>self-closing
+ flag</i></span>, and then act as if an end tag with the tag name "script" had been seen.</p>
</dd>
@@ -106881,9 +106605,8 @@
<dd>
- <p>Pop the <span>current node</span> off the <span>stack of open
- elements</span> and <span title="acknowledge self-closing
- flag">acknowledge the token's <i>self-closing
+ <p>Pop the <span>current node</span> off the <span>stack of open elements</span> and <span
+ title="acknowledge self-closing flag">acknowledge the token's <i>self-closing
flag</i></span>.</p>
</dd>
@@ -106895,36 +106618,29 @@
<dt id="scriptForeignEndTag">An end tag whose tag name is "script", if the <span>current node</span> is a <code title="">script</code> element in the <span>SVG namespace</span></dt>
<dd>
- <p>Pop the <span>current node</span> off the <span>stack of open
- elements</span>.</p>
+ <p>Pop the <span>current node</span> off the <span>stack of open elements</span>.</p>
- <p>Let the <var title="">old insertion point</var> have the
- same value as the current <span>insertion point</span>. Let
- the <span>insertion point</span> be just before the <span>next
+ <p>Let the <var title="">old insertion point</var> have the same value as the current
+ <span>insertion point</span>. Let the <span>insertion point</span> be just before the <span>next
input character</span>.</p>
- <p>Increment the parser's <span>script nesting level</span> by
- one. Set the <span>parser pause flag</span> to true.</p>
+ <p>Increment the parser's <span>script nesting level</span> by one. Set the <span>parser pause
+ flag</span> to true.</p>
- <p><a
- href="http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing">Process
- the <code title="">script</code> element</a> according to the SVG
- rules, if the user agent supports SVG. <a
- href="#refsSVG">[SVG]</a></p>
+ <p><a href="http://www.w3.org/TR/SVGMobile12/script.html#ScriptContentProcessing">Process the
+ <code title="">script</code> element</a> according to the SVG rules, if the user agent supports
+ SVG. <a href="#refsSVG">[SVG]</a></p>
- <p class="note">Even if this causes <span
- title="dom-document-write">new characters to be inserted into the
- tokenizer</span>, the parser will not be executed reentrantly,
- since the <span>parser pause flag</span> is true.</p>
+ <p class="note">Even if this causes <span title="dom-document-write">new characters to be
+ inserted into the tokenizer</span>, the parser will not be executed reentrantly, since the
+ <span>parser pause flag</span> is true.</p>
- <p>Decrement the parser's <span>script nesting level</span> by
- one. If the parser's <span>script nesting level</span> is zero,
- then set the <span>parser pause flag</span> to false.</p>
+ <p>Decrement the parser's <span>script nesting level</span> by one. If the parser's <span>script
+ nesting level</span> is zero, then set the <span>parser pause flag</span> to false.</p>
- <p>Let the <span>insertion point</span> have the value of the <var
- title="">old insertion point</var>. (In other words, restore the
- <span>insertion point</span> to its previous value. This value
- might be the "undefined" value.)</p>
+ <p>Let the <span>insertion point</span> have the value of the <var title="">old insertion
+ point</var>. (In other words, restore the <span>insertion point</span> to its previous value.
+ This value might be the "undefined" value.)</p>
</dd>
@@ -106936,32 +106652,28 @@
<ol>
- <li><p>Initialize <var title="">node</var> to be the <span>current
- node</span> (the bottommost node of the stack).</p></li>
+ <li><p>Initialize <var title="">node</var> to be the <span>current node</span> (the bottommost
+ node of the stack).</p></li>
- <li><p>If <var title="">node</var> is not an element with the
- same tag name as the token, then this is a <span>parse
- error</span>.</p></li>
+ <li><p>If <var title="">node</var> is not an element with the same tag name as the token, then
+ this is a <span>parse error</span>.</p></li>
<li><p><i>Loop</i>: If <var title="">node</var> is the topmost element in the <span>stack of
open elements</span>, abort these steps. (<span>fragment case</span>)</p></li>
- <li><p>If <var title="">node</var>'s tag name,
- <span>converted to ASCII lowercase</span>, is the same as the tag
- name of the token, pop elements from the <span>stack of open
- elements</span> until <var title="">node</var> has been popped
- from the stack, and then abort these steps.</p></li>
+ <li><p>If <var title="">node</var>'s tag name, <span>converted to ASCII lowercase</span>, is
+ the same as the tag name of the token, pop elements from the <span>stack of open
+ elements</span> until <var title="">node</var> has been popped from the stack, and then abort
+ these steps.</p></li>
- <li><p>Set <var title="">node</var> to the previous entry in the
- <span>stack of open elements</span>.</p></li>
+ <li><p>Set <var title="">node</var> to the previous entry in the <span>stack of open
+ elements</span>.</p></li>
- <li><p>If <var title="">node</var> is not an element in the
- <span>HTML namespace</span>, return to the step labeled
- <i>loop</i>.</p></li>
+ <li><p>If <var title="">node</var> is not an element in the <span>HTML namespace</span>, return
+ to the step labeled <i>loop</i>.</p></li>
- <li><p>Otherwise, process the token according to the rules given
- in the section corresponding to the current <span>insertion
- mode</span> in HTML content.</li>
+ <li><p>Otherwise, process the token according to the rules given in the section corresponding
+ to the current <span>insertion mode</span> in HTML content.</li>
</ol>
@@ -106976,8 +106688,8 @@
<h4>The end</h4>
- <p>Once the user agent <dfn title="stop parsing">stops parsing</dfn>
- the document, the user agent must run the following steps:</p>
+ <p>Once the user agent <dfn title="stop parsing">stops parsing</dfn> the document, the user agent
+ must run the following steps:</p>
<ol>
@@ -107049,19 +106761,16 @@
<li>
- <p>If the <code>Document</code> is in a <span>browsing
- context</span>, then <span>queue a task</span> to run the
- following substeps:</p>
+ <p>If the <code>Document</code> is in a <span>browsing context</span>, then <span>queue a
+ task</span> to run the following substeps:</p>
<ol>
- <li><p>If the <code>Document</code>'s <span>page showing</span>
- flag is true, then abort this task (i.e. don't fire the event
- below).</p></li> <!-- i don't see how this could be, but just to
- be sure... -->
+ <li><p>If the <code>Document</code>'s <span>page showing</span> flag is true, then abort this
+ task (i.e. don't fire the event below).</p></li> <!-- i don't see how this could be, but just
+ to be sure... -->
- <li><p>Set the <code>Document</code>'s <span>page showing</span>
- flag to true.</p></li>
+ <li><p>Set the <code>Document</code>'s <span>page showing</span> flag to true.</p></li>
<li><p><span title="concept-event-fire">Fire</span> a <span
title="concept-events-trusted">trusted</span> event with the name <code
@@ -107077,60 +106786,48 @@
</li>
- <li><p>If the <code>Document</code> has any <span>pending
- application cache download process tasks</span>, then <span
- title="queue a task">queue</span> each such <span
- title="concept-task">task</span> in the order they were added to
- the list of <span>pending application cache download process
- tasks</span>, and then empty the list of <span>pending application
- cache download process tasks</span>. The <span>task source</span>
- for these <span title="concept-task">tasks</span> is the
- <span>networking task source</span>.</p></li>
+ <li><p>If the <code>Document</code> has any <span>pending application cache download process
+ tasks</span>, then <span title="queue a task">queue</span> each such <span
+ title="concept-task">task</span> in the order they were added to the list of <span>pending
+ application cache download process tasks</span>, and then empty the list of <span>pending
+ application cache download process tasks</span>. The <span>task source</span> for these <span
+ title="concept-task">tasks</span> is the <span>networking task source</span>.</p></li>
- <li><p>If the <code>Document</code>'s <span>print when
- loaded</span> flag is set, then run the <span>printing
- steps</span>.</p></li>
+ <li><p>If the <code>Document</code>'s <span>print when loaded</span> flag is set, then run the
+ <span>printing steps</span>.</p></li>
- <li><p>The <code>Document</code> is now <dfn>ready for post-load
- tasks</dfn>.</p></li>
+ <li><p>The <code>Document</code> is now <dfn>ready for post-load tasks</dfn>.</p></li>
- <li><p><span>Queue a task</span> to mark the <code>Document</code>
- as <dfn>completely loaded</dfn>.</p></li>
+ <li><p><span>Queue a task</span> to mark the <code>Document</code> as <dfn>completely
+ loaded</dfn>.</p></li>
</ol>
- <p>When the user agent is to <dfn>abort a parser</dfn>, it must run
- the following steps:</p>
+ <p>When the user agent is to <dfn>abort a parser</dfn>, it must run the following steps:</p>
<ol>
- <li><p>Throw away any pending content in the <span>input
- stream</span>, and discard any future content that would have been
- added to it.</p></li>
+ <li><p>Throw away any pending content in the <span>input stream</span>, and discard any future
+ content that would have been added to it.</p></li>
- <li><p>Set the <span>current document readiness</span> to "<code
- title="">interactive</code>"<!-- this synchronously fires an event
- -->.</p></li>
+ <li><p>Set the <span>current document readiness</span> to "<code title="">interactive</code>"<!--
+ this synchronously fires an event -->.</p></li>
- <li><p>Pop <em>all</em> the nodes off the <span>stack of open
- elements</span>.</p></li>
+ <li><p>Pop <em>all</em> the nodes off the <span>stack of open elements</span>.</p></li>
- <li><p>Set the <span>current document readiness</span> to "<code
- title="">complete</code>"<!-- this also synchronously fires an
- event -->.</p></li>
+ <li><p>Set the <span>current document readiness</span> to "<code title="">complete</code>"<!--
+ this also synchronously fires an event -->.</p></li>
- <!-- anything else? this is things that happen when you call
- document.open() on a document that's still being parsed, or when
- you navigate a document that's still parsing, or navigate the
- parent of a frame with a document that's still parsing, or the user
- hits "stop". Should the pending scripts be blown away or anything?
- -->
+ <!-- anything else? this is things that happen when you call document.open() on a document that's
+ still being parsed, or when you navigate a document that's still parsing, or navigate the parent
+ of a frame with a document that's still parsing, or the user hits "stop". Should the pending
+ scripts be blown away or anything? -->
</ol>
- <p>Except where otherwise specified, the <span>task source</span>
- for the <span title="concept-task">tasks</span> mentioned in this
- section is the <span>DOM manipulation task source</span>.</p>
+ <p>Except where otherwise specified, the <span>task source</span> for the <span
+ title="concept-task">tasks</span> mentioned in this section is the <span>DOM manipulation task
+ source</span>.</p>
</div>
@@ -108471,53 +108168,45 @@
<h3>Introduction</h3>
-<!--CLEANUP-->
- <p>In general, user agents are expected to support CSS, and many of
- the suggestions in this section are expressed in CSS terms. User
- agents that use other presentation mechanisms can derive their
- expected behavior by translating from the CSS rules given in this
- section.</p>
+ <p>In general, user agents are expected to support CSS, and many of the suggestions in this
+ section are expressed in CSS terms. User agents that use other presentation mechanisms can derive
+ their expected behavior by translating from the CSS rules given in this section.</p>
- <p>In the absence of style-layer rules to the contrary (e.g. author
- style sheets), user agents are expected to render an element so that
- it conveys to the user the meaning that the element
- <span title="represent">represents</span>, as described by this specification.</p>
+ <p>In the absence of style-layer rules to the contrary (e.g. author style sheets), user agents are
+ expected to render an element so that it conveys to the user the meaning that the element <span
+ title="represent">represents</span>, as described by this specification.</p>
- <p>The suggestions in this section generally assume a visual output
- medium with a resolution of 96dpi or greater, but HTML is intended
- to apply to multiple media (it is a <i>media-independent</i>
- language). User agent implementors are encouraged to adapt the
+ <p>The suggestions in this section generally assume a visual output medium with a resolution of
+ 96dpi or greater, but HTML is intended to apply to multiple media (it is a
+ <i>media-independent</i> language). User agent implementors are encouraged to adapt the
suggestions in this section to their target media.</p>
<hr>
- <p>An element is <dfn>being rendered</dfn> if it is <span>in a
- <code>Document</code></span>, either its parent node is itself
- <span>being rendered</span> or it is the <code>Document</code> node,
- and it is not explicitly excluded from the rendering using either:</p>
+ <p>An element is <dfn>being rendered</dfn> if it is <span>in a <code>Document</code></span>,
+ either its parent node is itself <span>being rendered</span> or it is the <code>Document</code>
+ node, and it is not explicitly excluded from the rendering using either:</p>
+
<ul class="brief">
<li>the CSS 'display' property's 'none' value, or</li>
<li>the 'visibility' property's 'collapse' value unless it is being treated as equivalent to the 'hidden' value, or</li>
<li>some equivalent in other styling languages.</li>
</ul>
- <p class="note">Just being off-screen does not mean the element is
- not <span>being rendered</span>. The presence of the <code
- title="attr-hidden">hidden</code> attribute normally means the
- element is not <span>being rendered</span>, though this might be
- overridden by the style sheets.</p>
+ <p class="note">Just being off-screen does not mean the element is not <span>being
+ rendered</span>. The presence of the <code title="attr-hidden">hidden</code> attribute normally
+ means the element is not <span>being rendered</span>, though this might be overridden by the style
+ sheets.</p>
<hr>
- <p>User agents that do not honor author-level CSS style sheets are
- nonetheless expected to act as if they applied the CSS rules given
- in these sections in a manner consistent with this specification and
- the relevant CSS and Unicode specifications. <a
- href="#refsCSS">[CSS]</a> <a href="#refsUNICODE">[UNICODE]</a> <a
- href="#refsBIDI">[BIDI]</a></p>
+ <p>User agents that do not honor author-level CSS style sheets are nonetheless expected to act as
+ if they applied the CSS rules given in these sections in a manner consistent with this
+ specification and the relevant CSS and Unicode specifications. <a href="#refsCSS">[CSS]</a> <a
+ href="#refsUNICODE">[UNICODE]</a> <a href="#refsBIDI">[BIDI]</a></p>
- <p class="note">This is especially important for issues relating to
- the 'display', 'unicode-bidi', and 'direction' properties.</p>
+ <p class="note">This is especially important for issues relating to the 'display', 'unicode-bidi',
+ and 'direction' properties.</p>
@@ -108598,11 +108287,9 @@
embed[hidden] { display: inline; height: 0; width: 0; }</pre> <!-- because for legacy reasons it still needs to instantiate the plugin -->
-<!--CLEANUP-->
- <p>The user agent is expected to force the 'display' property of
- <code>noscript</code> elements for whom <span
- title="concept-n-script">scripting is enabled</span> to compute to
- 'none', irrespective of CSS rules.</p>
+ <p>The user agent is expected to force the 'display' property of <code>noscript</code> elements
+ for whom <span title="concept-n-script">scripting is enabled</span> to compute to 'none',
+ irrespective of CSS rules.</p>
<p>The user agent is expected to force the 'display' property of <code>input</code> elements whose
<code title="attr-input-type">type</code> attribute is in the <span
@@ -109855,14 +109542,12 @@
</table>
-<!--CLEANUP-->
<h3>Replaced elements</h3>
<h4>Embedded content</h4>
- <p>The <code>embed</code>, <code>iframe</code>, and
- <code>video</code> elements are expected to be treated as replaced
- elements.</p>
+ <p>The <code>embed</code>, <code>iframe</code>, and <code>video</code> elements are expected to be
+ treated as replaced elements.</p>
<p>A <code>canvas</code> element that <span>represents</span> <span>embedded content</span> is
expected to be treated as a replaced element; the contents of such elements are the element's
@@ -109870,58 +109555,46 @@
element. Other <code>canvas</code> elements are expected to be treated as ordinary elements in the
rendering model.</p>
- <p>An <code>object</code> element that <span>represents</span> an
- image, plugin, or <span>nested browsing context</span> is expected
- to be treated as a replaced element. Other <code>object</code>
- elements are expected to be treated as ordinary elements in the
- rendering model.</p>
+ <p>An <code>object</code> element that <span>represents</span> an image, plugin, or <span>nested
+ browsing context</span> is expected to be treated as a replaced element. Other <code>object</code>
+ elements are expected to be treated as ordinary elements in the rendering model.</p>
- <p>An <code>applet</code> element that <span>represents</span> a
- <span>plugin</span> is expected to be treated as a replaced
- element. Other <code>applet</code> elements are expected to be
- treated as ordinary elements in the rendering model.</p>
+ <p>An <code>applet</code> element that <span>represents</span> a <span>plugin</span> is expected
+ to be treated as a replaced element. Other <code>applet</code> elements are expected to be treated
+ as ordinary elements in the rendering model.</p>
- <p>The <code>audio</code> element, when it is <span title="expose a
- user interface to the user">exposing a user interface</span>, is
- expected to be treated as a replaced element about one line high, as
- wide as is necessary to expose the user agent's user interface
- features. When an <code>audio</code> element is not <span
- title="expose a user interface to the user">exposing a user
- interface</span>, the user agent is expected to force its 'display'
- property to compute to 'none', irrespective of CSS rules.</p>
+ <p>The <code>audio</code> element, when it is <span title="expose a user interface to the
+ user">exposing a user interface</span>, is expected to be treated as a replaced element about one
+ line high, as wide as is necessary to expose the user agent's user interface features. When an
+ <code>audio</code> element is not <span title="expose a user interface to the user">exposing a
+ user interface</span>, the user agent is expected to force its 'display' property to compute to
+ 'none', irrespective of CSS rules.</p>
- <p>Whether a <code>video</code> element is <span title="expose a
- user interface to the user">exposing a user interface</span> is not
- expected to affect the size of the rendering; controls are expected
- to be overlaid above the page content without causing any layout
- changes, and are expected to disappear when the user does not need
- them.</p>
+ <p>Whether a <code>video</code> element is <span title="expose a user interface to the
+ user">exposing a user interface</span> is not expected to affect the size of the rendering;
+ controls are expected to be overlaid above the page content without causing any layout changes,
+ and are expected to disappear when the user does not need them.</p>
- <p>When a <code>video</code> element represents a poster frame or
- frame of video, the poster frame or frame of video is expected to be
- rendered at the largest size that maintains the aspect ratio of that
- poster frame or frame of video without being taller or wider than
- the <code>video</code> element itself, and is expected to be
- centered in the <code>video</code> element.</p>
+ <p>When a <code>video</code> element represents a poster frame or frame of video, the poster frame
+ or frame of video is expected to be rendered at the largest size that maintains the aspect ratio
+ of that poster frame or frame of video without being taller or wider than the <code>video</code>
+ element itself, and is expected to be centered in the <code>video</code> element.</p>
- <p>Any subtitles or captions are expected to be overlayed directly
- on top of their <code>video</code> element, as defined by the
- relevant rendering rules; for <span>WebVTT</span>, those are the
- <span>rules for updating the display of WebVTT text tracks</span>. <a href="#refsWEBVTT">[WEBVTT]</a></p>
+ <p>Any subtitles or captions are expected to be overlayed directly on top of their
+ <code>video</code> element, as defined by the relevant rendering rules; for <span>WebVTT</span>,
+ those are the <span>rules for updating the display of WebVTT text tracks</span>. <a
+ href="#refsWEBVTT">[WEBVTT]</a></p>
- <p>When the user agent starts <span title="expose a user interface
- to the user">exposing a user interface</span> for a
- <code>video</code> element, the user agent should run the
- <span>rules for updating the text track rendering</span> of each of
- the <span title="text track">text tracks</span> in the
- <code>video</code> element's <span>list of text tracks</span> that
- are <span title="text track showing">showing</span> (e.g., for <span
- title="text track">text tracks</span> based on <span>WebVTT</span>,
- the <span>rules for updating the display of WebVTT text
+ <p>When the user agent starts <span title="expose a user interface to the user">exposing a user
+ interface</span> for a <code>video</code> element, the user agent should run the <span>rules for
+ updating the text track rendering</span> of each of the <span title="text track">text
+ tracks</span> in the <code>video</code> element's <span>list of text tracks</span> that are <span
+ title="text track showing">showing</span> (e.g., for <span title="text track">text tracks</span>
+ based on <span>WebVTT</span>, the <span>rules for updating the display of WebVTT text
tracks</span>). <a href="#refsWEBVTT">[WEBVTT]</a></p>
- <p class="note">Resizing <code>video</code> and <code>canvas</code>
- elements does not interrupt video playback or clear the canvas.</p>
+ <p class="note">Resizing <code>video</code> and <code>canvas</code> elements does not interrupt
+ video playback or clear the canvas.</p>
<hr>
@@ -109936,82 +109609,65 @@
<h4>Images</h4>
- <p>When an <code>img</code> element or an <code>input</code> element
- when its <code title="attr-input-type">type</code> attribute is in
- the <span title="attr-input-type-image">Image Button</span> state
- <span>represents</span> an image, it is expected to be treated as a
- replaced element.</p>
+ <p>When an <code>img</code> element or an <code>input</code> element when its <code
+ title="attr-input-type">type</code> attribute is in the <span title="attr-input-type-image">Image
+ Button</span> state <span>represents</span> an image, it is expected to be treated as a replaced
+ element.</p>
- <p>When an <code>img</code> element or an <code>input</code> element
- when its <code title="attr-input-type">type</code> attribute is in
- the <span title="attr-input-type-image">Image Button</span> state
- does not <span title="represents">represent</span> an image, but the
- element already has intrinsic dimensions (e.g. from the
- <span>dimension attributes</span> or CSS rules), and either the user
- agent has reason to believe that the image will become <i
- title="img-available">available</i><!--input-img-available also-->
- and be rendered in due course or the <code>Document</code> is in
- <span>quirks mode</span>, the element is expected to be treated as a
- replaced element whose content is the text that the element
- represents, if any, optionally alongside an icon indicating that the
- image is being obtained. For <code>input</code> elements, the text
- is expected to appear button-like to indicate that the element is a
- <span title="concept-button">button</span>.</p>
+ <p>When an <code>img</code> element or an <code>input</code> element when its <code
+ title="attr-input-type">type</code> attribute is in the <span title="attr-input-type-image">Image
+ Button</span> state does not <span title="represents">represent</span> an image, but the element
+ already has intrinsic dimensions (e.g. from the <span>dimension attributes</span> or CSS rules),
+ and either the user agent has reason to believe that the image will become <i
+ title="img-available">available</i><!--input-img-available also--> and be rendered in due course
+ or the <code>Document</code> is in <span>quirks mode</span>, the element is expected to be treated
+ as a replaced element whose content is the text that the element represents, if any, optionally
+ alongside an icon indicating that the image is being obtained. For <code>input</code> elements,
+ the text is expected to appear button-like to indicate that the element is a <span
+ title="concept-button">button</span>.</p>
- <p>When an <code>img</code> element <span>represents</span> some
- text and the user agent does not expect this to change, the element
- is expected to be treated as a non-replaced phrasing element whose
- content is the text, optionally with an icon indicating that an
- image is missing.</p>
+ <p>When an <code>img</code> element <span>represents</span> some text and the user agent does not
+ expect this to change, the element is expected to be treated as a non-replaced phrasing element
+ whose content is the text, optionally with an icon indicating that an image is missing.</p>
- <p>When an <code>img</code> element <span>represents</span> nothing
- and the user agent does not expect this to change, the element is
- expected to not be rendered at all.</p>
+ <p>When an <code>img</code> element <span>represents</span> nothing and the user agent does not
+ expect this to change, the element is expected to not be rendered at all.</p>
- <p>When an <code>img</code> element might be a key part of the
- content, but neither the image nor any kind of alternative text is
- available, and the user agent does not expect this to change, the
- element is expected to be treated as a non-replaced phrasing element
- whose content is an icon indicating that an image is missing.</p>
- <!-- there's also a should requirement for this case in the <img>
- section itself -->
+ <p>When an <code>img</code> element might be a key part of the content, but neither the image nor
+ any kind of alternative text is available, and the user agent does not expect this to change, the
+ element is expected to be treated as a non-replaced phrasing element whose content is an icon
+ indicating that an image is missing.</p> <!-- there's also a should requirement for this case in
+ the <img> section itself -->
- <p>When an <code>input</code> element whose <code
- title="attr-input-type">type</code> attribute is in the <span
- title="attr-input-type-image">Image Button</span> state does not
- <span title="represents">represent</span> an image and the user
- agent does not expect this to change, the element is expected to be
- treated as a replaced element consisting of a button whose content
- is the element's alternative text. The intrinsic dimensions of the
- button are expected to be about one line in height and whatever
- width is necessary to render the text on one line.</p>
+ <p>When an <code>input</code> element whose <code title="attr-input-type">type</code> attribute is
+ in the <span title="attr-input-type-image">Image Button</span> state does not <span
+ title="represents">represent</span> an image and the user agent does not expect this to change,
+ the element is expected to be treated as a replaced element consisting of a button whose content
+ is the element's alternative text. The intrinsic dimensions of the button are expected to be about
+ one line in height and whatever width is necessary to render the text on one line.</p>
- <p>The icons mentioned above are expected to be relatively small so
- as not to disrupt most text but be easily clickable. In a visual
- environment, for instance, icons could be 16 pixels by 16 pixels
- square, or 1em by 1em if the images are scalable. In an audio
- environment, the icon could be a short bleep. The icons are intended
- to indicate to the user that they can be used to get to whatever
- options the UA provides for images, and, where appropriate, are
- expected to provide access to the context menu that would have come
- up if the user interacted with the actual image.</p>
+ <p>The icons mentioned above are expected to be relatively small so as not to disrupt most text
+ but be easily clickable. In a visual environment, for instance, icons could be 16 pixels by 16
+ pixels square, or 1em by 1em if the images are scalable. In an audio environment, the icon could
+ be a short bleep. The icons are intended to indicate to the user that they can be used to get to
+ whatever options the UA provides for images, and, where appropriate, are expected to provide
+ access to the context menu that would have come up if the user interacted with the actual
+ image.</p>
<hr>
- <p>All animated images with the same <span>absolute URL</span> and
- the same image data are expected to be rendered synchronized to the
- same timeline as a group, with the timeline starting at the time of
- the most recent addition to the group.</p>
+ <p>All animated images with the same <span>absolute URL</span> and the same image data are
+ expected to be rendered synchronized to the same timeline as a group, with the timeline starting
+ at the time of the most recent addition to the group.</p>
- <p class="note">In other words, the animation loop of an animated
- image is restarted each time another image with the same
- <span>absolute URL</span> and image data begins to animate, e.g.
- after being inserted into the document.</p>
+ <p class="note">In other words, the animation loop of an animated image is restarted each time
+ another image with the same <span>absolute URL</span> and image data begins to animate, e.g. after
+ being inserted into the document.</p>
<hr>
- <p>The following CSS rules are expected to apply when the
- <code>Document</code> is in <span>quirks mode</span>:</p>
+ <p>The following CSS rules are expected to apply when the <code>Document</code> is in <span>quirks
+ mode</span>:</p>
<pre class="css">@namespace url(http://www.w3.org/1999/xhtml);
@@ -113277,12 +112933,11 @@
<!-- http://www.w3.org/2002/06/registering-mediatype.html -->
-<!--CLEANUP-->
<h3><dfn><code>text/html</code></dfn></h3>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
@@ -113325,43 +112980,34 @@
<dt>Security considerations:</dt>
<dd>
- <p>Entire novels have been written about the security
- considerations that apply to HTML documents. Many are listed in
- this document, to which the reader is referred for more
- details. Some general concerns bear mentioning here, however:</p>
+ <p>Entire novels have been written about the security considerations that apply to HTML
+ documents. Many are listed in this document, to which the reader is referred for more details.
+ Some general concerns bear mentioning here, however:</p>
- <p>HTML is scripted language, and has a large number of APIs (some
- of which are described in this document). Script can expose the
- user to potential risks of information leakage, credential
- leakage, cross-site scripting attacks, cross-site request
- forgeries, and a host of other problems. While the designs in this
- specification are intended to be safe if implemented correctly, a
- full implementation is a massive undertaking and, as with any
- software, user agents are likely to have security bugs.</p>
+ <p>HTML is scripted language, and has a large number of APIs (some of which are described in
+ this document). Script can expose the user to potential risks of information leakage, credential
+ leakage, cross-site scripting attacks, cross-site request forgeries, and a host of other
+ problems. While the designs in this specification are intended to be safe if implemented
+ correctly, a full implementation is a massive undertaking and, as with any software, user agents
+ are likely to have security bugs.</p>
- <p>Even without scripting, there are specific features in HTML
- which, for historical reasons, are required for broad
- compatibility with legacy content but that expose the user to
- unfortunate security problems. In particular, the <code>img</code>
- element can be used in conjunction with some other features as a
- way to effect a port scan from the user's location on the
- Internet. This can expose local network topologies that the
- attacker would otherwise not be able to determine.</p>
+ <p>Even without scripting, there are specific features in HTML which, for historical reasons,
+ are required for broad compatibility with legacy content but that expose the user to unfortunate
+ security problems. In particular, the <code>img</code> element can be used in conjunction with
+ some other features as a way to effect a port scan from the user's location on the Internet.
+ This can expose local network topologies that the attacker would otherwise not be able to
+ determine.</p>
- <p>HTML relies on a compartmentalization scheme sometimes known as
- the <i>same-origin policy</i>. An <span>origin</span> in most
- cases consists of all the pages served from the same host, on the
- same port, using the same protocol.</p>
+ <p>HTML relies on a compartmentalization scheme sometimes known as the <i>same-origin
+ policy</i>. An <span>origin</span> in most cases consists of all the pages served from the same
+ host, on the same port, using the same protocol.</p>
- <p>It is critical, therefore, to ensure that any untrusted content
- that forms part of a site be hosted on a different
- <span>origin</span> than any sensitive content on that site.
- Untrusted content can easily spoof any other page on the same
- origin, read data from that origin, cause scripts in that origin
- to execute, submit forms to and from that origin even if they are
- protected from cross-site request forgery attacks by unique
- tokens, and make use of any third-party resources exposed to or
- rights granted to that origin.</p>
+ <p>It is critical, therefore, to ensure that any untrusted content that forms part of a site be
+ hosted on a different <span>origin</span> than any sensitive content on that site. Untrusted
+ content can easily spoof any other page on the same origin, read data from that origin, cause
+ scripts in that origin to execute, submit forms to and from that origin even if they are
+ protected from cross-site request forgery attacks by unique tokens, and make use of any
+ third-party resources exposed to or rights granted to that origin.</p>
</dd>
<!--REMOVE-TOPIC:Security-->
@@ -113410,17 +113056,16 @@
<dd>W3C</dd>
</dl>
- <p>Fragment identifiers used with <code>text/html</code> resources
- either refer to <span>the indicated part of the document</span> or
- provide state information for in-page scripts.</p>
+ <p>Fragment identifiers used with <code>text/html</code> resources either refer to <span>the
+ indicated part of the document</span> or provide state information for in-page scripts.</p>
<h3><dfn><code>multipart/x-mixed-replace</code></dfn></h3>
- <p>This registration is for community review and will be submitted
- to the IESG for review, approval, and registration with IANA.</p>
+ <p>This registration is for community review and will be submitted to the IESG for review,
+ approval, and registration with IANA.</p>
<!--
To: ietf-types at iana.org
More information about the Commit-Watchers
mailing list