[html5] r5679 - [giow] (1) Make about:srcdoc documents have better defined handling for base URL [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Nov 12 16:01:37 PST 2010


Author: ianh
Date: 2010-11-12 16:01:33 -0800 (Fri, 12 Nov 2010)
New Revision: 5679

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Make about:srcdoc documents have better defined handling for base URL, Referer headers, and location.reload().

Modified: complete.html
===================================================================
--- complete.html	2010-11-11 02:16:02 UTC (rev 5678)
+++ complete.html	2010-11-13 00:01:33 UTC (rev 5679)
@@ -214,7 +214,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 11 November 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 12 November 2010</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -5919,6 +5919,13 @@
 
      </li>
 
+     <li><p>If the <code><a href=#document>Document</a></code> is <a href=#an-iframe-srcdoc-document>an
+     <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then
+     let <var title="">fallback base url</var> be the <a href=#document-base-url>document
+     base URL</a> of the <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing
+     context</a>'s <a href=#browsing-context-container>browsing context container</a>'s
+     <code><a href=#document>Document</a></code> instead.</li>
+
      <li><p>If there is no <code><a href=#the-base-element>base</a></code> element that is both a
      child of <a href=#the-head-element>the <code>head</code> element</a> and has an
      <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute, then the
@@ -6311,10 +6318,8 @@
 
   <ol><li>
 
-    <p>Generate the <i>address of the resource from which Request-URIs
-    are obtained</i> as required by HTTP for the <code title=http-referer>Referer</code> (sic) header from <a href="#the-document's-current-address">the
-    document's current address</a> of the appropriate
-    <code><a href=#document>Document</a></code> as given by the following list. <a href=#refsHTTP>[HTTP]</a></p>
+    <p>Let <var title="">document</var> be the appropriate
+    <code><a href=#document>Document</a></code> as given by the following list:</p>
 
     <dl class=switch><dt>When <a href=#navigate title=navigate>navigating</a></dt>
 
@@ -6330,7 +6335,26 @@
      <dd>The <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
      document">document</a>.</dd>
 
-    </dl><p>Remove any <a href=#url-fragment title=url-fragment><fragment></a>
+    </dl></li>
+
+   <li>
+
+    <p>While <var title="">document</var> is is <a href=#an-iframe-srcdoc-document>an
+    <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code>
+    document</a>, let <var title="">document</var> be <var title="">document</var>'s <a href=#browsing-context>browsing context</a>'s
+    <a href=#browsing-context-container>browsing context container</a>'s <code><a href=#document>Document</a></code>
+    instead.</p>
+
+   </li>
+
+   <li>
+
+    <p>Generate the <i>address of the resource from which Request-URIs
+    are obtained</i> as required by HTTP for the <code title=http-referer>Referer</code> (sic) header from <a href="#the-document's-current-address">the
+    document's current address</a> of <var title="">document</var>.
+    <a href=#refsHTTP>[HTTP]</a></p>
+
+    <p>Remove any <a href=#url-fragment title=url-fragment><fragment></a>
     component from the generated <i>address of the resource from which
     Request-URIs are obtained</i>.</p> <!-- RFC2616 says "The URI MUST
     NOT include a fragment." (section 14.36) -->
@@ -22211,8 +22235,8 @@
 
   <p>The <dfn id=attr-iframe-srcdoc title=attr-iframe-srcdoc><code>srcdoc</code></dfn>
   attribute gives the content of the page that the <a href=#nested-browsing-context>nested
-  browsing context</a> is to contain.  The value of the attribute
-  in is <dfn id=an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</dfn>.</p>
+  browsing context</a> is to contain. The value of the attribute is
+  the source of <dfn id=an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</dfn>.</p>
 
   <p>For <code><a href=#the-iframe-element>iframe</a></code> elements in <a href=#html-documents>HTML documents</a>,
   the attribute, if present, must have a value using <a href=#syntax>the HTML
@@ -22253,14 +22277,14 @@
   first time.</p>
 
   <p>Whenever an <code><a href=#the-iframe-element>iframe</a></code> element with a <a href=#nested-browsing-context>nested
-  browsing context</a> has its <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute set or changed,
-  the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
+  browsing context</a> has its <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute set, changed, or
+  removed, the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
   attributes</a>.</p>
 
   <p>Similarly, whenever an <code><a href=#the-iframe-element>iframe</a></code> element with a
   <a href=#nested-browsing-context>nested browsing context</a> but with no <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute specified has its
-  <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute set or changed,
-  the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
+  <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute set, changed, or
+  removed, the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
   attributes</a>.</p> <!-- It doesn't happen when the base URL is
   changed, though. -->
 
@@ -22275,7 +22299,8 @@
    context</a> to a resource whose <a href=#content-type>Content-Type</a> is
    <code><a href=#text/html>text/html</a></code>, whose <a href=#url>URL</a> is
    <code><a href=#about:srcdoc>about:srcdoc</a></code>, and whose data consists of the value of
-   the attribute.</dd>
+   the attribute. The resulting <code><a href=#document>Document</a></code> must be
+   considered <a href=#an-iframe-srcdoc-document>an <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>
@@ -58939,6 +58964,13 @@
    steps.</dd> <!-- this theoretically would have no effect but in
    practice can be useful to work around rendering bugs. -->
 
+   <dt>If the <a href=#browsing-context>browsing context</a>'s <a href=#active-document>active
+   document</a> is <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a></dt>
+
+   <dd><p><a href=#process-the-iframe-attributes title="process the iframe attributes">Reprocess the
+   <code>iframe</code> attributes</a> of the <a href=#browsing-context>browsing
+   context</a>'s <a href=#browsing-context-container>browsing context container</a>.</dd>
+
    <dt>Otherwise</dt>
 
    <dd><p><a href=#navigate>Navigate</a> the <a href=#browsing-context>browsing context</a> to

Modified: index
===================================================================
--- index	2010-11-11 02:16:02 UTC (rev 5678)
+++ index	2010-11-13 00:01:33 UTC (rev 5679)
@@ -218,7 +218,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>HTML5 (including next generation additions still in development)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 11 November 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 12 November 2010</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -5896,6 +5896,13 @@
 
      </li>
 
+     <li><p>If the <code><a href=#document>Document</a></code> is <a href=#an-iframe-srcdoc-document>an
+     <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then
+     let <var title="">fallback base url</var> be the <a href=#document-base-url>document
+     base URL</a> of the <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing
+     context</a>'s <a href=#browsing-context-container>browsing context container</a>'s
+     <code><a href=#document>Document</a></code> instead.</li>
+
      <li><p>If there is no <code><a href=#the-base-element>base</a></code> element that is both a
      child of <a href=#the-head-element>the <code>head</code> element</a> and has an
      <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute, then the
@@ -6288,10 +6295,8 @@
 
   <ol><li>
 
-    <p>Generate the <i>address of the resource from which Request-URIs
-    are obtained</i> as required by HTTP for the <code title=http-referer>Referer</code> (sic) header from <a href="#the-document's-current-address">the
-    document's current address</a> of the appropriate
-    <code><a href=#document>Document</a></code> as given by the following list. <a href=#refsHTTP>[HTTP]</a></p>
+    <p>Let <var title="">document</var> be the appropriate
+    <code><a href=#document>Document</a></code> as given by the following list:</p>
 
     <dl class=switch><dt>When <a href=#navigate title=navigate>navigating</a></dt>
 
@@ -6307,7 +6312,26 @@
      <dd>The <a href=#entry-script>entry script</a>'s <a href="#script's-document" title="script's
      document">document</a>.</dd>
 
-    </dl><p>Remove any <a href=#url-fragment title=url-fragment><fragment></a>
+    </dl></li>
+
+   <li>
+
+    <p>While <var title="">document</var> is is <a href=#an-iframe-srcdoc-document>an
+    <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code>
+    document</a>, let <var title="">document</var> be <var title="">document</var>'s <a href=#browsing-context>browsing context</a>'s
+    <a href=#browsing-context-container>browsing context container</a>'s <code><a href=#document>Document</a></code>
+    instead.</p>
+
+   </li>
+
+   <li>
+
+    <p>Generate the <i>address of the resource from which Request-URIs
+    are obtained</i> as required by HTTP for the <code title=http-referer>Referer</code> (sic) header from <a href="#the-document's-current-address">the
+    document's current address</a> of <var title="">document</var>.
+    <a href=#refsHTTP>[HTTP]</a></p>
+
+    <p>Remove any <a href=#url-fragment title=url-fragment><fragment></a>
     component from the generated <i>address of the resource from which
     Request-URIs are obtained</i>.</p> <!-- RFC2616 says "The URI MUST
     NOT include a fragment." (section 14.36) -->
@@ -22188,8 +22212,8 @@
 
   <p>The <dfn id=attr-iframe-srcdoc title=attr-iframe-srcdoc><code>srcdoc</code></dfn>
   attribute gives the content of the page that the <a href=#nested-browsing-context>nested
-  browsing context</a> is to contain.  The value of the attribute
-  in is <dfn id=an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</dfn>.</p>
+  browsing context</a> is to contain. The value of the attribute is
+  the source of <dfn id=an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</dfn>.</p>
 
   <p>For <code><a href=#the-iframe-element>iframe</a></code> elements in <a href=#html-documents>HTML documents</a>,
   the attribute, if present, must have a value using <a href=#syntax>the HTML
@@ -22230,14 +22254,14 @@
   first time.</p>
 
   <p>Whenever an <code><a href=#the-iframe-element>iframe</a></code> element with a <a href=#nested-browsing-context>nested
-  browsing context</a> has its <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute set or changed,
-  the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
+  browsing context</a> has its <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute set, changed, or
+  removed, the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
   attributes</a>.</p>
 
   <p>Similarly, whenever an <code><a href=#the-iframe-element>iframe</a></code> element with a
   <a href=#nested-browsing-context>nested browsing context</a> but with no <code title=attr-iframe-srcdoc><a href=#attr-iframe-srcdoc>srcdoc</a></code> attribute specified has its
-  <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute set or changed,
-  the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
+  <code title=attr-iframe-src><a href=#attr-iframe-src>src</a></code> attribute set, changed, or
+  removed, the user agent must <a href=#process-the-iframe-attributes>process the <code>iframe</code>
   attributes</a>.</p> <!-- It doesn't happen when the base URL is
   changed, though. -->
 
@@ -22252,7 +22276,8 @@
    context</a> to a resource whose <a href=#content-type>Content-Type</a> is
    <code><a href=#text/html>text/html</a></code>, whose <a href=#url>URL</a> is
    <code><a href=#about:srcdoc>about:srcdoc</a></code>, and whose data consists of the value of
-   the attribute.</dd>
+   the attribute. The resulting <code><a href=#document>Document</a></code> must be
+   considered <a href=#an-iframe-srcdoc-document>an <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>
@@ -58919,6 +58944,13 @@
    steps.</dd> <!-- this theoretically would have no effect but in
    practice can be useful to work around rendering bugs. -->
 
+   <dt>If the <a href=#browsing-context>browsing context</a>'s <a href=#active-document>active
+   document</a> is <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a></dt>
+
+   <dd><p><a href=#process-the-iframe-attributes title="process the iframe attributes">Reprocess the
+   <code>iframe</code> attributes</a> of the <a href=#browsing-context>browsing
+   context</a>'s <a href=#browsing-context-container>browsing context container</a>.</dd>
+
    <dt>Otherwise</dt>
 
    <dd><p><a href=#navigate>Navigate</a> the <a href=#browsing-context>browsing context</a> to

Modified: source
===================================================================
--- source	2010-11-11 02:16:02 UTC (rev 5678)
+++ source	2010-11-13 00:01:33 UTC (rev 5679)
@@ -5459,6 +5459,14 @@
 
      </li>
 
+     <li><p>If the <code>Document</code> is <span>an
+     <code>iframe</code> <code
+     title="attr-iframe-srcdoc">srcdoc</code> document</span>, then
+     let <var title="">fallback base url</var> be the <span>document
+     base URL</span> of the <code>Document</code>'s <span>browsing
+     context</span>'s <span>browsing context container</span>'s
+     <code>Document</code> instead.</p></li>
+
      <li><p>If there is no <code>base</code> element that is both a
      child of <span>the <code>head</code> element</span> and has an
      <code title="attr-base-href">href</code> attribute, then the
@@ -5932,12 +5940,8 @@
 
    <li>
 
-    <p>Generate the <i>address of the resource from which Request-URIs
-    are obtained</i> as required by HTTP for the <code
-    title="http-referer">Referer</code> (sic) header from <span>the
-    document's current address</span> of the appropriate
-    <code>Document</code> as given by the following list. <a
-    href="#refsHTTP">[HTTP]</a></p>
+    <p>Let <var title="">document</var> be the appropriate
+    <code>Document</code> as given by the following list:</p>
 
     <dl class="switch">
 
@@ -5957,6 +5961,27 @@
 
     </dl>
 
+   </li>
+
+   <li>
+
+    <p>While <var title="">document</var> is is <span>an
+    <code>iframe</code> <code title="attr-iframe-srcdoc">srcdoc</code>
+    document</span>, let <var title="">document</var> be <var
+    title="">document</var>'s <span>browsing context</span>'s
+    <span>browsing context container</span>'s <code>Document</code>
+    instead.</p>
+
+   </li>
+
+   <li>
+
+    <p>Generate the <i>address of the resource from which Request-URIs
+    are obtained</i> as required by HTTP for the <code
+    title="http-referer">Referer</code> (sic) header from <span>the
+    document's current address</span> of <var title="">document</var>.
+    <a href="#refsHTTP">[HTTP]</a></p>
+
     <p>Remove any <span title="url-fragment"><fragment></span>
     component from the generated <i>address of the resource from which
     Request-URIs are obtained</i>.</p> <!-- RFC2616 says "The URI MUST
@@ -23744,8 +23769,8 @@
 
   <p>The <dfn title="attr-iframe-srcdoc"><code>srcdoc</code></dfn>
   attribute gives the content of the page that the <span>nested
-  browsing context</span> is to contain.  The value of the attribute
-  in is <dfn>an <code>iframe</code> <code
+  browsing context</span> is to contain. The value of the attribute is
+  the source of <dfn>an <code>iframe</code> <code
   title="attr-iframe-srcdoc">srcdoc</code> document</dfn>.</p>
 
   <p>For <code>iframe</code> elements in <span>HTML documents</span>,
@@ -23793,15 +23818,15 @@
 
   <p>Whenever an <code>iframe</code> element with a <span>nested
   browsing context</span> has its <code
-  title="attr-iframe-srcdoc">srcdoc</code> attribute set or changed,
-  the user agent must <span>process the <code>iframe</code>
+  title="attr-iframe-srcdoc">srcdoc</code> attribute set, changed, or
+  removed, the user agent must <span>process the <code>iframe</code>
   attributes</span>.</p>
 
   <p>Similarly, whenever an <code>iframe</code> element with a
   <span>nested browsing context</span> but with no <code
   title="attr-iframe-srcdoc">srcdoc</code> attribute specified has its
-  <code title="attr-iframe-src">src</code> attribute set or changed,
-  the user agent must <span>process the <code>iframe</code>
+  <code title="attr-iframe-src">src</code> attribute set, changed, or
+  removed, the user agent must <span>process the <code>iframe</code>
   attributes</span>.</p> <!-- It doesn't happen when the base URL is
   changed, though. -->
 
@@ -23818,7 +23843,9 @@
    context</span> to a resource whose <span>Content-Type</span> is
    <code>text/html</code>, whose <span>URL</span> is
    <code>about:srcdoc</code>, and whose data consists of the value of
-   the attribute.</p></dd>
+   the attribute. The resulting <code>Document</code> must be
+   considered <span>an <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
@@ -66960,6 +66987,14 @@
    steps.</p></dd> <!-- this theoretically would have no effect but in
    practice can be useful to work around rendering bugs. -->
 
+   <dt>If the <span>browsing context</span>'s <span>active
+   document</span> is <span>an <code>iframe</code> <code
+   title="attr-iframe-srcdoc">srcdoc</code> document</span></dt>
+
+   <dd><p><span title="process the iframe attributes">Reprocess the
+   <code>iframe</code> attributes</span> of the <span>browsing
+   context</span>'s <span>browsing context container</span>.</p></dd>
+
    <dt>Otherwise</dt>
 
    <dd><p><span>Navigate</span> the <span>browsing context</span> to




More information about the Commit-Watchers mailing list