Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (3) Attempt to make <iframe> loading more closely match realit…
…y. See tests in bug.

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

git-svn-id: http://svn.whatwg.org/webapps@7378 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 19, 2012
1 parent 281c1f1 commit 7159412
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 122 deletions.
77 changes: 38 additions & 39 deletions complete.html
Expand Up @@ -26558,53 +26558,46 @@ <h4 id=the-iframe-element><span class=secno>4.8.2 </span>The <dfn><code>iframe</
<code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code>
document</a>.</dd>

<dt>If the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
attribute is specified but the <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute is not</dt>
<dt>Otherwise, if the element has no <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute specified, and the
user agent is processing the <code><a href=#the-iframe-element>iframe</a></code>'s attributes for
the first time</dt>

<dd>

<ol><li><p>If the value of the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute is the empty string,
jump to the <i title="">empty</i> step below.</li>
<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-load>load</code> at the
<code><a href=#the-iframe-element>iframe</a></code> element.</p>

<li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the value of
the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute, relative
to the <code><a href=#the-iframe-element>iframe</a></code> element.</li>
</dd>

<li><p>If that is not successful, then jump to the <i title="">empty</i> step below.</li>
<dt>Otherwise</dt>

<li><p>If the resulting <a href=#absolute-url>absolute URL</a> is an
<a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string
"<code><a href=#about:blank>about:blank</a></code>", and the user agent is processing this
<code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first time, then jump to
the <i title="">empty</i> step below. (In cases other than the
first time, <code><a href=#about:blank>about:blank</a></code> is loaded
normally.)</li>
<dd>

<li><p><a href=#navigate>Navigate</a><!--DONAV iframe--> the element's
<a href=#browsing-context>browsing context</a> to the resulting <a href=#absolute-url>absolute
URL</a>.</li>
<ol><li>

</ol><p><i>Empty</i>: When the steps above require the user agent to
jump to the <i title="">empty</i> step, if the user agent is
processing this <code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first
time, then the user agent must <a href=#queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-load>load</code> at the <code><a href=#the-iframe-element>iframe</a></code> element.
(After jumping to this step, the above steps are not resumed.)
<span class=note>No <code title=event-load>load</code> event
is fired at the <code><a href=#about:blank>about:blank</a></code> document
itself.</span></p>
<p>If the value of the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
attribute is the empty string, let <var title="">url</var> be
the string "<code><a href=#about:blank>about:blank</a></code>".</p>

</dd>
<p>Otherwise, <a href=#resolve-a-url title="resolve a url">resolve</a> the
value of the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute,
relative to the <code><a href=#the-iframe-element>iframe</a></code> element.</p>

<dt>Otherwise</dt>
<p>If that is not successful, then let <var title="">url</var>
be the string "<code><a href=#about:blank>about:blank</a></code>". Otherwise, let <var title="">url</var> be the resulting <a href=#absolute-url>absolute
URL</a>.</p>

<dd>
</li>

<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-load>load</code> at the
<code><a href=#the-iframe-element>iframe</a></code> element.</p>
<li>

</dd>
<p><a href=#navigate>Navigate</a><!--DONAV iframe--> the element's
<a href=#browsing-context>browsing context</a> to <var title="">url</var>.</p>

</li>

</ol></dd>

</dl><p>Any <a href=#navigate title=navigate>navigation</a> required of the user
agent in the <a href=#process-the-iframe-attributes>process the <code>iframe</code> attributes</a>
Expand All @@ -26613,7 +26606,12 @@ <h4 id=the-iframe-element><span class=secno>4.8.2 </span>The <dfn><code>iframe</
document's <a href=#browsing-context>browsing context</a> as the <a href=#source-browsing-context>source
browsing context</a>.</p>

<p>Furthermore, if the <a href=#browsing-context>browsing context</a>'s <a href=#session-history>session
<p>Furthermore, if the <a href=#active-document>active document</a> of the element's
<a href=#browsing-context>browsing context</a> before such a <a href=#navigate title=navigate>navigation</a> was not <a href=#completely-loaded>completely
loaded</a> at the time of the new <a href=#navigate title=navigate>navigation</a>, then the <a href=#navigate title=navigate>navigation</a> must be completed with
<a href=#replacement-enabled>replacement enabled</a>.</p>

