Skip to content

Commit

Permalink
[e] (0) Clean up how we describe the 'delay the load event' logic for…
Browse files Browse the repository at this point in the history
… loading nested iframes

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23633
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8287 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 15, 2013
1 parent 4543fb8 commit 91e72ce
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 65 deletions.
52 changes: 30 additions & 22 deletions complete.html
Expand Up @@ -66584,6 +66584,21 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr

</li>

<li>

<p>If the <a href=#browsing-context>browsing context</a> being navigated is a <a href=#nested-browsing-context>nested browsing
context</a>, then put it in the <a href=#delaying-load-events-mode>delaying <code title=event-load>load</code> events
mode</a>.</p>

<p>The user agent must take this <a href=#nested-browsing-context>nested browsing context</a> out of the <a href=#delaying-load-events-mode>delaying
<code title=event-load>load</code> events mode</a> when this <a href=#navigate title=navigate>navigation</a> algorithm later <a href=#concept-navigate-mature title=concept-navigate-mature>matures</a>, or when it terminates (whether due to having
run all the steps, or being canceled, or being aborted), whichever happens first.</p>

<!-- this is what makes <iframe> elements delay the load event of their parent browsing context
when their child browsing context is in between this step and the step that starts the parser. -->

</li>

<li>

<p>This is the step that attempts to obtain the resource, if necessary. Jump to the first
Expand Down Expand Up @@ -66724,16 +66739,7 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr

</dd>

</dl><p>If the <a href=#browsing-context>browsing context</a> is a <a href=#nested-browsing-context>nested browsing context</a>, then in the
time between this step and either the creation of a <code><a href=#document>Document</a></code> object or the <!-- XXX
bug 23633 --> <span>canceling</span> of the <a href=#navigate title=navigate>navigation</a>
algorithm<!-- /XXX bug 23633 -->, whichever happens first, the <a href=#browsing-context>browsing context</a>
must be put in the <a href=#delaying-load-events-mode>delaying <code title=event-load>load</code> events mode</a>.</p>
<!-- this is what makes <iframe> elements delay the load event of their parent browsing context
when their child browsing context is in between this step and the step that starts the parser.
-->

<p>If the steps above invoked the <a href=#fetch>fetch</a> algorith, the following requirements also
</dl><p>If the steps above invoked the <a href=#fetch>fetch</a> algorith, the following requirements also
apply:</p>

<p>If the resource is being fetched using a method other than one <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>equivalent to</a> HTTP's GET<!-- or HEAD (but that can't
Expand Down Expand Up @@ -66901,8 +66907,8 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr
described there:</p>

<dl class=switch><!-- an <span>HTML MIME type</span> --><dt>"<code><a href=#text/html>text/html</a></code>"</dt>
<dd>Follow the steps given in the <a href=#read-html title=navigate-html>HTML document</a> section, and
abort these steps.</dd>
<dd>Follow the steps given in the <a href=#read-html title=navigate-html>HTML document</a> section,
and then, once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<!-- an <span>XML MIME type</span> -->
<dt>"<code>application/xml</code>"</dt>
Expand All @@ -66912,27 +66918,28 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr
<dt>Any other type ending in "<code title="">+xml</code>" that is not an <a href=#explicitly-supported-xml-type>explicitly
supported XML type</a></dt> <!-- no need to say that the _subtype_ ends in "+xml" so long as
the "sniffed type" algorithm continues to drop parameters -->
<!--CLEANUP-->
<dd>Follow the steps given in the <a href=#read-xml title=navigate-xml>XML document</a> section. If
that section determines that the content is <em>not</em> to be displayed as a generic XML
document, then proceed to the next step in this overall set of steps. Otherwise, abort these
steps.</dd>
document, then proceed to the next step in this overall set of steps. Otherwise, once the steps given in the <a href=#read-xml title=navigate-xml>XML document</a> section have completed,
abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>"<code>text/plain</code>"</dt>
<dd>Follow the steps given in the <a href=#read-text title=navigate-text>plain text file</a> section,
and abort these steps.</dd>
and then, once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>"<code><a href=#multipart/x-mixed-replace>multipart/x-mixed-replace</a></code>"</dt>
<dd>Follow the steps given in the <a href=#read-multipart-x-mixed-replace title=navigate-multipart-x-mixed-replace>multipart/x-mixed-replace</a> section, and abort
these steps.</dd>
<dd>Follow the steps given in the <a href=#read-multipart-x-mixed-replace title=navigate-multipart-x-mixed-replace>multipart/x-mixed-replace</a> section, and then,
once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>A supported image, video, or audio type</dt>
<dd>Follow the steps given in the <a href=#read-media title=navigate-media>media</a> section, and abort
these steps.</dd>
<dd>Follow the steps given in the <a href=#read-media title=navigate-media>media</a> section, and then,
once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>A type that will use an external application to render the content in the <a href=#browsing-context>browsing
context</a></dt>
<dd>Follow the steps given in the <a href=#read-plugin title=navigate-plugin>plugin</a> section, and
abort these steps.</dd>
<dd>Follow the steps given in the <a href=#read-plugin title=navigate-plugin>plugin</a> section, and then,
once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

