HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2711Define base URIs and document addresses for various freaky cases with about:blank.2009-01-27 09:36
@@ -3605,39 +3605,60 @@
     dynamically using script. (Such scripts would not be conforming,
     however, as <code title="attr-xml-base">xml:base</code> attributes
     are not allowed in <span>HTML documents</span>.)</p>
 
     <p>The <dfn>document base URL</dfn> of a <code>Document</code> is
     the <span>absolute URL</span> obtained by running these
     substeps:</p>
 
     <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>
 
    </li>
 
    <li><p><span title="parse a URL">Parse</span> <var
    title="">url</var> into its component parts.</p></li>
 
    <li>
 
@@ -37843,20 +37864,33 @@ explain that only direct children of the <menu> matter
   becomes evident, that of the print media. The two views always share
   the same underlying <code>Document</code>, but they have a different
   presentation of that document. A speech browser also establishes a
   browsing context, one with a view in the speech media.</p>
 
   <p class="note">A <code>Document</code> does not necessarily have a
   <span>browsing context</span> associated with it. In particular,
   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>
 
   <p class="note">The <span>default view</span> of a
   <code>Document</code> is given by the <code
   title="">defaultView</code> attribute on the <code>Document</code>
   object's <code>DocumentView</code> interface. <a
   href="#refsDOM3VIEWS">[DOM3VIEWS]</a></p>
 
   <p>When a <span>browsing context</span> is first created, it must be
@@ -37866,53 +37900,28 @@ explain that only direct children of the <menu> matter
   title="HTML documents">HTML document</span>, and whose <span
   title="document's character encoding">character encoding</span> is
   UTF-8. The <code>Document</code> must have a single child
   <code>html</code> node, which itself has a single child
   <code>body</code> node. If the <span>browsing context</span> is
   created specifically to be immediately navigated, then that initial
   navigation will have <span>replacement enabled</span>.</p>
 
   <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:
-
-  <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>
+  <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>
 
 
   <h4>Nested browsing contexts</h4>
 
   <p>Certain elements (for example, <code>iframe</code> elements) can
   instantiate further <span title="browsing context">browsing
   contexts</span>. These are called <dfn title="nested browsing
   context">nested browsing contexts</dfn>. If a browsing context <var
   title="">P</var> has an element <var title="">E</var> in one of its
   <code>Document</code>s <var title="">D</var> that nests another
@@ -38031,20 +38040,22 @@ explain that only direct children of the <menu> matter
   <h5>Navigating auxiliary browsing contexts in the DOM</h5>
 
   <p>The <dfn title="dom-opener"><code>opener</code></dfn> DOM
   attribute on the <code>Window</code> object must return the
   <code>Window</code> object of the <span>browsing context</span> from
   which the current browsing context was created (its <span>opener
   browsing context</span>), if there is one and it is still
   available.</p>
 
 
+
+
   <h4>Secondary browsing contexts</h4>
 
   <p>User agents may support <dfn title="secondary browsing
   context">secondary browsing contexts</dfn>, which are <span
   title="browsing context">browsing contexts</span> that form part of
   the user agent's interface, apart from the main content area.</p>
 
 
   <h4>Security</h4>
 
@@ -39831,33 +39842,47 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
     <dl>
 
      <dt>If a <span>browsing context</span> is being <span
      title="navigate">navigated</span> to a <code>javascript:</code>
      URL, and the <span>active document</span> of that browsing
      context has the <span>same origin</span> as the script given by
      that URL</dt>
 
      <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
       source, and assuming the scripting language is JavaScript.</p>
 
       <p>Let <var title="">result</var> be the return value of the
       <i>initial code entry-point</i> of this <span
       title="concept-script">script</span>. If an exception was
       raised, let <var title="">result</var> be void instead.</p>
 
       <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>
 
      <dt>If the <code>Document</code> object of the element,
      attribute, or style sheet from which the <code>javascript:</code>
      URL was reached has an associated <span>browsing
      context</span></dt>
 
      <dd>

|