HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2711

File a bug

SVNBugCommentTime (UTC)
2711Define base URIs and document addresses for various freaky cases with about:blank.2009-01-27 09:36
Index: source
===================================================================
--- source	(revision 2710)
+++ source	(revision 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>

|