[html5] r7914 - [giow] (3) pushing <embed>'s specification further towards its reality Fixing ht [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Jun 5 16:24:22 PDT 2013
Author: ianh
Date: 2013-06-05 16:24:21 -0700 (Wed, 05 Jun 2013)
New Revision: 7914
Modified:
complete.html
index
source
Log:
[giow] (3) pushing <embed>'s specification further towards its reality
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16136
Affected topics: HTML
Modified: complete.html
===================================================================
--- complete.html 2013-06-05 21:49:40 UTC (rev 7913)
+++ complete.html 2013-06-05 23:24:21 UTC (rev 7914)
@@ -24983,7 +24983,7 @@
interfaces.</p>
</div>
</dd>
- </dl><!--TOPIC:HTML--><p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an integration point for an external
+ </dl><!--TOPIC:HTML--><!--CLEANUP--><p>The <code><a href=#the-embed-element>embed</a></code> element provides an integration point for an external
(typically non-HTML) application or interactive content.</p>
<p>The <dfn id=attr-embed-src title=attr-embed-src><code>src</code></dfn> attribute gives the address of the
@@ -25004,8 +25004,8 @@
nor a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and when attributes are removed such
that neither attribute is present on the element anymore, and when the element has a <a href=#media-element>media
element</a> ancestor, and when the element has an ancestor <code><a href=#the-object-element>object</a></code> element that is
- <em>not</em> showing its <a href=#fallback-content>fallback content</a>, any plugins instantiated for the element
- must be removed, and the <code><a href=#the-embed-element>embed</a></code> element represents nothing.</p>
+ <em>not</em> showing its <a href=#fallback-content>fallback content</a>, any <a href=#plugin>plugin</a> instantiated for
+ the element must be removed, and the <code><a href=#the-embed-element>embed</a></code> element then represents nothing.</p>
<p>An <code><a href=#the-embed-element>embed</a></code> element is said to be <dfn id=concept-embed-active title=concept-embed-active>potentially
active</dfn> when the following conditions are all met simultaneously:</p>
@@ -25030,11 +25030,14 @@
</ul><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was not <a href=#concept-embed-active title=concept-embed-active>potentially active</a> becomes <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, and whenever a <a href=#concept-embed-active title=concept-embed-active>potentially active</a> <code><a href=#the-embed-element>embed</a></code> element that is
remaining <a href=#concept-embed-active title=concept-embed-active>potentially active</a> and has its <code title=attr-embed-type><a href=#attr-embed-type>src</a></code> attribute set, changed, or removed or its <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute set, changed, or removed, the user agent must
- <a href=#queue-a-task>queue a task</a> using the <dfn id=embed-task-source>embed task source</dfn> to run the following steps:</p>
+ <a href=#queue-a-task>queue a task</a> using the <dfn id=embed-task-source>embed task source</dfn> to run
+ <a href=#the-embed-element-setup-steps>the <code>embed</code> element setup steps</a>.</p>
- <ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run these steps
- for this element, then abort these steps.</li>
+ <p><dfn id=the-embed-element-setup-steps>The <code>embed</code> element setup steps</dfn> are as follows:</p>
+ <ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run <a href=#the-embed-element-setup-steps>the
+ <code>embed</code> element setup steps</a> for this element, then abort these steps.</li>
+
<li>
<dl class=switch><dt>If the element has a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
@@ -25047,12 +25050,90 @@
URL</a>, from the element's <a href=#browsing-context-scope-origin>browsing context scope origin</a> if it has one<!--
potentially http-origin privacy sensitive -->. The <a href=#concept-task title=concept-task>task</a> that
is <a href=#queue-a-task title="queue a task">queued</a> by the <a href=#networking-task-source>networking task source</a> once
- the resource has been <a href=#fetch title=fetch>fetched</a> must find and instantiate an
- appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's
- type</a>, and hand that <a href=#plugin>plugin</a> the content of the resource, replacing any
- previously instantiated plugin for the element.</p>
+ the resource has been <a href=#fetch title=fetch>fetched</a> must run the following steps:</p>
<!-- Note that this doesn't happen when the base URL changes. -->
+ <ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run
+ <a href=#the-embed-element-setup-steps>the <code>embed</code> element setup steps</a> for this element, then abort these
+ steps.</li>
+
+ <li>
+
+ <p>Determine the <dfn id=concept-embed-type title=concept-embed-type>type of the content</dfn> being embedded, as
+ follows (stopping at the first substep that determines the type):</p>
+
+ <ol><li><p>If the element has a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and that
+ attribute's value is a type that a <a href=#plugin>plugin</a> supports, then the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute is the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a>.</li>
+
+ <li>
+
+ <!-- if we get to this point we know we can successfully parsed the URL, since this algorithm is
+ only used after fetching the resource in the steps above -->
+
+ <p>Otherwise, if applying the <a href=#url-parser>URL parser</a> algorithm to the <a href=#url>URL</a> of the
+ specified resource (after any redirects) results in a <a href=#parsed-url>parsed URL</a> whose <a href=#concept-url-path title=concept-url-path>path</a> component matches a pattern that a <a href=#plugin>plugin</a>
+ supports, then the <a href=#concept-embed-type title=concept-embed-type>content's type</a> is the type that that
+ plugin can handle.</p>
+
+ <p class=example>For example, a plugin might say that it can handle resources with <a href=#concept-url-path title=concept-url-path>path</a> components that end with the four character string "<code title="">.swf</code>".</p>
+
+ <!-- it's sad that we have to do extension sniffing. sigh. -->
+ <!-- see also <object> which has a similar step -->
+
+ </li>
+
+ <li><p>Otherwise, if the specified resource has <a href=#content-type title=Content-Type>explicit Content-Type
+ metadata</a>, then that is the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a>.</li>
+
+ <li><p>Otherwise, the content has no <a href=#concept-embed-type title=concept-embed-type>type</a> and there can
+ be no appropriate <a href=#plugin>plugin</a> for it.</li>
+
+ <!-- This algorithm is a monument to bad design. Go legacy! -->
+
+ </ol></li>
+
+ <li>
+
+ <p>If the previous step determined that the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a> is <code title="">image/svg+xml</code>, then run the following substeps:</p>
+
+ <ol><li><p>If the <code><a href=#the-embed-element>embed</a></code> element is not associated with a <a href=#nested-browsing-context>nested browsing
+ context</a>, associate the element with a newly created <a href=#nested-browsing-context>nested browsing
+ context</a>, and, if the element has a <code title=attr-embed-name><a href=#attr-embed-name>name</a></code>
+ attribute, set the <a href=#browsing-context-name>browsing context name</a> of the element's <a href=#nested-browsing-context>nested
+ browsing context</a> to the value of this attribute.</p>
+ <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2291 - dynamic changes to 'name' don't do anything -->
+
+ <li><p><a href=#navigate>Navigate</a><!--DONAV object--> the <a href=#nested-browsing-context>nested browsing context</a> to
+ the fetched resource, with <a href=#replacement-enabled>replacement enabled</a>, and with the
+ <code><a href=#the-embed-element>embed</a></code> element's document's <a href=#browsing-context>browsing context</a> as the <a href=#source-browsing-context>source
+ browsing context</a>. (The <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute of the
+ <code><a href=#the-embed-element>embed</a></code> element doesn't get updated if the browsing context gets further
+ navigated to other locations.)</li>
+
+ <li><p>The <code><a href=#the-object-element>object</a></code> element now <a href=#represents>represents</a> its associated
+ <a href=#nested-browsing-context>nested browsing context</a>.</li>
+
+ </ol></li>
+
+ <li>
+
+ <p>Otherwise, find and instantiate an appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's type</a>, and hand that <a href=#plugin>plugin</a> the
+ content of the resource, replacing any previously instantiated plugin for the element. The
+ <code><a href=#the-embed-element>embed</a></code> element now represents this <a href=#plugin>plugin</a> instance.</p>
+
+ </li>
+
+ </ol><p>Whether the resource is fetched successfully or not (e.g. whether the response code was a
+ 2xx code <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>) must be ignored
+ when determining the <a href=#concept-embed-type title=concept-embed-type>content's type</a> and when handing
+ the resource to the plugin.</p>
+
+ <p class=note>This allows servers to return data for plugins even with error responses (e.g.
+ HTTP 500 Internal Server Error codes can still contain plugin data).</p>
+
<p>Fetching the resource must <a href=#delay-the-load-event>delay the load event</a> of the element's document.</p>
<!-- if we add load/error events, then replace the previous paragraph with the text one: -->
<!-- similar text in various places -->
@@ -25065,12 +25146,22 @@
<dt>If the element has no <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
- <dd><p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on
- the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute.</p>
+ <dd>
+ <p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on the
+ value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute. The <code><a href=#the-embed-element>embed</a></code>
+ element now represents this <a href=#plugin>plugin</a> instance.</p>
+
+ </dd>
+
</dl></li>
- </ol><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was <a href=#concept-embed-active title=concept-embed-active>potentially
+ </ol><p>The <code><a href=#the-embed-element>embed</a></code> element has no <a href=#fallback-content>fallback content</a>. If the user agent can't
+ find a suitable plugin when attempting to find and instantiate one for the algorithm above, then
+ the user agent must use a default plugin. This default could be as simple as saying "Unsupported
+ Format".</p>
+
+ <p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was <a href=#concept-embed-active title=concept-embed-active>potentially
active</a> stops being <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, any
<a href=#plugin>plugin</a> that had been instantiated for that element must be unloaded.</p>
@@ -25088,50 +25179,6 @@
agents should convey the danger of overriding the sandbox to the user if an option to do so is
provided.</p>
- <p>The <dfn id=concept-embed-type title=concept-embed-type>type of the content</dfn> being embedded is defined as
- follows:</p>
-
- <ol><li><p>If the element has a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and that
- attribute's value is a type that a <a href=#plugin>plugin</a> supports, then the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute is the <a href=#concept-embed-type title=concept-embed-type>content's
- type</a>.</li>
-
- <li>
-
- <!-- if we get to this point we know we can successfully parsed the URL, since this algorithm is
- only used after fetching the resource in the steps above -->
-
- <p>Otherwise, if applying the <a href=#url-parser>URL parser</a> algorithm to the <a href=#url>URL</a> of the
- specified resource (after any redirects) results in a <a href=#parsed-url>parsed URL</a> whose <a href=#concept-url-path title=concept-url-path>path</a> component matches a pattern that a <a href=#plugin>plugin</a>
- supports, then the <a href=#concept-embed-type title=concept-embed-type>content's type</a> is the type that that
- plugin can handle.</p>
-
- <p class=example>For example, a plugin might say that it can handle resources with <a href=#concept-url-path title=concept-url-path>path</a> components that end with the four character string "<code title="">.swf</code>".</p>
-
- <!-- it's sad that we have to do extension sniffing. sigh. -->
- <!-- see also <object> which has a similar step -->
-
- </li>
-
- <li><p>Otherwise, if the specified resource has <a href=#content-type title=Content-Type>explicit Content-Type
- metadata</a>, then that is the <a href=#concept-embed-type title=concept-embed-type>content's
- type</a>.</li>
-
- <li><p>Otherwise, the content has no type and there can be no appropriate <a href=#plugin>plugin</a> for
- it.</li>
-
- <!-- This algorithm is a monument to bad design. Go legacy! -->
-
- </ol><p>The <code><a href=#the-embed-element>embed</a></code> element has no <a href=#fallback-content>fallback content</a>. If the user agent can't
- find a suitable plugin, then the user agent must use a default plugin. (This default could be as
- simple as saying "Unsupported Format".)</p>
-
- <p>Whether the resource is fetched successfully or not (e.g. whether the response code was a 2xx
- code <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>) must be ignored when
- determining the resource's type and when handing the resource to the plugin.</p>
-
- <p class=note>This allows servers to return data for plugins even with error responses (e.g.
- HTTP 500 Internal Server Error codes can still contain plugin data).</p>
-
</div>
<p>Any namespace-less attribute other than <code title=attr-embed-name><a href=#attr-embed-name>name</a></code>, <code title=attr-embed-align><a href=#attr-embed-align>align</a></code>, <code title=attr-embed-hspace><a href=#attr-embed-hspace>hspace</a></code>, and <code title=attr-embed-vspace><a href=#attr-embed-vspace>vspace</a></code> <!-- when editing, see also note below --> may be
@@ -25148,10 +25195,10 @@
<div class=impl>
<p>The user agent should pass the names and values of all the attributes of the <code><a href=#the-embed-element>embed</a></code>
- element that have no namespace to the <a href=#plugin>plugin</a> used, when it is instantiated.</p>
+ element that have no namespace to the <a href=#plugin>plugin</a> used, when one is instantiated.</p>
<p>The <code><a href=#htmlembedelement>HTMLEmbedElement</a></code> object representing the element must expose the scriptable
- interface of the <a href=#plugin>plugin</a> instantiated for the <code><a href=#the-embed-element>embed</a></code> element. At a
+ interface of the <a href=#plugin>plugin</a> instantiated for the <code><a href=#the-embed-element>embed</a></code> element, if any. At a
minimum, this interface must implement the <dfn id=dom-embed-caller title=dom-embed-caller>legacy caller
operation</dfn>. (It is suggested that the default behavior of this legacy caller operation, e.g.
the behavior of the default plugin's legacy caller operation, be to throw a
Modified: index
===================================================================
--- index 2013-06-05 21:49:40 UTC (rev 7913)
+++ index 2013-06-05 23:24:21 UTC (rev 7914)
@@ -24983,7 +24983,7 @@
interfaces.</p>
</div>
</dd>
- </dl><!--TOPIC:HTML--><p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an integration point for an external
+ </dl><!--TOPIC:HTML--><!--CLEANUP--><p>The <code><a href=#the-embed-element>embed</a></code> element provides an integration point for an external
(typically non-HTML) application or interactive content.</p>
<p>The <dfn id=attr-embed-src title=attr-embed-src><code>src</code></dfn> attribute gives the address of the
@@ -25004,8 +25004,8 @@
nor a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and when attributes are removed such
that neither attribute is present on the element anymore, and when the element has a <a href=#media-element>media
element</a> ancestor, and when the element has an ancestor <code><a href=#the-object-element>object</a></code> element that is
- <em>not</em> showing its <a href=#fallback-content>fallback content</a>, any plugins instantiated for the element
- must be removed, and the <code><a href=#the-embed-element>embed</a></code> element represents nothing.</p>
+ <em>not</em> showing its <a href=#fallback-content>fallback content</a>, any <a href=#plugin>plugin</a> instantiated for
+ the element must be removed, and the <code><a href=#the-embed-element>embed</a></code> element then represents nothing.</p>
<p>An <code><a href=#the-embed-element>embed</a></code> element is said to be <dfn id=concept-embed-active title=concept-embed-active>potentially
active</dfn> when the following conditions are all met simultaneously:</p>
@@ -25030,11 +25030,14 @@
</ul><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was not <a href=#concept-embed-active title=concept-embed-active>potentially active</a> becomes <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, and whenever a <a href=#concept-embed-active title=concept-embed-active>potentially active</a> <code><a href=#the-embed-element>embed</a></code> element that is
remaining <a href=#concept-embed-active title=concept-embed-active>potentially active</a> and has its <code title=attr-embed-type><a href=#attr-embed-type>src</a></code> attribute set, changed, or removed or its <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute set, changed, or removed, the user agent must
- <a href=#queue-a-task>queue a task</a> using the <dfn id=embed-task-source>embed task source</dfn> to run the following steps:</p>
+ <a href=#queue-a-task>queue a task</a> using the <dfn id=embed-task-source>embed task source</dfn> to run
+ <a href=#the-embed-element-setup-steps>the <code>embed</code> element setup steps</a>.</p>
- <ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run these steps
- for this element, then abort these steps.</li>
+ <p><dfn id=the-embed-element-setup-steps>The <code>embed</code> element setup steps</dfn> are as follows:</p>
+ <ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run <a href=#the-embed-element-setup-steps>the
+ <code>embed</code> element setup steps</a> for this element, then abort these steps.</li>
+
<li>
<dl class=switch><dt>If the element has a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
@@ -25047,12 +25050,90 @@
URL</a>, from the element's <a href=#browsing-context-scope-origin>browsing context scope origin</a> if it has one<!--
potentially http-origin privacy sensitive -->. The <a href=#concept-task title=concept-task>task</a> that
is <a href=#queue-a-task title="queue a task">queued</a> by the <a href=#networking-task-source>networking task source</a> once
- the resource has been <a href=#fetch title=fetch>fetched</a> must find and instantiate an
- appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's
- type</a>, and hand that <a href=#plugin>plugin</a> the content of the resource, replacing any
- previously instantiated plugin for the element.</p>
+ the resource has been <a href=#fetch title=fetch>fetched</a> must run the following steps:</p>
<!-- Note that this doesn't happen when the base URL changes. -->
+ <ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run
+ <a href=#the-embed-element-setup-steps>the <code>embed</code> element setup steps</a> for this element, then abort these
+ steps.</li>
+
+ <li>
+
+ <p>Determine the <dfn id=concept-embed-type title=concept-embed-type>type of the content</dfn> being embedded, as
+ follows (stopping at the first substep that determines the type):</p>
+
+ <ol><li><p>If the element has a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and that
+ attribute's value is a type that a <a href=#plugin>plugin</a> supports, then the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute is the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a>.</li>
+
+ <li>
+
+ <!-- if we get to this point we know we can successfully parsed the URL, since this algorithm is
+ only used after fetching the resource in the steps above -->
+
+ <p>Otherwise, if applying the <a href=#url-parser>URL parser</a> algorithm to the <a href=#url>URL</a> of the
+ specified resource (after any redirects) results in a <a href=#parsed-url>parsed URL</a> whose <a href=#concept-url-path title=concept-url-path>path</a> component matches a pattern that a <a href=#plugin>plugin</a>
+ supports, then the <a href=#concept-embed-type title=concept-embed-type>content's type</a> is the type that that
+ plugin can handle.</p>
+
+ <p class=example>For example, a plugin might say that it can handle resources with <a href=#concept-url-path title=concept-url-path>path</a> components that end with the four character string "<code title="">.swf</code>".</p>
+
+ <!-- it's sad that we have to do extension sniffing. sigh. -->
+ <!-- see also <object> which has a similar step -->
+
+ </li>
+
+ <li><p>Otherwise, if the specified resource has <a href=#content-type title=Content-Type>explicit Content-Type
+ metadata</a>, then that is the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a>.</li>
+
+ <li><p>Otherwise, the content has no <a href=#concept-embed-type title=concept-embed-type>type</a> and there can
+ be no appropriate <a href=#plugin>plugin</a> for it.</li>
+
+ <!-- This algorithm is a monument to bad design. Go legacy! -->
+
+ </ol></li>
+
+ <li>
+
+ <p>If the previous step determined that the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a> is <code title="">image/svg+xml</code>, then run the following substeps:</p>
+
+ <ol><li><p>If the <code><a href=#the-embed-element>embed</a></code> element is not associated with a <a href=#nested-browsing-context>nested browsing
+ context</a>, associate the element with a newly created <a href=#nested-browsing-context>nested browsing
+ context</a>, and, if the element has a <code title=attr-embed-name><a href=#attr-embed-name>name</a></code>
+ attribute, set the <a href=#browsing-context-name>browsing context name</a> of the element's <a href=#nested-browsing-context>nested
+ browsing context</a> to the value of this attribute.</p>
+ <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2291 - dynamic changes to 'name' don't do anything -->
+
+ <li><p><a href=#navigate>Navigate</a><!--DONAV object--> the <a href=#nested-browsing-context>nested browsing context</a> to
+ the fetched resource, with <a href=#replacement-enabled>replacement enabled</a>, and with the
+ <code><a href=#the-embed-element>embed</a></code> element's document's <a href=#browsing-context>browsing context</a> as the <a href=#source-browsing-context>source
+ browsing context</a>. (The <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute of the
+ <code><a href=#the-embed-element>embed</a></code> element doesn't get updated if the browsing context gets further
+ navigated to other locations.)</li>
+
+ <li><p>The <code><a href=#the-object-element>object</a></code> element now <a href=#represents>represents</a> its associated
+ <a href=#nested-browsing-context>nested browsing context</a>.</li>
+
+ </ol></li>
+
+ <li>
+
+ <p>Otherwise, find and instantiate an appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's type</a>, and hand that <a href=#plugin>plugin</a> the
+ content of the resource, replacing any previously instantiated plugin for the element. The
+ <code><a href=#the-embed-element>embed</a></code> element now represents this <a href=#plugin>plugin</a> instance.</p>
+
+ </li>
+
+ </ol><p>Whether the resource is fetched successfully or not (e.g. whether the response code was a
+ 2xx code <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>) must be ignored
+ when determining the <a href=#concept-embed-type title=concept-embed-type>content's type</a> and when handing
+ the resource to the plugin.</p>
+
+ <p class=note>This allows servers to return data for plugins even with error responses (e.g.
+ HTTP 500 Internal Server Error codes can still contain plugin data).</p>
+
<p>Fetching the resource must <a href=#delay-the-load-event>delay the load event</a> of the element's document.</p>
<!-- if we add load/error events, then replace the previous paragraph with the text one: -->
<!-- similar text in various places -->
@@ -25065,12 +25146,22 @@
<dt>If the element has no <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
- <dd><p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on
- the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute.</p>
+ <dd>
+ <p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on the
+ value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute. The <code><a href=#the-embed-element>embed</a></code>
+ element now represents this <a href=#plugin>plugin</a> instance.</p>
+
+ </dd>
+
</dl></li>
- </ol><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was <a href=#concept-embed-active title=concept-embed-active>potentially
+ </ol><p>The <code><a href=#the-embed-element>embed</a></code> element has no <a href=#fallback-content>fallback content</a>. If the user agent can't
+ find a suitable plugin when attempting to find and instantiate one for the algorithm above, then
+ the user agent must use a default plugin. This default could be as simple as saying "Unsupported
+ Format".</p>
+
+ <p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was <a href=#concept-embed-active title=concept-embed-active>potentially
active</a> stops being <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, any
<a href=#plugin>plugin</a> that had been instantiated for that element must be unloaded.</p>
@@ -25088,50 +25179,6 @@
agents should convey the danger of overriding the sandbox to the user if an option to do so is
provided.</p>
- <p>The <dfn id=concept-embed-type title=concept-embed-type>type of the content</dfn> being embedded is defined as
- follows:</p>
-
- <ol><li><p>If the element has a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and that
- attribute's value is a type that a <a href=#plugin>plugin</a> supports, then the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute is the <a href=#concept-embed-type title=concept-embed-type>content's
- type</a>.</li>
-
- <li>
-
- <!-- if we get to this point we know we can successfully parsed the URL, since this algorithm is
- only used after fetching the resource in the steps above -->
-
- <p>Otherwise, if applying the <a href=#url-parser>URL parser</a> algorithm to the <a href=#url>URL</a> of the
- specified resource (after any redirects) results in a <a href=#parsed-url>parsed URL</a> whose <a href=#concept-url-path title=concept-url-path>path</a> component matches a pattern that a <a href=#plugin>plugin</a>
- supports, then the <a href=#concept-embed-type title=concept-embed-type>content's type</a> is the type that that
- plugin can handle.</p>
-
- <p class=example>For example, a plugin might say that it can handle resources with <a href=#concept-url-path title=concept-url-path>path</a> components that end with the four character string "<code title="">.swf</code>".</p>
-
- <!-- it's sad that we have to do extension sniffing. sigh. -->
- <!-- see also <object> which has a similar step -->
-
- </li>
-
- <li><p>Otherwise, if the specified resource has <a href=#content-type title=Content-Type>explicit Content-Type
- metadata</a>, then that is the <a href=#concept-embed-type title=concept-embed-type>content's
- type</a>.</li>
-
- <li><p>Otherwise, the content has no type and there can be no appropriate <a href=#plugin>plugin</a> for
- it.</li>
-
- <!-- This algorithm is a monument to bad design. Go legacy! -->
-
- </ol><p>The <code><a href=#the-embed-element>embed</a></code> element has no <a href=#fallback-content>fallback content</a>. If the user agent can't
- find a suitable plugin, then the user agent must use a default plugin. (This default could be as
- simple as saying "Unsupported Format".)</p>
-
- <p>Whether the resource is fetched successfully or not (e.g. whether the response code was a 2xx
- code <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>) must be ignored when
- determining the resource's type and when handing the resource to the plugin.</p>
-
- <p class=note>This allows servers to return data for plugins even with error responses (e.g.
- HTTP 500 Internal Server Error codes can still contain plugin data).</p>
-
</div>
<p>Any namespace-less attribute other than <code title=attr-embed-name><a href=#attr-embed-name>name</a></code>, <code title=attr-embed-align><a href=#attr-embed-align>align</a></code>, <code title=attr-embed-hspace><a href=#attr-embed-hspace>hspace</a></code>, and <code title=attr-embed-vspace><a href=#attr-embed-vspace>vspace</a></code> <!-- when editing, see also note below --> may be
@@ -25148,10 +25195,10 @@
<div class=impl>
<p>The user agent should pass the names and values of all the attributes of the <code><a href=#the-embed-element>embed</a></code>
- element that have no namespace to the <a href=#plugin>plugin</a> used, when it is instantiated.</p>
+ element that have no namespace to the <a href=#plugin>plugin</a> used, when one is instantiated.</p>
<p>The <code><a href=#htmlembedelement>HTMLEmbedElement</a></code> object representing the element must expose the scriptable
- interface of the <a href=#plugin>plugin</a> instantiated for the <code><a href=#the-embed-element>embed</a></code> element. At a
+ interface of the <a href=#plugin>plugin</a> instantiated for the <code><a href=#the-embed-element>embed</a></code> element, if any. At a
minimum, this interface must implement the <dfn id=dom-embed-caller title=dom-embed-caller>legacy caller
operation</dfn>. (It is suggested that the default behavior of this legacy caller operation, e.g.
the behavior of the default plugin's legacy caller operation, be to throw a
Modified: source
===================================================================
--- source 2013-06-05 21:49:40 UTC (rev 7913)
+++ source 2013-06-05 23:24:21 UTC (rev 7914)
@@ -26280,8 +26280,9 @@
</div>
</dd>
</dl><!--TOPIC:HTML-->
+<!--CLEANUP-->
- <p>The <code>embed</code> element <span>represents</span> an integration point for an external
+ <p>The <code>embed</code> element provides an integration point for an external
(typically non-HTML) application or interactive content.</p>
<p>The <dfn title="attr-embed-src"><code>src</code></dfn> attribute gives the address of the
@@ -26305,8 +26306,8 @@
nor a <code title="attr-embed-type">type</code> attribute, and when attributes are removed such
that neither attribute is present on the element anymore, and when the element has a <span>media
element</span> ancestor, and when the element has an ancestor <code>object</code> element that is
- <em>not</em> showing its <span>fallback content</span>, any plugins instantiated for the element
- must be removed, and the <code>embed</code> element represents nothing.</p>
+ <em>not</em> showing its <span>fallback content</span>, any <span>plugin</span> instantiated for
+ the element must be removed, and the <code>embed</code> element then represents nothing.</p>
<p>An <code>embed</code> element is said to be <dfn title="concept-embed-active">potentially
active</dfn> when the following conditions are all met simultaneously:</p>
@@ -26342,12 +26343,15 @@
remaining <span title="concept-embed-active">potentially active</span> and has its <code
title="attr-embed-type">src</code> attribute set, changed, or removed or its <code
title="attr-embed-type">type</code> attribute set, changed, or removed, the user agent must
- <span>queue a task</span> using the <dfn>embed task source</dfn> to run the following steps:</p>
+ <span>queue a task</span> using the <dfn>embed task source</dfn> to run
+ <span>the <code>embed</code> element setup steps</span>.</p>
+ <p><dfn>The <code>embed</code> element setup steps</dfn> are as follows:</p>
+
<ol>
- <li><p>If another <span title="concept-task">task</span> has since been queued to run these steps
- for this element, then abort these steps.</p></li>
+ <li><p>If another <span title="concept-task">task</span> has since been queued to run <span>the
+ <code>embed</code> element setup steps</span> for this element, then abort these steps.</p></li>
<li>
@@ -26363,12 +26367,107 @@
URL</span>, from the element's <span>browsing context scope origin</span> if it has one<!--
potentially http-origin privacy sensitive -->. The <span title="concept-task">task</span> that
is <span title="queue a task">queued</span> by the <span>networking task source</span> once
- the resource has been <span title="fetch">fetched</span> must find and instantiate an
- appropriate <span>plugin</span> based on the <span title="concept-embed-type">content's
- type</span>, and hand that <span>plugin</span> the content of the resource, replacing any
- previously instantiated plugin for the element.</p>
+ the resource has been <span title="fetch">fetched</span> must run the following steps:</p>
<!-- Note that this doesn't happen when the base URL changes. -->
+ <ol>
+
+ <li><p>If another <span title="concept-task">task</span> has since been queued to run
+ <span>the <code>embed</code> element setup steps</span> for this element, then abort these
+ steps.</p></li>
+
+ <li>
+
+ <p>Determine the <dfn title="concept-embed-type">type of the content</dfn> being embedded, as
+ follows (stopping at the first substep that determines the type):</p>
+
+ <ol>
+
+ <li><p>If the element has a <code title="attr-embed-type">type</code> attribute, and that
+ attribute's value is a type that a <span>plugin</span> supports, then the value of the <code
+ title="attr-embed-type">type</code> attribute is the <span title="concept-embed-type">content's
+ type</span>.</p></li>
+
+ <li>
+
+ <!-- if we get to this point we know we can successfully parsed the URL, since this algorithm is
+ only used after fetching the resource in the steps above -->
+
+ <p>Otherwise, if applying the <span>URL parser</span> algorithm to the <span>URL</span> of the
+ specified resource (after any redirects) results in a <span>parsed URL</span> whose <span
+ title="concept-url-path">path</span> component matches a pattern that a <span>plugin</span>
+ supports, then the <span title="concept-embed-type">content's type</span> is the type that that
+ plugin can handle.</p>
+
+ <p class="example">For example, a plugin might say that it can handle resources with <span
+ title="concept-url-path">path</span> components that end with the four character string "<code
+ title="">.swf</code>".</p>
+
+ <!-- it's sad that we have to do extension sniffing. sigh. -->
+ <!-- see also <object> which has a similar step -->
+
+ </li>
+
+ <li><p>Otherwise, if the specified resource has <span title="Content-Type">explicit Content-Type
+ metadata</span>, then that is the <span title="concept-embed-type">content's
+ type</span>.</p></li>
+
+ <li><p>Otherwise, the content has no <span title="concept-embed-type">type</span> and there can
+ be no appropriate <span>plugin</span> for it.</p></li>
+
+ <!-- This algorithm is a monument to bad design. Go legacy! -->
+
+ </ol>
+
+ </li>
+
+ <li>
+
+ <p>If the previous step determined that the <span title="concept-embed-type">content's
+ type</span> is <code title="">image/svg+xml</code>, then run the following substeps:</p>
+
+ <ol>
+
+ <li><p>If the <code>embed</code> element is not associated with a <span>nested browsing
+ context</span>, associate the element with a newly created <span>nested browsing
+ context</span>, and, if the element has a <code title="attr-embed-name">name</code>
+ attribute, set the <span>browsing context name</span> of the element's <span>nested
+ browsing context</span> to the value of this attribute.</p>
+ <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2291 - dynamic changes to 'name' don't do anything -->
+
+ <li><p><span>Navigate</span><!--DONAV object--> the <span>nested browsing context</span> to
+ the fetched resource, with <span>replacement enabled</span>, and with the
+ <code>embed</code> element's document's <span>browsing context</span> as the <span>source
+ browsing context</span>. (The <code title="attr-embed-src">src</code> attribute of the
+ <code>embed</code> element doesn't get updated if the browsing context gets further
+ navigated to other locations.)</p></li>
+
+ <li><p>The <code>object</code> element now <span>represents</span> its associated
+ <span>nested browsing context</span>.</p></li>
+
+ </ol>
+
+ </li>
+
+ <li>
+
+ <p>Otherwise, find and instantiate an appropriate <span>plugin</span> based on the <span
+ title="concept-embed-type">content's type</span>, and hand that <span>plugin</span> the
+ content of the resource, replacing any previously instantiated plugin for the element. The
+ <code>embed</code> element now represents this <span>plugin</span> instance.</p>
+
+ </li>
+
+ </ol>
+
+ <p>Whether the resource is fetched successfully or not (e.g. whether the response code was a
+ 2xx code <span title="concept-http-equivalent-codes">or equivalent</span>) must be ignored
+ when determining the <span title="concept-embed-type">content's type</span> and when handing
+ the resource to the plugin.</p>
+
+ <p class="note">This allows servers to return data for plugins even with error responses (e.g.
+ HTTP 500 Internal Server Error codes can still contain plugin data).</p>
+
<p>Fetching the resource must <span>delay the load event</span> of the element's document.</p>
<!-- if we add load/error events, then replace the previous paragraph with the text one: -->
<!-- similar text in various places -->
@@ -26381,15 +26480,25 @@
<dt>If the element has no <code title="attr-embed-src">src</code> attribute set</dt>
- <dd><p>The user agent should find and instantiate an appropriate <span>plugin</span> based on
- the value of the <code title="attr-embed-type">type</code> attribute.</p>
+ <dd>
+ <p>The user agent should find and instantiate an appropriate <span>plugin</span> based on the
+ value of the <code title="attr-embed-type">type</code> attribute. The <code>embed</code>
+ element now represents this <span>plugin</span> instance.</p>
+
+ </dd>
+
</dl>
</li>
</ol>
+ <p>The <code>embed</code> element has no <span>fallback content</span>. If the user agent can't
+ find a suitable plugin when attempting to find and instantiate one for the algorithm above, then
+ the user agent must use a default plugin. This default could be as simple as saying "Unsupported
+ Format".</p>
+
<p>Whenever an <code>embed</code> element that was <span title="concept-embed-active">potentially
active</span> stops being <span title="concept-embed-active">potentially active</span>, any
<span>plugin</span> that had been instantiated for that element must be unloaded.</p>
@@ -26409,58 +26518,6 @@
agents should convey the danger of overriding the sandbox to the user if an option to do so is
provided.</p>
- <p>The <dfn title="concept-embed-type">type of the content</dfn> being embedded is defined as
- follows:</p>
-
- <ol>
-
- <li><p>If the element has a <code title="attr-embed-type">type</code> attribute, and that
- attribute's value is a type that a <span>plugin</span> supports, then the value of the <code
- title="attr-embed-type">type</code> attribute is the <span title="concept-embed-type">content's
- type</span>.</p></li>
-
- <li>
-
- <!-- if we get to this point we know we can successfully parsed the URL, since this algorithm is
- only used after fetching the resource in the steps above -->
-
- <p>Otherwise, if applying the <span>URL parser</span> algorithm to the <span>URL</span> of the
- specified resource (after any redirects) results in a <span>parsed URL</span> whose <span
- title="concept-url-path">path</span> component matches a pattern that a <span>plugin</span>
- supports, then the <span title="concept-embed-type">content's type</span> is the type that that
- plugin can handle.</p>
-
- <p class="example">For example, a plugin might say that it can handle resources with <span
- title="concept-url-path">path</span> components that end with the four character string "<code
- title="">.swf</code>".</p>
-
- <!-- it's sad that we have to do extension sniffing. sigh. -->
- <!-- see also <object> which has a similar step -->
-
- </li>
-
- <li><p>Otherwise, if the specified resource has <span title="Content-Type">explicit Content-Type
- metadata</span>, then that is the <span title="concept-embed-type">content's
- type</span>.</p></li>
-
- <li><p>Otherwise, the content has no type and there can be no appropriate <span>plugin</span> for
- it.</p></li>
-
- <!-- This algorithm is a monument to bad design. Go legacy! -->
-
- </ol>
-
- <p>The <code>embed</code> element has no <span>fallback content</span>. If the user agent can't
- find a suitable plugin, then the user agent must use a default plugin. (This default could be as
- simple as saying "Unsupported Format".)</p>
-
- <p>Whether the resource is fetched successfully or not (e.g. whether the response code was a 2xx
- code <span title="concept-http-equivalent-codes">or equivalent</span>) must be ignored when
- determining the resource's type and when handing the resource to the plugin.</p>
-
- <p class="note">This allows servers to return data for plugins even with error responses (e.g.
- HTTP 500 Internal Server Error codes can still contain plugin data).</p>
-
</div>
<p>Any namespace-less attribute other than <code title="attr-embed-name">name</code>, <code
@@ -26479,10 +26536,10 @@
<div class="impl">
<p>The user agent should pass the names and values of all the attributes of the <code>embed</code>
- element that have no namespace to the <span>plugin</span> used, when it is instantiated.</p>
+ element that have no namespace to the <span>plugin</span> used, when one is instantiated.</p>
<p>The <code>HTMLEmbedElement</code> object representing the element must expose the scriptable
- interface of the <span>plugin</span> instantiated for the <code>embed</code> element. At a
+ interface of the <span>plugin</span> instantiated for the <code>embed</code> element, if any. At a
minimum, this interface must implement the <dfn title="dom-embed-caller">legacy caller
operation</dfn>. (It is suggested that the default behavior of this legacy caller operation, e.g.
the behavior of the default plugin's legacy caller operation, be to throw a
More information about the Commit-Watchers
mailing list