</dl><p>An <dfn id=explicitly-supported-xml-type>explicitly supported XML type</dfn> is one for which the user agent is configured to
use an external application to render the content (either a <a href=#plugin>plugin</a> rendering
Expand Down Expand Up @@ -66994,11 +67001,12 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr

<li id=navigate-non-Document>

<!--CLEANUP-->
<p><i>Non-document content</i>: If, given <var title="">type</var>, the new resource is to be
handled by displaying some sort of inline content, e.g. a native rendering of the content, an
error message because the specified type is not supported, or an inline prompt to allow the user
to select <a href=#dom-navigator-registercontenthandler title=dom-navigator-registerContentHandler>a registered handler</a> for the
given type, then <a href=#read-ua-inline title=navigate-ua-inline>display the inline content</a> and abort
given type, then <a href=#read-ua-inline title=navigate-ua-inline>display the inline content</a>, and then abort
these steps.</p>

<p class=note>In the case of a registered handler being used, the algorithm will be reinvoked
Expand Down
52 changes: 30 additions & 22 deletions index
Expand Up @@ -66584,6 +66584,21 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU

</li>

<li>

<p>If the <a href=#browsing-context>browsing context</a> being navigated is a <a href=#nested-browsing-context>nested browsing
context</a>, then put it in the <a href=#delaying-load-events-mode>delaying <code title=event-load>load</code> events
mode</a>.</p>

<p>The user agent must take this <a href=#nested-browsing-context>nested browsing context</a> out of the <a href=#delaying-load-events-mode>delaying
<code title=event-load>load</code> events mode</a> when this <a href=#navigate title=navigate>navigation</a> algorithm later <a href=#concept-navigate-mature title=concept-navigate-mature>matures</a>, or when it terminates (whether due to having
run all the steps, or being canceled, or being aborted), whichever happens first.</p>

<!-- this is what makes <iframe> elements delay the load event of their parent browsing context
when their child browsing context is in between this step and the step that starts the parser. -->

</li>

<li>

<p>This is the step that attempts to obtain the resource, if necessary. Jump to the first
Expand Down Expand Up @@ -66724,16 +66739,7 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU

</dd>

</dl><p>If the <a href=#browsing-context>browsing context</a> is a <a href=#nested-browsing-context>nested browsing context</a>, then in the
time between this step and either the creation of a <code><a href=#document>Document</a></code> object or the <!-- XXX
bug 23633 --> <span>canceling</span> of the <a href=#navigate title=navigate>navigation</a>
algorithm<!-- /XXX bug 23633 -->, whichever happens first, the <a href=#browsing-context>browsing context</a>
must be put in the <a href=#delaying-load-events-mode>delaying <code title=event-load>load</code> events mode</a>.</p>
<!-- this is what makes <iframe> elements delay the load event of their parent browsing context
when their child browsing context is in between this step and the step that starts the parser.
-->

<p>If the steps above invoked the <a href=#fetch>fetch</a> algorith, the following requirements also
</dl><p>If the steps above invoked the <a href=#fetch>fetch</a> algorith, the following requirements also
apply:</p>

<p>If the resource is being fetched using a method other than one <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>equivalent to</a> HTTP's GET<!-- or HEAD (but that can't
Expand Down Expand Up @@ -66901,8 +66907,8 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
described there:</p>