<p>Similarly, if the <a href=#browsing-context>browsing context</a>'s <a href=#session-history>session
history</a> contained only one <code><a href=#document>Document</a></code> when the
<a href=#process-the-iframe-attributes>process the <code>iframe</code> attributes</a> algorithm
was invoked, and that was the <code><a href=#about:blank>about:blank</a></code>
Expand Down Expand Up @@ -67225,10 +67223,11 @@ <h3 id=windows><span class=secno>6.1 </span>Browsing contexts</h3>
<p>When a <a href=#browsing-context>browsing context</a> is first created, it must be
created with a single <code><a href=#document>Document</a></code> in its session history,
whose <a href="#the-document's-address" title="the document's address">address</a> is
<code><a href=#about:blank>about:blank</a></code>, which is marked as being an <a href=#html-documents title="HTML documents">HTML document</a>, and whose <a href="#document's-character-encoding" title="document's character encoding">character encoding</a> is
UTF-8. The <code><a href=#document>Document</a></code> must have a single child
<code><a href=#the-html-element>html</a></code> node, which itself has a single child
<code><a href=#the-body-element>body</a></code> node.</p>
<code><a href=#about:blank>about:blank</a></code>, which is marked as being an <a href=#html-documents title="HTML documents">HTML document</a>, whose <a href="#document's-character-encoding" title="document's character encoding">character encoding</a> is
UTF-8, and which is both <a href=#ready-for-post-load-tasks>ready for post-load tasks</a> and
<a href=#completely-loaded>completely loaded</a> immediately. The
<code><a href=#document>Document</a></code> must have a single child <code><a href=#the-html-element>html</a></code>
node, which itself has a single child <code><a href=#the-body-element>body</a></code> node.</p>

<p class=note>If the <a href=#browsing-context>browsing context</a> is created
specifically to be immediately navigated, then that initial
Expand Down
77 changes: 38 additions & 39 deletions index
Expand Up @@ -26558,53 +26558,46 @@ href="?audio"&gt;audio&lt;/a&gt; test instead.)&lt;/p&gt;</pre>
<code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code>
document</a>.</dd>

<dt>If the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
attribute is specified but the <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute is not</dt>
<dt>Otherwise, if the element has no <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute specified, and the
user agent is processing the <code><a href=#the-iframe-element>iframe</a></code>'s attributes for
the first time</dt>

<dd>

<ol><li><p>If the value of the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute is the empty string,
jump to the <i title="">empty</i> step below.</li>
<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-load>load</code> at the
<code><a href=#the-iframe-element>iframe</a></code> element.</p>

<li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the value of
the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute, relative
to the <code><a href=#the-iframe-element>iframe</a></code> element.</li>
</dd>

<li><p>If that is not successful, then jump to the <i title="">empty</i> step below.</li>
<dt>Otherwise</dt>

<li><p>If the resulting <a href=#absolute-url>absolute URL</a> is an
<a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the string
"<code><a href=#about:blank>about:blank</a></code>", and the user agent is processing this
<code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first time, then jump to
the <i title="">empty</i> step below. (In cases other than the
first time, <code><a href=#about:blank>about:blank</a></code> is loaded
normally.)</li>
<dd>

<li><p><a href=#navigate>Navigate</a><!--DONAV iframe--> the element's
<a href=#browsing-context>browsing context</a> to the resulting <a href=#absolute-url>absolute
URL</a>.</li>
<ol><li>

</ol><p><i>Empty</i>: When the steps above require the user agent to
jump to the <i title="">empty</i> step, if the user agent is
processing this <code><a href=#the-iframe-element>iframe</a></code>'s attributes for the first
time, then the user agent must <a href=#queue-a-task>queue a task</a> to
<a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-load>load</code> at the <code><a href=#the-iframe-element>iframe</a></code> element.
(After jumping to this step, the above steps are not resumed.)
<span class=note>No <code title=event-load>load</code> event
is fired at the <code><a href=#about:blank>about:blank</a></code> document
itself.</span></p>
<p>If the value of the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code>
attribute is the empty string, let <var title="">url</var> be
the string "<code><a href=#about:blank>about:blank</a></code>".</p>

