- From: poot <cvsmail@w3.org>
- Date: Mon, 14 Sep 2009 14:21:51 +0900 (JST)
- To: public-html-diffs@w3.org
hixie: Make <object> and <embed> not have live plugins when out-of- document. (whatwg r3828) http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2995&r2=1.2996&f=h http://html5.org/tools/web-apps-tracker?from=3827&to=3828 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.2995 retrieving revision 1.2996 diff -u -d -r1.2995 -r1.2996 --- Overview.html 13 Sep 2009 21:28:56 -0000 1.2995 +++ Overview.html 14 Sep 2009 05:21:25 -0000 1.2996 @@ -213,7 +213,7 @@ <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2> <!--ZZZ:--> <!--<h2 class="no-num no-toc">W3C Working Draft 25 August 2009</h2>--> - <h2 class="no-num no-toc" id="editor-s-draft-13-september-2009">Editor's Draft 13 September 2009</h2> + <h2 class="no-num no-toc" id="editor-s-draft-14-september-2009">Editor's Draft 14 September 2009</h2> <!--:ZZZ--> <dl><!-- ZZZ: update the month/day (twice), (un)comment out--><!-- <dt>This Version:</dt> @@ -312,7 +312,7 @@ track. <!--ZZZ:--> <!--This specification is the 25 August 2009 Working Draft.--> - This specification is the 13 September 2009 Editor's Draft. + This specification is the 14 September 2009 Editor's Draft. <!--:ZZZ--> </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of) @@ -17493,33 +17493,63 @@ overriding the sandbox to the user if an option to do so is provided.</p> - <p>When the element is created with a <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute, and whenever the <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute is subsequently set, and - whenever the <code title="attr-embed-type"><a href="#attr-embed-type">type</a></code> attribute is - set or removed while the element has a <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute, if the element is not - in a sandboxed browsing context, not a descendant of a <a href="#media-element">media - element</a>, and not a descendant of an <code><a href="#the-object-element">object</a></code> - element that is not showing its <a href="#fallback-content">fallback content</a>, the - user agent must <a href="#resolve-a-url" title="resolve a url">resolve</a> the value - of the attribute, relative to the element, and if that is - successful, should <a href="#fetch">fetch</a> the resulting <a href="#absolute-url">absolute - URL</a>. 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. <!-- Note that this - doesn't happen when the base URL changes. --></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> - <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 --> - <!--<p>Fetching the resource must <span>delay the load event</span> - of the element's document until the final <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> has been - run.</p>--> + <ul class="brief"><li>The element is <a href="#in-a-document" title="in a document">in a <code>Document</code></a>.</li> + <li>The element has either a <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute set or a <code title="attr-embed-type"><a href="#attr-embed-type">type</a></code> attribute set (or both).</li> + <li>The element is not in a sandboxed browsing context.</li> + <li>The element is not a descendant of a <a href="#media-element">media element</a>.</li> + <li>The element is not a descendant of an <code><a href="#the-object-element">object</a></code> element that is not showing its <a href="#fallback-content">fallback content</a>.</li> + </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's <code title="attr-embed-type"><a href="#attr-embed-type">src</a></code> attribute is set, changed, or + removed, 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's <code title="attr-embed-type"><a href="#attr-embed-type">type</a></code> attribute is set, changed, or + removed, the appropriate set of steps from the following is then + applied:</p> + + <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> + + <dd> + + <p>The user agent must <a href="#resolve-a-url" title="resolve a url">resolve</a> + the value of the element's <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> + attribute, relative to the element. If that is successful, the + user agent should <a href="#fetch">fetch</a> the resulting <a href="#absolute-url">absolute + URL</a>. 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> <!-- Note that + this doesn't happen when the base URL changes. --> + + <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 --> + <!--<p>Fetching the resource must <span>delay the load + event</span> of the element's document until the final <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> has + been run.</p>--> + + </dd> + + <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> + + </dl><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> <p>The <dfn id="concept-embed-type" title="concept-embed-type">type of the content</dfn> being embedded is defined as follows:</p> @@ -17554,7 +17584,12 @@ <!-- This algorithm is a monument to bad design. Go legacy! --> - </ol><p>Whether the resource is fetched successfully or not (e.g. whether + </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> @@ -17563,14 +17598,6 @@ with error responses (e.g. HTTP 500 Internal Server Error codes can still contain plugin data).</p> - <p>When the element is created with a <code title="attr-embed-type"><a href="#attr-embed-type">type</a></code> attribute and no <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute, and whenever the <code title="attr-embed-type"><a href="#attr-embed-type">type</a></code> attribute is subsequently set, - so long as no <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> attribute is - set, and whenever the <code title="attr-embed-src"><a href="#attr-embed-src">src</a></code> - attribute is removed when the element has a <code title="attr-embed-type"><a href="#attr-embed-type">type</a></code> attribute, if the element is not - in a sandboxed browsing context, user agents 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> - </div><p>Any (namespace-less) attribute may be specified on the <code><a href="#the-embed-element">embed</a></code> element, so long as its name is <a href="#xml-compatible">XML-compatible</a> and contains no characters in the range @@ -17588,11 +17615,6 @@ <code><a href="#htmlembedelement">HTMLEmbedElement</a></code> object representing the element should expose that interface while the element is instantiated.</p> - <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> - </div><p>The <code><a href="#the-embed-element">embed</a></code> element supports <a href="#dimension-attributes">dimension attributes</a>.<div class="impl"> @@ -17671,21 +17693,28 @@ name</a>. The given value is used to name the <a href="#nested-browsing-context">nested browsing context</a>, if applicable.<div class="impl"> - <p>When the element is created, and subsequently whenever the <code title="attr-object-classid">classid</code> attribute changes or is - removed, or, if the <code title="attr-object-classid">classid</code> - attribute is not present, whenever the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute changes or is - removed, or, if neither <code title="attr-object-classid">classid</code> attribute nor the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute are present, whenever - the <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute changes or - is removed, the user agent must run the following steps to determine - what the <code><a href="#the-object-element">object</a></code> element represents:</p> <!-- Changing - the base URL doesn't trigger this. --> + <p>When the element is created, and subsequently whenever the + element is <a href="#insert-an-element-into-a-document" title="insert an element into a document">inserted + into a document</a>, <a href="#insert-an-element-into-a-document" title="insert an element into a + document">removed from a document</a>; and whenever an ancestor + <code><a href="#the-object-element">object</a></code> element changes to or from showing its + <a href="#fallback-content">fallback content</a>; and whenever the element's <code title="attr-object-classid">classid</code> attribute is set, + changed, or removed; and, when its <code title="attr-object-classid">classid</code> attribute is not present, + whenever its <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute is + set, changed, or removed; and, when neither its <code title="attr-object-classid">classid</code> attribute nor its <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute are present, whenever + its <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute is set, + changed, or removed: the user agent must run the following steps to + (re)determine what the <code><a href="#the-object-element">object</a></code> element represents:</p> + <!-- Changing the base URL doesn't trigger this. --> <ol><li> <p>If the element has an ancestor <a href="#media-element">media element</a>, or 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>, then jump to the last - step in the overall set of steps (fallback).</p> + showing its <a href="#fallback-content">fallback content</a>, or if the element is + not <a href="#in-a-document" title="in a document">in a <code>Document</code></a>, + then jump to the last step in the overall set of steps + (fallback).</p> </li> @@ -17959,7 +17988,8 @@ <li><p>(Fallback.) The <code><a href="#the-object-element">object</a></code> element <a href="#represents">represents</a> the element's children, ignoring any leading <code><a href="#the-param-element">param</a></code> element children. This is the element's - <a href="#fallback-content">fallback content</a>.</li> + <a href="#fallback-content">fallback content</a>. If the element has an instantiated + <a href="#plugin">plugin</a>, then unload it.</li> </ol><p id="object-plugin">When the algorithm above instantiates a <a href="#plugin">plugin</a>, the user agent should pass the names and values
Received on Monday, 14 September 2009 05:22:34 UTC