8000 [] (0) <iframe seamless> -- clientside inclusion of HTML documents. P… · whatwg/html@f6490f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit f6490f1

Browse files
committed
[] (0) <iframe seamless> -- clientside inclusion of HTML documents. People have been asking for this for at least ten years.
git-svn-id: http://svn.whatwg.org/webapps@1637 340c8d12-0b0e-0410-8428-c7bf67bfef74
1 parent 3417785 commit f6490f1

File tree

2 files changed

+191
-3
lines changed

2 files changed

+191
-3
lines changed

index

Lines changed: 99 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

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

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

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

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

14140+
<dd><code title=attr-iframe-seamless><a
14141+
href="#seamlesscode">seamless</a></code>
14142+
1414014143
<dt>DOM interface:
1414114144

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

14229+
<p>The <dfn id=seamlesscode
14230+
title=attr-iframe-seamless><code>seamless/code></code></dfn> attribute is
14231+
a boolean attribute. When specified, it indicates that the <code><a
14232+
href="#iframe">iframe</a></code> element's <a href="#browsing1">browsing
14233+
context</a> is to be rendered in a manner that makes it appear to be part
14234+
of the containing document (seamlessly included in the parent document).
14235+
Specifically, when the attribute is set on an element and while the <a
14236+
href="#browsing1">browsing context</a>'s <a href="#active">active
14237+
document</a> has the <a href="#same-origin">same origin</a> as the
14238+
<code><a href="#iframe">iframe</a></code> element's document, or the <a
14239+
href="#browsing1">browsing context</a>'s <a href="#active">active
14240+
document</a>'s <em>URI</em> has the <a href="#same-origin">same origin</a>
14241+
as the <code><a href="#iframe">iframe</a></code> element's document, the
14242+
following requirements apply:
14243+
14244+
<ul>
14245+
<li>
14246+
<p>The user agent must set the <span>seamless browsing context</span>
14247+
flag to true for that <a href="#browsing1">browsing context</a>. This
14248+
will <a href="#seamlessLinks">cause links to open in the parent browsing
14249+
context</a>.
14250+
14251+
<li>
14252+
<p>In a CSS-supporting user agent: the user agent must add all the style
14253+
sheets that apply to the <code><a href="#iframe">iframe</a></code>
14254+
element to the cascade of the <a href="#active">active document</a> of
14255+
the <code><a href="#iframe">iframe</a></code> element's <a
14256+
href="#nested0">nested browsing context</a>, at the appropriate cascade
14257+
levels, before any style sheets specified by the document itself.
14258+
14259+
<li>
14260+
<p>In a CSS-supporting user agent: the user agent must, for the purpose
14261+
of CSS property inheritance only, treat the root element of the <a
14262+
href="#active">active document</a> of the <code><a
14263+
href="#iframe">iframe</a></code> element's <a href="#nested0">nested
14264+
browsing context</a> as being a child of the <code><a
14265+
href="#iframe">iframe</a></code> element. (Thus inherited properties on
14266+
the root element of the document in the <code><a
14267+
href="#iframe">iframe</a></code> will inherit the computed values of
14268+
those properties on the <code><a href="#iframe">iframe</a></code>
14269+
element instead of taking their initial values.)
14270+
14271+
<li>
14272+
<p>In visual media, in a CSS-supporting user agent: the user agent should
14273+
set the intrinsic width of the <code><a href="#iframe">iframe</a></code>
14274+
to the width that the element would have if it was a non-replaced
14275+
block-level element with 'width: auto'.
14276+
14277+
<li>
14278+
<p>In visual media, in a CSS-supporting user agent: the user agent should
14279+
set the intrinsic height of the <code><a
14280+
href="#iframe">iframe</a></code> to the height of the bounding box
14281+
around the content rendered in the <code><a
14282+
href="#iframe">iframe</a></code> at its current width.
14283+
14284+
<li>
14285+
<p>In speech media, the user agent should render the <a
14286+
href="#nested0">nested browsing context</a> without announcing that it
14287+
is a separate document.
14288+
14289+
<li>
14290+
<p>User agents should, in general, act as if the <a href="#active">active
14291+
document</a> of the <code><a href="#iframe">iframe</a></code>'s <a
14292+
href="#nested0">nested browsing context</a> was part of the document
14293+
that the <code><a href="#iframe">iframe</a></code> is in.</p>
14294+
14295+
<p class=example>For example if the user agent supports listing all the
14296+
links in a document, links in "seamlessly" nested documents would be
14297+
included in that list without being significantly distinguished from
14298+
links in the document itself.</p>
14299+
</ul>
14300+
14301+
<p class=big-issue>Parts of the above might get moved into the rendering
14302+
section at some point.
14303+
14304+
<p>If the attribute is not specified, or if the <a
14305+
href="#origin0">origin</a> conditions listed above are not met, then the
14306+
user agent should render the <a href="#nested0">nested browsing
14307+
context</a> in a manner that is clearly distinguishable as a separate <a
14308+
href="#browsing1">browsing context</a>, and the <span>seamless browsing
14309+
context</span> flag must be set to false for that <a
14310+
href="#browsing1">browsing context</a>.
14311+
1422514312
<p>An <code><a href="#iframe">iframe</a></code> element never has <a
1422614313
href="#fallback">fallback content</a>, as it will always create a nested
1422714314
<a href="#browsing1">browsing context</a>, regardless of whether the
@@ -31836,6 +31923,16 @@ user reload must be equivalent to .reload()
3183631923
following steps:
3183731924