<dl class=switch><!-- an <span>HTML MIME type</span> --><dt>"<code><a href=#text/html>text/html</a></code>"</dt>
<dd>Follow the steps given in the <a href=#read-html title=navigate-html>HTML document</a> section, and
abort these steps.</dd>
<dd>Follow the steps given in the <a href=#read-html title=navigate-html>HTML document</a> section,
and then, once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<!-- an <span>XML MIME type</span> -->
<dt>"<code>application/xml</code>"</dt>
Expand All @@ -66912,27 +66918,28 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<dt>Any other type ending in "<code title="">+xml</code>" that is not an <a href=#explicitly-supported-xml-type>explicitly
supported XML type</a></dt> <!-- no need to say that the _subtype_ ends in "+xml" so long as
the "sniffed type" algorithm continues to drop parameters -->
<!--CLEANUP-->
<dd>Follow the steps given in the <a href=#read-xml title=navigate-xml>XML document</a> section. If
that section determines that the content is <em>not</em> to be displayed as a generic XML
document, then proceed to the next step in this overall set of steps. Otherwise, abort these
steps.</dd>
document, then proceed to the next step in this overall set of steps. Otherwise, once the steps given in the <a href=#read-xml title=navigate-xml>XML document</a> section have completed,
abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>"<code>text/plain</code>"</dt>
<dd>Follow the steps given in the <a href=#read-text title=navigate-text>plain text file</a> section,
and abort these steps.</dd>
and then, once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>"<code><a href=#multipart/x-mixed-replace>multipart/x-mixed-replace</a></code>"</dt>
<dd>Follow the steps given in the <a href=#read-multipart-x-mixed-replace title=navigate-multipart-x-mixed-replace>multipart/x-mixed-replace</a> section, and abort
these steps.</dd>
<dd>Follow the steps given in the <a href=#read-multipart-x-mixed-replace title=navigate-multipart-x-mixed-replace>multipart/x-mixed-replace</a> section, and then,
once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>A supported image, video, or audio type</dt>
<dd>Follow the steps given in the <a href=#read-media title=navigate-media>media</a> section, and abort
these steps.</dd>
<dd>Follow the steps given in the <a href=#read-media title=navigate-media>media</a> section, and then,
once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

<dt>A type that will use an external application to render the content in the <a href=#browsing-context>browsing
context</a></dt>
<dd>Follow the steps given in the <a href=#read-plugin title=navigate-plugin>plugin</a> section, and
abort these steps.</dd>
<dd>Follow the steps given in the <a href=#read-plugin title=navigate-plugin>plugin</a> section, and then,
once they have completed, abort this <a href=#navigate>navigate</a> algorithm.</dd>

