Skip to content

Commit

Permalink
[] (0) <iframe seamless> -- clientside inclusion of HTML documents. P…
Browse files Browse the repository at this point in the history
…eople have been asking for this for at least ten years.

git-svn-id: http://svn.whatwg.org/webapps@1637 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 19, 2008
1 parent 3417785 commit f6490f1
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 3 deletions.
101 changes: 99 additions & 2 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<h1 id=html-5>HTML 5</h1>

<h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 16 May
<h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 19 May
2008</h2>

<p>You can take part in this work. <a
Expand Down Expand Up @@ -14137,13 +14137,17 @@ the time Marco had stuck his tongue out...&lt;/p></pre>

<dd><code title=attr-iframe-name><a href="#name1">name</a></code>

<dd><code title=attr-iframe-seamless><a
href="#seamlesscode">seamless</a></code>

<dt>DOM interface:

<dd>
<pre
class=idl>interface <dfn id=htmliframeelement>HTMLIFrameElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#src2" title=dom-iframe-src>src</a>;
attribute DOMString <span title=dom-iframe-name>name</span>;<!--
attribute DOMString <span title=dom-iframe-name>name</span>;
attribute DOMString <span title=dom-iframe-seamless>seamless</span>;<!--
readonly attribute Document <span title="dom-iframe-contentDocument">contentDocument</span>;
readonly attribute <span>Window</span> <span title="dom-iframe-contentWindow">contentWindow</span>;-->
};</pre>
Expand Down Expand Up @@ -14222,6 +14226,89 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
href="#navigate" title=navigate>navigated</a>, that will further <a
href="#delays">delay the <code title=event-load>load</code> event</a>.

<p>The <dfn id=seamlesscode
title=attr-iframe-seamless><code>seamless/code></code></dfn> attribute is
a boolean attribute. When specified, it indicates that the <code><a
href="#iframe">iframe</a></code> element's <a href="#browsing1">browsing
context</a> is to be rendered in a manner that makes it appear to be part
of the containing document (seamlessly included in the parent document).
Specifically, when the attribute is set on an element and while the <a
href="#browsing1">browsing context</a>'s <a href="#active">active
document</a> has the <a href="#same-origin">same origin</a> as the
<code><a href="#iframe">iframe</a></code> element's document, or the <a
href="#browsing1">browsing context</a>'s <a href="#active">active
document</a>'s <em>URI</em> has the <a href="#same-origin">same origin</a>
as the <code><a href="#iframe">iframe</a></code> element's document, the
following requirements apply:

<ul>
<li>
<p>The user agent must set the <span>seamless browsing context</span>
flag to true for that <a href="#browsing1">browsing context</a>. This
will <a href="#seamlessLinks">cause links to open in the parent browsing
context</a>.

<li>
<p>In a CSS-supporting user agent: the user agent must add all the style
sheets that apply to the <code><a href="#iframe">iframe</a></code>
element to the cascade of the <a href="#active">active document</a> of
the <code><a href="#iframe">iframe</a></code> element's <a
href="#nested0">nested browsing context</a>, at the appropriate cascade
levels, before any style sheets specified by the document itself.

<li>
<p>In a CSS-supporting user agent: the user agent must, for the purpose
of CSS property inheritance only, treat the root element of the <a
href="#active">active document</a> of the <code><a
href="#iframe">iframe</a></code> element's <a href="#nested0">nested
browsing context</a> as being a child of the <code><a
href="#iframe">iframe</a></code> element. (Thus inherited properties on
the root element of the document in the <code><a
href="#iframe">iframe</a></code> will inherit the computed values of
those properties on the <code><a href="#iframe">iframe</a></code>
element instead of taking their initial values.)

<li>
<p>In visual media, in a CSS-supporting user agent: the user agent should
set the intrinsic width of the <code><a href="#iframe">iframe</a></code>
to the width that the element would have if it was a non-replaced
block-level element with 'width: auto'.

<li>
<p>In visual media, in a CSS-supporting user agent: the user agent should
set the intrinsic height of the <code><a
href="#iframe">iframe</a></code> to the height of the bounding box
around the content rendered in the <code><a
href="#iframe">iframe</a></code> at its current width.

<li>
<p>In speech media, the user agent should render the <a
href="#nested0">nested browsing context</a> without announcing that it
is a separate document.

<li>
<p>User agents should, in general, act as if the <a href="#active">active
document</a> of the <code><a href="#iframe">iframe</a></code>'s <a
href="#nested0">nested browsing context</a> was part of the document
that the <code><a href="#iframe">iframe</a></code> is in.</p>

<p class=example>For example if the user agent supports listing all the
links in a document, links in "seamlessly" nested documents would be
included in that list without being significantly distinguished from
links in the document itself.</p>
</ul>

<p class=big-issue>Parts of the above might get moved into the rendering
section at some point.

<p>If the attribute is not specified, or if the <a
href="#origin0">origin</a> conditions listed above are not met, then the
user agent should render the <a href="#nested0">nested browsing
context</a> in a manner that is clearly distinguishable as a separate <a
href="#browsing1">browsing context</a>, and the <span>seamless browsing
context</span> flag must be set to false for that <a
href="#browsing1">browsing context</a>.

<p>An <code><a href="#iframe">iframe</a></code> element never has <a
href="#fallback">fallback content</a>, as it will always create a nested
<a href="#browsing1">browsing context</a>, regardless of whether the
Expand Down Expand Up @@ -31836,6 +31923,16 @@ user reload must be equivalent to .reload()
following steps:

