[html5] r2711 - [] (0) Define base URIs and document addresses for various freaky cases with abo [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jan 27 01:36:27 PST 2009


Author: ianh
Date: 2009-01-27 01:36:27 -0800 (Tue, 27 Jan 2009)
New Revision: 2711

Modified:
   index
   source
Log:
[] (0) Define base URIs and document addresses for various freaky cases with about:blank.

Modified: index
===================================================================
--- index	2009-01-27 07:27:33 UTC (rev 2710)
+++ index	2009-01-27 09:36:27 UTC (rev 2711)
@@ -4050,23 +4050,43 @@
     the <a href=#absolute-url>absolute URL</a> obtained by running these
     substeps:</p>
 
-    <ol><li><p>If there is no <code><a href=#the-base-element>base</a></code> element that is both a
+    <ol><li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
+     document's address</a>.</li>
+
+     <li>
+
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+      <!-- XXX this should be tested in the case of a browsing context
+      that was navigated to about:blank after having been elsewhere,
+      as opposed to the about:blank used at the time of the browsing
+      context's creation. -->
+
+      <p>If <var title="">fallback base url</var> is
+      <code><a href=#about:blank>about:blank</a></code>, and the <code>Document</code>'s
+      <a href=#browsing-context>browsing context</a> has a <a href=#creator-browsing-context>creator browsing
+      context</a>, then let <var title="">fallback base url</var>
+      be the <a href=#document-base-url>document base URL</a> of the <a href=#creator-document>creator
+      <code>Document</code></a> instead.</p>
+
+     </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-0>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
-     <a href=#document-base-url>document base URL</a> is <a href="#the-document's-address">the document's
-     address</a>.</li>
+     <a href=#document-base-url>document base URL</a> is <var title="">fallback base
+     url</var>.</li>
 
      <li><p>Otherwise, let <var title="">url</var> be the value of the
-     <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute of the first such
-     element.</li>
+     <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute of the first
+     such element.</li>
 
-     <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> <var title="">url</var> relative to <a href="#the-document's-address">the document's
-     address</a> (thus, the <code><a href=#the-base-element>base</a></code> <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute isn't affected by
+     <li><p><a href=#resolve-a-url title="resolve a URL">Resolve</a> <var title="">url</var> relative to <var title="">fallback base
+     url</var> (thus, the <code><a href=#the-base-element>base</a></code> <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute isn't affected by
      <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes).</li>
 
      <li><p>The <a href=#document-base-url>document base URL</a> is the result of the
-     previous step if it was successful; otherwise it is <a href="#the-document's-address">the
-     document's address</a>.</li>
+     previous step if it was successful; otherwise it is <var title="">fallback base url</var>.</li>
 
     </ol></li>
 
@@ -33340,6 +33360,18 @@
   data mining tools are likely to never instantiate browsing
   contexts.</p>
 
+  <p>A <a href=#browsing-context>browsing context</a> can have a <dfn id=creator-browsing-context>creator browsing
+  context</dfn>, the <a href=#browsing-context>browsing context</a> that was
+  responsible for its creation. Unless otherwise specified, a
+  <a href=#browsing-context>browsing context</a> has no <a href=#creator-browsing-context>creator browsing
+  context</a>.</p>
+
+  <p>If a <a href=#browsing-context>browsing context</a> <var title="">A</var> has a
+  <a href=#creator-browsing-context>creator browsing context</a>, then the
+  <code>Document</code> that was the <a href=#active-document>active document</a> of
+  that <a href=#creator-browsing-context>creator browsing context</a> at the time <var title="">A</var> was created is the <dfn id=creator-document>creator
+  <code>Document</code></dfn>.</p>
+
   <p>The main <a href=#view>view</a> through which a user primarily
   interacts with a user agent is the <dfn id=default-view>default view</dfn>.</p>
 
@@ -33359,38 +33391,18 @@
 
   <p id=about-blank-origin>The <a href=#origin-0>origin</a> of the
   <code><a href=#about:blank>about:blank</a></code> <code>Document</code> is set when the
-  <code>Document</code> is created, in a manner dependent on whether
-  the <a href=#browsing-context>browsing context</a> created is a <a href=#nested-browsing-context>nested browsing
-  context</a>, as follows:
+  <code>Document</code> is created. If the new <a href=#browsing-context>browsing
+  context</a> has a <a href=#creator-browsing-context>creator browsing context</a>, then the
+  <a href=#origin-0>origin</a> of the <code><a href=#about:blank>about:blank</a></code>
+  <code>Document</code> is the <a href=#origin-0>origin</a> of the
+  <a href=#creator-document>creator <code>Document</code></a>. Otherwise, the
+  <a href=#origin-0>origin</a> of the <code><a href=#about:blank>about:blank</a></code>
+  <code>Document</code> is a globally unique identifier assigned when
+  the new <a href=#browsing-context>browsing context</a> is created.</p>
 
-  <dl class=switch><dt>If the new <a href=#browsing-context>browsing context</a> is a <a href=#nested-browsing-context>nested
-   browsing context</a></dt>
 
-   <dd>The <a href=#origin-0>origin</a> of the <code><a href=#about:blank>about:blank</a></code>
-   <code>Document</code> is the <a href=#origin-0>origin</a> of the
-   <a href=#active-document>active document</a> of the new <a href=#browsing-context>browsing
-   context</a>'s <a href=#parent-browsing-context>parent browsing context</a> at the time
-   of its creation.</dd>
+  <h4 id=nested-browsing-contexts><span class=secno>5.1.1 </span>Nested browsing contexts</h4>
 
-
-   <dt>If the new <a href=#browsing-context>browsing context</a> is an <a href=#auxiliary-browsing-context>auxiliary
-   browsing context</a></dt>
-
-   <dd>The <a href=#origin-0>origin</a> of the <code><a href=#about:blank>about:blank</a></code>
-   <code>Document</code> is the <a href=#origin-0>origin</a> of the
-   <a href=#active-document>active document</a> of the new <a href=#browsing-context>browsing
-   context</a>'s <a href=#opener-browsing-context>opener browsing context</a> at the time
-   of the new browsing context's creation.</dd>
-
-
-   <dt>Otherwise</dt>
-
-   <dd>The <a href=#origin-0>origin</a> of the <code><a href=#about:blank>about:blank</a></code>
-   <code>Document</code> is a globally unique identifier assigned when
-   the new <a href=#browsing-context>browsing context</a> is created.</dd>
-
-  </dl><h4 id=nested-browsing-contexts><span class=secno>5.1.1 </span>Nested browsing contexts</h4>
-
   <p>Certain elements (for example, <code><a href=#the-iframe-element>iframe</a></code> elements) can
   instantiate further <a href=#browsing-context title="browsing context">browsing
   contexts</a>. These are called <dfn id=nested-browsing-context title="nested browsing
@@ -33503,6 +33515,8 @@
   available.</p>
 
 
+
+
   <h4 id=secondary-browsing-contexts><span class=secno>5.1.3 </span>Secondary browsing contexts</h4>
 
   <p>User agents may support <dfn id=secondary-browsing-context title="secondary browsing
@@ -35057,6 +35071,19 @@
 
      <dd>
 
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+      <p>Let <var title="">address</var> be the <a href="#the-document's-address" title="the
+      document's address">address</a> of the <a href=#active-document>active
+      document</a> of the <a href=#browsing-context>browsing context</a> being
+      navigated.</p>
+
+      <p>If <var title="">address</var> is <code><a href=#about:blank>about:blank</a></code>,
+      and the <a href=#browsing-context>browsing context</a> being navigated has a
+      <a href=#creator-browsing-context>creator browsing context</a>, then let <var title="">address</var> be the <a href="#the-document's-address" title="the document's
+      address">address</a> of the <a href=#creator-document>creator
+      <code>Document</code></a> instead.</p>
+
       <p><a href=#create-a-script-from-a-node title="create a script from a node">Create a
       script</a> from the <code>Document</code> node of the
       <a href=#active-document>active document</a>, using the aforementioned script
@@ -35068,7 +35095,7 @@
 
       <p>When it comes time to <a href="#set-the-document's-address">set the document's address</a>
       in the <a href=#navigate title=navigate>navigation algorithm</a>, use
-      the <a href="#script's-base-url">script's base URL</a> as the <a href=#override-url>override
+      <var title="">address</var> as the <a href=#override-url>override
       URL</a>.</p>
 
      </dd>

Modified: source
===================================================================
--- source	2009-01-27 07:27:33 UTC (rev 2710)
+++ source	2009-01-27 09:36:27 UTC (rev 2711)
@@ -3612,25 +3612,46 @@
 
     <ol>
 
+     <li><p>Let <var title="">fallback base url</var> be <span>the
+     document's address</span>.</p></li>
+
+     <li>
+
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+      <!-- XXX this should be tested in the case of a browsing context
+      that was navigated to about:blank after having been elsewhere,
+      as opposed to the about:blank used at the time of the browsing
+      context's creation. -->
+
+      <p>If <var title="">fallback base url</var> is
+      <code>about:blank</code>, and the <code>Document</code>'s
+      <span>browsing context</span> has a <span>creator browsing
+      context</span>, then let <var title="">fallback base url</var>
+      be the <span>document base URL</span> of the <span>creator
+      <code>Document</code></span> 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
-     <span>document base URL</span> is <span>the document's
-     address</span>.</p></li>
+     <span>document base URL</span> is <var title="">fallback base
+     url</var>.</p></li>
 
      <li><p>Otherwise, let <var title="">url</var> be the value of the
-     <code title="attr-base-href">href</code> attribute of the first such
-     element.</p></li>
+     <code title="attr-base-href">href</code> attribute of the first
+     such element.</p></li>
 
      <li><p><span title="resolve a URL">Resolve</span> <var
-     title="">url</var> relative to <span>the document's
-     address</span> (thus, the <code>base</code> <code
+     title="">url</var> relative to <var title="">fallback base
+     url</var> (thus, the <code>base</code> <code
      title="attr-base-href">href</code> attribute isn't affected by
      <code title="attr-xml-base">xml:base</code> attributes).</p></li>
 
      <li><p>The <span>document base URL</span> is the result of the
-     previous step if it was successful; otherwise it is <span>the
-     document's address</span>.</p></li>
+     previous step if it was successful; otherwise it is <var
+     title="">fallback base url</var>.</p></li>
 
     </ol>
 
@@ -37850,6 +37871,19 @@
   data mining tools are likely to never instantiate browsing
   contexts.</p>
 
+  <p>A <span>browsing context</span> can have a <dfn>creator browsing
+  context</dfn>, the <span>browsing context</span> that was
+  responsible for its creation. Unless otherwise specified, a
+  <span>browsing context</span> has no <span>creator browsing
+  context</span>.</p>
+
+  <p>If a <span>browsing context</span> <var title="">A</var> has a
+  <span>creator browsing context</span>, then the
+  <code>Document</code> that was the <span>active document</span> of
+  that <span>creator browsing context</span> at the time <var
+  title="">A</var> was created is the <dfn>creator
+  <code>Document</code></dfn>.</p>
+
   <p>The main <span>view</span> through which a user primarily
   interacts with a user agent is the <dfn>default view</dfn>.</p>
 
@@ -37873,41 +37907,16 @@
 
   <p id="about-blank-origin">The <span>origin</span> of the
   <code>about:blank</code> <code>Document</code> is set when the
-  <code>Document</code> is created, in a manner dependent on whether
-  the <span>browsing context</span> created is a <span>nested browsing
-  context</span>, as follows:
+  <code>Document</code> is created. If the new <span>browsing
+  context</span> has a <span>creator browsing context</span>, then the
+  <span>origin</span> of the <code>about:blank</code>
+  <code>Document</code> is the <span>origin</span> of the
+  <span>creator <code>Document</code></span>. Otherwise, the
+  <span>origin</span> of the <code>about:blank</code>
+  <code>Document</code> is a globally unique identifier assigned when
+  the new <span>browsing context</span> is created.</p>
 
-  <dl class="switch">
 
-   <dt>If the new <span>browsing context</span> is a <span>nested
-   browsing context</span></dt>
-
-   <dd>The <span>origin</span> of the <code>about:blank</code>
-   <code>Document</code> is the <span>origin</span> of the
-   <span>active document</span> of the new <span>browsing
-   context</span>'s <span>parent browsing context</span> at the time
-   of its creation.</dd>
-
-
-   <dt>If the new <span>browsing context</span> is an <span>auxiliary
-   browsing context</span></dt>
-
-   <dd>The <span>origin</span> of the <code>about:blank</code>
-   <code>Document</code> is the <span>origin</span> of the
-   <span>active document</span> of the new <span>browsing
-   context</span>'s <span>opener browsing context</span> at the time
-   of the new browsing context's creation.</dd>
-
-
-   <dt>Otherwise</dt>
-
-   <dd>The <span>origin</span> of the <code>about:blank</code>
-   <code>Document</code> is a globally unique identifier assigned when
-   the new <span>browsing context</span> is created.</dd>
-
-  </dl>
-
-
   <h4>Nested browsing contexts</h4>
 
   <p>Certain elements (for example, <code>iframe</code> elements) can
@@ -38038,6 +38047,8 @@
   available.</p>
 
 
+
+
   <h4>Secondary browsing contexts</h4>
 
   <p>User agents may support <dfn title="secondary browsing
@@ -39838,6 +39849,20 @@
 
      <dd>
 
+      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+      <p>Let <var title="">address</var> be the <span title="the
+      document's address">address</span> of the <span>active
+      document</span> of the <span>browsing context</span> being
+      navigated.</p>
+
+      <p>If <var title="">address</var> is <code>about:blank</code>,
+      and the <span>browsing context</span> being navigated has a
+      <span>creator browsing context</span>, then let <var
+      title="">address</var> be the <span title="the document's
+      address">address</span> of the <span>creator
+      <code>Document</code></span> instead.</p>
+
       <p><span title="create a script from a node">Create a
       script</span> from the <code>Document</code> node of the
       <span>active document</span>, using the aforementioned script
@@ -39850,7 +39875,7 @@
 
       <p>When it comes time to <span>set the document's address</span>
       in the <span title="navigate">navigation algorithm</span>, use
-      the <span>script's base URL</span> as the <span>override
+      <var title="">address</var> as the <span>override
       URL</span>.</p>
 
      </dd>




More information about the Commit-Watchers mailing list