3183831925
<ol>
31926+
<li id=seamlessLinks>
31927+
<p>If the <a href="#source0">source browsing context</a> is the same as
31928+
the <a href="#browsing1">browsing context</a> being navigated, and this
31929+
browsing context has its <span>seamless browsing context</span> flag
31930+
set, then find the nearest <span>ancestor browsing context</span> that
31931+
does not have its <span>seamless browsing context</span> flag set, and
31932+
continue these steps as if <em>that</em> <a href="#browsing1">browsing
31933+
context</a> was the one that was going to be <a href="#navigate"
31934+
title=navigate>navigated</a> instead.
31935+
3183931936
<li>
3184031937
<p>Cancel any preexisting attempt to navigate the browsing context.
3184131938

source

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12161,11 +12161,13 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
1216112161
<dt>Element-specific attributes:</dt>
1216212162
<dd><code title="attr-iframe-src">src</code></dd>
1216312163
<dd><code title="attr-iframe-name">name</code></dd>
12164+
<dd><code title="attr-iframe-seamless">seamless</code></dd>
1216412165
<dt>DOM interface:</dt>
1216512166
<dd>
1216612167
<pre class="idl">interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
1216712168
attribute DOMString <span title="dom-iframe-src">src</span>;
12168-
attribute DOMString <span title="dom-iframe-name">name</span>;<!--
12169+
attribute DOMString <span title="dom-iframe-name">name</span>;
12170+
attribute DOMString <span title="dom-iframe-seamless">seamless</span>;<!--
1216912171
readonly attribute Document <span title="dom-iframe-contentDocument">contentDocument</span>;
1217012172
readonly attribute <span>Window</span> <span title="dom-iframe-contentWindow">contentWindow</span>;-->
1217112173
};</pre>
@@ -12237,6 +12239,85 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
1223712239
title="navigate">navigated</span>, that will further <span>delay the
1223812240
<code title="event-load">load</code> event</span>.</p>
1223912241