<ol>
<li id=seamlessLinks>
<p>If the <a href="#source0">source browsing context</a> is the same as
the <a href="#browsing1">browsing context</a> being navigated, and this
browsing context has its <span>seamless browsing context</span> flag
set, then find the nearest <span>ancestor browsing context</span> that
does not have its <span>seamless browsing context</span> flag set, and
continue these steps as if <em>that</em> <a href="#browsing1">browsing
context</a> was the one that was going to be <a href="#navigate"
title=navigate>navigated</a> instead.

<li>
<p>Cancel any preexisting attempt to navigate the browsing context.

Expand Down
93 changes: 92 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -12161,11 +12161,13 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<dt>Element-specific attributes:</dt>
<dd><code title="attr-iframe-src">src</code></dd>
<dd><code title="attr-iframe-name">name</code></dd>
<dd><code title="attr-iframe-seamless">seamless</code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
attribute DOMString <span title="dom-iframe-src">src</span>;
attribute DOMString <span title="dom-iframe-name">name</span>;<!--
attribute DOMString <span title="dom-iframe-name">name</span>;
attribute DOMString <span title="dom-iframe-seamless">seamless</span>;<!--
readonly attribute Document <span title="dom-iframe-contentDocument">contentDocument</span>;
readonly attribute <span>Window</span> <span title="dom-iframe-contentWindow">contentWindow</span>;-->
};</pre>
Expand Down Expand Up @@ -12237,6 +12239,85 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
title="navigate">navigated</span>, that will further <span>delay the
<code title="event-load">load</code> event</span>.</p>


<p>The <dfn title="attr-iframe-seamless"><code>seamless/code></dfn>
attribute is a boolean attribute. When specified, it indicates that
the <code>iframe</code> element's <span>browsing context</span> is
to be rendered in a manner that makes it appear to be part of the
containing document (seamlessly included in the parent
document). Specifically, when the attribute is set on an element and
while the <span>browsing context</span>'s <span>active
document</span> has the <span>same origin</span> as the
<code>iframe</code> element's document, or the <span>browsing
context</span>'s <span>active document</span>'s <em>URI</em> has the
<span>same origin</span> as the <code>iframe</code> element's
document, the following requirements apply:</p>

<ul>

<li><p>The user agent must set the <span>seamless browsing
context</span> flag to true for that <span>browsing
context</span>. This will <a href="#seamlessLinks">cause links to
open in the parent browsing context</a>.</p></li>

<li><p>In a CSS-supporting user agent: the user agent must add all
the style sheets that apply to the <code>iframe</code> element to
the cascade of the <span>active document</span> of the
<code>iframe</code> element's <span>nested browsing context</span>,
at the appropriate cascade levels, before any style sheets
specified by the document itself.</p></li>

<li><p>In a CSS-supporting user agent: the user agent must, for the
purpose of CSS property inheritance only, treat the root element of
the <span>active document</span> of the <code>iframe</code>
element's <span>nested browsing context</span> as being a child of
the <code>iframe</code> element. (Thus inherited properties on the
root element of the document in the <code>iframe</code> will
inherit the computed values of those properties on the
<code>iframe</code> element instead of taking their initial
values.)</p></li>

<li><p>In visual media, in a CSS-supporting user agent: the user agent
should set the intrinsic width of the <code>iframe</code> to the
width that the element would have if it was a non-replaced
block-level element with 'width: auto'.</p></li>

<li><p>In visual media, in a CSS-supporting user agent: the user agent
should set the intrinsic height of the <code>iframe</code> to the
height of the bounding box around the content rendered in the
<code>iframe</code> at its current width.</p></li>

<li><p>In speech media, the user agent should render the <span>nested
browsing context</span> without announcing that it is a separate
document.</p></li>

<li>

<p>User agents should, in general, act as if the <span>active
document</span> of the <code>iframe</code>'s <span>nested browsing
context</span> was part of the document that the
<code>iframe</code> is in.</p>

<p class="example">For example if the user agent supports listing
all the links in a document, links in "seamlessly" nested
documents would be included in that list without being
significantly distinguished from links in the document itself.</p>

</li>

</ul>

<p class="big-issue">Parts of the above might get moved into the
rendering section at some point.</p>

<p>If the attribute is not specified, or if the <span>origin</span>
conditions listed above are not met, then the user agent should
render the <span>nested browsing context</span> in a manner that is
clearly distinguishable as a separate <span>browsing context</span>,
and the <span>seamless browsing context</span> flag must be set to
false for that <span>browsing context</span>.</p>


<p>An <code>iframe</code> element never has <span>fallback
content</span>, as it will always create a nested <span>browsing
context</span>, regardless of whether the specified initial contents
Expand Down Expand Up @@ -29678,6 +29759,16 @@ user reload must be equivalent to .reload()

<ol>

<li id="seamlessLinks"><p>If the <span>source browsing
context</span> is the same as the <span>browsing context</span>
being navigated, and this browsing context has its <span>seamless
browsing context</span> flag set, then find the nearest
<span>ancestor browsing context</span> that does not have its
<span>seamless browsing context</span> flag set, and continue these
steps as if <em>that</em> <span>browsing context</span> was the one
that was going to be <span title="navigate">navigated</span>
instead.</p></li>

<li><p>Cancel any preexisting attempt to navigate the browsing
context.</p></li>

Expand Down

0 comments on commit f6490f1

Please sign in to comment.