</dd>
<p>Otherwise, <a href=#resolve-a-url title="resolve a url">resolve</a> the
value of the <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute,
relative to the <code><a href=#the-iframe-element>iframe</a></code> element.</p>

<dt>Otherwise</dt>
<p>If that is not successful, then let <var title="">url</var>
be the string "<code><a href=#about:blank>about:blank</a></code>". Otherwise, let <var title="">url</var> be the resulting <a href=#absolute-url>absolute
URL</a>.</p>

<dd>
</li>

<p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
named <code title=event-load>load</code> at the
<code><a href=#the-iframe-element>iframe</a></code> element.</p>
<li>

</dd>
<p><a href=#navigate>Navigate</a><!--DONAV iframe--> the element's
<a href=#browsing-context>browsing context</a> to <var title="">url</var>.</p>

</li>

</ol></dd>

</dl><p>Any <a href=#navigate title=navigate>navigation</a> required of the user
agent in the <a href=#process-the-iframe-attributes>process the <code>iframe</code> attributes</a>
Expand All @@ -26613,7 +26606,12 @@ href="?audio"&gt;audio&lt;/a&gt; test instead.)&lt;/p&gt;</pre>
document's <a href=#browsing-context>browsing context</a> as the <a href=#source-browsing-context>source
browsing context</a>.</p>

<p>Furthermore, if the <a href=#browsing-context>browsing context</a>'s <a href=#session-history>session
<p>Furthermore, if the <a href=#active-document>active document</a> of the element's
<a href=#browsing-context>browsing context</a> before such a <a href=#navigate title=navigate>navigation</a> was not <a href=#completely-loaded>completely
loaded</a> at the time of the new <a href=#navigate title=navigate>navigation</a>, then the <a href=#navigate title=navigate>navigation</a> must be completed with
<a href=#replacement-enabled>replacement enabled</a>.</p>

<p>Similarly, if the <a href=#browsing-context>browsing context</a>'s <a href=#session-history>session
history</a> contained only one <code><a href=#document>Document</a></code> when the
<a href=#process-the-iframe-attributes>process the <code>iframe</code> attributes</a> algorithm
was invoked, and that was the <code><a href=#about:blank>about:blank</a></code>
Expand Down Expand Up @@ -67225,10 +67223,11 @@ END:VCARD</pre>
<p>When a <a href=#browsing-context>browsing context</a> is first created, it must be
created with a single <code><a href=#document>Document</a></code> in its session history,
whose <a href="#the-document's-address" title="the document's address">address</a> is
<code><a href=#about:blank>about:blank</a></code>, which is marked as being an <a href=#html-documents title="HTML documents">HTML document</a>, and whose <a href="#document's-character-encoding" title="document's character encoding">character encoding</a> is
UTF-8. The <code><a href=#document>Document</a></code> must have a single child
<code><a href=#the-html-element>html</a></code> node, which itself has a single child
<code><a href=#the-body-element>body</a></code> node.</p>
<code><a href=#about:blank>about:blank</a></code>, which is marked as being an <a href=#html-documents title="HTML documents">HTML document</a>, whose <a href="#document's-character-encoding" title="document's character encoding">character encoding</a> is
UTF-8, and which is both <a href=#ready-for-post-load-tasks>ready for post-load tasks</a> and
<a href=#completely-loaded>completely loaded</a> immediately. The
<code><a href=#document>Document</a></code> must have a single child <code><a href=#the-html-element>html</a></code>
node, which itself has a single child <code><a href=#the-body-element>body</a></code> node.</p>

<p class=note>If the <a href=#browsing-context>browsing context</a> is created
specifically to be immediately navigated, then that initial
Expand Down
88 changes: 44 additions & 44 deletions source
Expand Up @@ -28608,59 +28608,50 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
<code>iframe</code> <code title="attr-iframe-srcdoc">srcdoc</code>
document</span>.</p></dd>

<dt>If the <code title="attr-iframe-src">src</code>
attribute is specified but the <code
title="attr-iframe-srcdoc">srcdoc</code> attribute is not</dt>
<dt>Otherwise, if the element has no <code
title="attr-iframe-src">src</code> attribute specified, and the
user agent is processing the <code>iframe</code>'s attributes for
the first time</dt>

<dd>

<ol>
<p><span>Queue a task</span> to <span>fire a simple event</span>
named <code title="event-load">load</code> at the
<code>iframe</code> element.</p>