12242+
12243+
<p>The <dfn title="attr-iframe-seamless"><code>seamless/code></dfn>
12244+
attribute is a boolean attribute. When specified, it indicates that
12245+
the <code>iframe</code> element's <span>browsing context</span> is
12246+
to be rendered in a manner that makes it appear to be part of the
12247+
containing document (seamlessly included in the parent
12248+
document). Specifically, when the attribute is set on an element and
12249+
while the <span>browsing context</span>'s <span>active
12250+
document</span> has the <span>same origin</span> as the
12251+
<code>iframe</code> element's document, or the <span>browsing
12252+
context</span>'s <span>active document</span>'s <em>URI</em> has the
12253+
<span>same origin</span> as the <code>iframe</code> element's
12254+
document, the following requirements apply:</p>
12255+
12256+
<ul>
12257+
12258+
<li><p>The user agent must set the <span>seamless browsing
12259+
context</span> flag to true for that <span>browsing
12260+
context</span>. This will <a href="#seamlessLinks">cause links to
12261+
open in the parent browsing context</a>.</p></li>
12262+
12263+
<li><p>In a CSS-supporting user agent: the user agent must add all
12264+
the style sheets that apply to the <code>iframe</code> element to
12265+
the cascade of the <span>active document</span> of the
12266+
<code>iframe</code> element's <span>nested browsing context</span>,
12267+
at the appropriate cascade levels, before any style sheets
12268+
specified by the document itself.</p></li>
12269+
12270+
<li><p>In a CSS-supporting user agent: the user agent must, for the
12271+
purpose of CSS property inheritance only, treat the root element of
12272+
the <span>active document</span> of the <code>iframe</code>
12273+
element's <span>nested browsing context</span> as being a child of
12274+
the <code>iframe</code> element. (Thus inherited properties on the
12275+
root element of the document in the <code>iframe</code> will
12276+
inherit the computed values of those properties on the
12277+
<code>iframe</code> element instead of taking their initial
12278+
values.)</p></li>
12279+
12280+
<li><p>In visual media, in a CSS-supporting user agent: the user agent
12281+
should set the intrinsic width of the <code>iframe</code> to the
12282+
width that the element would have if it was a non-replaced
12283+
block-level element with 'width: auto'.</p></li>
12284+
12285+
<li><p>In visual media, in a CSS-supporting user agent: the user agent
12286+
should set the intrinsic height of the <code>iframe</code> to the
12287+
height of the bounding box around the content rendered in the
12288+
<code>iframe</code> at its current width.</p></li>
12289+
12290+
<li><p>In speech media, the user agent should render the <span>nested
12291+
browsing context</span> without announcing that it is a separate
12292+
document.</p></li>
12293+
12294+
<li>
12295+
12296+
<p>User agents should, in general, act as if the <span>active
12297+
document</span> of the <code>iframe</code>'s <span>nested browsing
12298+
context</span> was part of the document that the
12299+
<code>iframe</code> is in.</p>
12300+
12301+
<p class="example">For example if the user agent supports listing
12302+
all the links in a document, links in "seamlessly" nested
12303+
documents would be included in that list without being
12304+
significantly distinguished from links in the document itself.</p>
12305+
12306+
</li>
12307+
12308+
</ul>
12309+
12310+
<p class="big-issue">Parts of the above might get moved into the
12311+
rendering section at some point.</p>
12312+
12313+
<p>If the attribute is not specified, or if the <span>origin</span>
12314+
conditions listed above are not met, then the user agent should
12315+
render the <span>nested browsing context</span> in a manner that is
12316+
clearly distinguishable as a separate <span>browsing context</span>,
12317+
and the <span>seamless browsing context</span> flag must be set to
12318+
false for that <span>browsing context</span>.</p>
12319+
12320+
1224012321
<p>An <code>iframe</code> element never has <span>fallback
1224112322
content</span>, as it will always create a nested <span>browsing
1224212323
context</span>, regardless of whether the specified initial contents
@@ -29678,6 +29759,16 @@ user reload must be equivalent to .reload()
2967829759

2967929760
<ol>
2968029761

29762+
<li id="seamlessLinks"><p>If the <span>source browsing
29763+
context</span> is the same as the <span>browsing context</span>
29764+
being navigated, and this browsing context has its <span>seamless
29765+
browsing context</span> flag set, then find the nearest
29766+
<span>ancestor browsing context</span> that does not have its
29767+
<span>seamless browsing context</span> flag set, and continue these
29768+
steps as if <em>that</em> <span>browsing context</span> was the one
29769+
that was going to be <span title="navigate">navigated</span>
29770+
instead.</p></li>
29771+
2968129772
<li><p>Cancel any preexisting attempt to navigate the browsing
2968229773
context.</p></li>
2968329774

0 commit comments

Comments
 (0)
0