hixie: Shift the definition of 'document base URL' back into HTML5. (whatwg r4258)

hixie: Shift the definition of 'document base URL' back into HTML5.
(whatwg r4258)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.3400&r2=1.3401&f=h
http://html5.org/tools/web-apps-tracker?from=4257&to=4258

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.3400
retrieving revision 1.3401
diff -u -d -r1.3400 -r1.3401
--- Overview.html 21 Oct 2009 11:20:27 -0000 1.3400
+++ Overview.html 21 Oct 2009 11:25:37 -0000 1.3401
@@ -4235,10 +4235,48 @@
   algorithm defined by the Web addresses specification. <a href="#refsWEBADDRESSES">[WEBADDRESSES]</a></p>
 
   <p>The <dfn id="document-base-url">document base URL</dfn> of a <code>Document</code>
-  object is the <span>document base Web address</span> as defined by
-  the Web addresses specification. <a href="#refsWEBADDRESSES">[WEBADDRESSES]</a></p>
+  object is the <a href="#absolute-url">absolute URL</a> obtained by running these
+  substeps:</p>
 
-  <p>This specification defines the URL
+  <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">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 <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>
+
+   <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 <var title="">fallback base url</var>.</li>
+
+  </ol><p>This specification defines the URL
   <dfn id="about:legacy-compat"><code>about:legacy-compat</code></dfn> as a reserved, though
   unresolvable, <code title="">about:</code> URI. <a href="#refsABOUT">[ABOUT]</a></p>

Received on Wednesday, 21 October 2009 11:26:24 UTC