<li><p>If the value of the <code
title="attr-iframe-src">src</code> attribute is the empty string,
jump to the <i title="">empty</i> step below.</p></li>
</dd>

<li><p><span title="resolve a url">Resolve</span> the value of
the <code title="attr-iframe-src">src</code> attribute, relative
to the <code>iframe</code> element.</p></li>
<dt>Otherwise</dt>

<li><p>If that is not successful, then jump to the <i
title="">empty</i> step below.</p></li>
<dd>

<li><p>If the resulting <span>absolute URL</span> is an
<span>ASCII case-insensitive</span> match for the string
"<code>about:blank</code>", and the user agent is processing this
<code>iframe</code>'s attributes for the first time, then jump to
the <i title="">empty</i> step below. (In cases other than the
first time, <code>about:blank</code> is loaded
normally.)</p></li>
<ol>

<li><p><span>Navigate</span><!--DONAV iframe--> the element's
<span>browsing context</span> to the resulting <span>absolute
URL</span>.</p></li>
<li>

</ol>
<p>If the value of the <code title="attr-iframe-src">src</code>
attribute is the empty string, let <var title="">url</var> be
the string "<code>about:blank</code>".</p>

<p><i>Empty</i>: When the steps above require the user agent to
jump to the <i title="">empty</i> step, if the user agent is
processing this <code>iframe</code>'s attributes for the first
time, then the user agent must <span>queue a task</span> to
<span>fire a simple event</span> named <code
title="event-load">load</code> at the <code>iframe</code> element.
(After jumping to this step, the above steps are not resumed.)
<span class="note">No <code title="event-load">load</code> event
is fired at the <code>about:blank</code> document
itself.</span></p>
<p>Otherwise, <span title="resolve a url">resolve</span> the
value of the <code title="attr-iframe-src">src</code> attribute,
relative to the <code>iframe</code> element.</p>

</dd>
<p>If that is not successful, then let <var title="">url</var>
be the string "<code>about:blank</code>". Otherwise, let <var
title="">url</var> be the resulting <span>absolute
URL</span>.</p>

<dt>Otherwise</dt>
</li>

<dd>
<li>

<p><span>Queue a task</span> to <span>fire a simple event</span>
named <code title="event-load">load</code> at the
<code>iframe</code> element.</p>
<p><span>Navigate</span><!--DONAV iframe--> the element's
<span>browsing context</span> to <var title="">url</var>.</p>

</li>

</ol>

</dd>

Expand All @@ -28673,7 +28664,15 @@ href="?audio">audio&lt;/a> test instead.)&lt;/p></pre>
document's <span>browsing context</span> as the <span>source
browsing context</span>.</p>

<p>Furthermore, if the <span>browsing context</span>'s <span>session
<p>Furthermore, if the <span>active document</span> of the element's
<span>browsing context</span> before such a <span
title="navigate">navigation</span> was not <span>completely
loaded</span> at the time of the new <span
title="navigate">navigation</span>, then the <span
title="navigate">navigation</span> must be completed with
<span>replacement enabled</span>.</p>

<p>Similarly, if the <span>browsing context</span>'s <span>session
history</span> contained only one <code>Document</code> when the
<span>process the <code>iframe</code> attributes</span> algorithm
was invoked, and that was the <code>about:blank</code>
Expand Down Expand Up @@ -78686,11 +78685,12 @@ END:VCARD</pre>
created with a single <code>Document</code> in its session history,
whose <span title="the document's address">address</span> is
<code>about:blank</code>, which is marked as being an <span
title="HTML documents">HTML document</span>, and whose <span
title="HTML documents">HTML document</span>, whose <span
title="document's character encoding">character encoding</span> is
UTF-8. The <code>Document</code> must have a single child
<code>html</code> node, which itself has a single child
<code>body</code> node.</p>
UTF-8, and which is both <span>ready for post-load tasks</span> and
<span>completely loaded</span> immediately. The
<code>Document</code> must have a single child <code>html</code>
node, which itself has a single child <code>body</code> node.</p>

<p class="note">If the <span>browsing context</span> is created
specifically to be immediately navigated, then that initial
Expand Down

0 comments on commit 7159412

Please sign in to comment.