</dl><p>An <dfn id=explicitly-supported-xml-type>explicitly supported XML type</dfn> is one for which the user agent is configured to
use an external application to render the content (either a <a href=#plugin>plugin</a> rendering
Expand Down Expand Up @@ -66994,11 +67001,12 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU

<li id=navigate-non-Document>

<!--CLEANUP-->
<p><i>Non-document content</i>: If, given <var title="">type</var>, the new resource is to be
handled by displaying some sort of inline content, e.g. a native rendering of the content, an
error message because the specified type is not supported, or an inline prompt to allow the user
to select <a href=#dom-navigator-registercontenthandler title=dom-navigator-registerContentHandler>a registered handler</a> for the
given type, then <a href=#read-ua-inline title=navigate-ua-inline>display the inline content</a> and abort
given type, then <a href=#read-ua-inline title=navigate-ua-inline>display the inline content</a>, and then abort
these steps.</p>

<p class=note>In the case of a registered handler being used, the algorithm will be reinvoked
Expand Down
52 changes: 31 additions & 21 deletions source
Expand Up @@ -74161,6 +74161,23 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O

</li>

<li>

<p>If the <span>browsing context</span> being navigated is a <span>nested browsing
context</span>, then put it in the <span>delaying <code data-x="event-load">load</code> events
mode</span>.</p>

<p>The user agent must take this <span>nested browsing context</span> out of the <span>delaying
<code data-x="event-load">load</code> events mode</span> when this <span
data-x="navigate">navigation</span> algorithm later <span
data-x="concept-navigate-mature">matures</span>, or when it terminates (whether due to having
run all the steps, or being canceled, or being aborted), whichever happens first.</p>

<!-- this is what makes <iframe> elements delay the load event of their parent browsing context
when their child browsing context is in between this step and the step that starts the parser. -->

</li>

<li>

<p>This is the step that attempts to obtain the resource, if necessary. Jump to the first
Expand Down Expand Up @@ -74322,15 +74339,6 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O

</dl>

<p>If the <span>browsing context</span> is a <span>nested browsing context</span>, then in the
time between this step and either the creation of a <code>Document</code> object or the <!-- XXX
bug 23633 --> <span>canceling</span> of the <span data-x="navigate">navigation</span>
algorithm<!-- /XXX bug 23633 -->, whichever happens first, the <span>browsing context</span>
must be put in the <span>delaying <code data-x="event-load">load</code> events mode</span>.</p>
<!-- this is what makes <iframe> elements delay the load event of their parent browsing context
when their child browsing context is in between this step and the step that starts the parser.
-->

<p>If the steps above invoked the <span>fetch</span> algorith, the following requirements also
apply:</p>

Expand Down Expand Up @@ -74516,8 +74524,8 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O

<!-- an <span>HTML MIME type</span> -->
<dt>"<code>text/html</code>"</dt>
<dd>Follow the steps given in the <span data-x="navigate-html">HTML document</span> section, and
abort these steps.</dd>
<dd>Follow the steps given in the <span data-x="navigate-html">HTML document</span> section,
and then, once they have completed, abort this <span>navigate</span> algorithm.</dd>

<!-- an <span>XML MIME type</span> -->
<dt>"<code>application/xml</code>"</dt>
Expand All @@ -74527,28 +74535,29 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<dt>Any other type ending in "<code data-x="">+xml</code>" that is not an <span>explicitly
supported XML type</span></dt> <!-- no need to say that the _subtype_ ends in "+xml" so long as
the "sniffed type" algorithm continues to drop parameters -->
<!--CLEANUP-->
<dd>Follow the steps given in the <span data-x="navigate-xml">XML document</span> section. If
that section determines that the content is <em>not</em> to be displayed as a generic XML
document, then proceed to the next step in this overall set of steps. Otherwise, abort these
steps.</dd>
document, then proceed to the next step in this overall set of steps. Otherwise, once the steps given in the <span data-x="navigate-xml">XML document</span> section have completed,
abort this <span>navigate</span> algorithm.</dd>

<dt>"<code>text/plain</code>"</dt>
<dd>Follow the steps given in the <span data-x="navigate-text">plain text file</span> section,
and abort these steps.</dd>
and then, once they have completed, abort this <span>navigate</span> algorithm.</dd>

<dt>"<code>multipart/x-mixed-replace</code>"</dt>
<dd>Follow the steps given in the <span
data-x="navigate-multipart-x-mixed-replace">multipart/x-mixed-replace</span> section, and abort
these steps.</dd>
data-x="navigate-multipart-x-mixed-replace">multipart/x-mixed-replace</span> section, and then,
once they have completed, abort this <span>navigate</span> algorithm.</dd>

<dt>A supported image, video, or audio type</dt>
<dd>Follow the steps given in the <span data-x="navigate-media">media</span> section, and abort
these steps.</dd>
<dd>Follow the steps given in the <span data-x="navigate-media">media</span> section, and then,
once they have completed, abort this <span>navigate</span> algorithm.</dd>

<dt>A type that will use an external application to render the content in the <span>browsing
context</span></dt>
<dd>Follow the steps given in the <span data-x="navigate-plugin">plugin</span> section, and
abort these steps.</dd>
<dd>Follow the steps given in the <span data-x="navigate-plugin">plugin</span> section, and then,
once they have completed, abort this <span>navigate</span> algorithm.</dd>

</dl>

Expand Down Expand Up @@ -74619,11 +74628,12 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O

<li id="navigate-non-Document">

<!--CLEANUP-->
<p><i>Non-document content</i>: If, given <var data-x="">type</var>, the new resource is to be
handled by displaying some sort of inline content, e.g. a native rendering of the content, an
error message because the specified type is not supported, or an inline prompt to allow the user
to select <span data-x="dom-navigator-registerContentHandler">a registered handler</span> for the
given type, then <span data-x="navigate-ua-inline">display the inline content</span> and abort
given type, then <span data-x="navigate-ua-inline">display the inline content</span>, and then abort
these steps.</p>

<p class="note">In the case of a registered handler being used, the algorithm will be reinvoked
Expand Down

0 comments on commit 91e72ce

Please sign in to comment.