[html5] r4258 - [e] (0) Shift the definition of 'document base URL' back into HTML5. Fixing http [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Oct 21 04:38:25 PDT 2009


Author: ianh
Date: 2009-10-21 04:38:04 -0700 (Wed, 21 Oct 2009)
New Revision: 4258

Modified:
   complete.html
   index
   source
Log:
[e] (0) Shift the definition of 'document base URL' back into HTML5.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7971

Modified: complete.html
===================================================================
--- complete.html	2009-10-21 11:33:12 UTC (rev 4257)
+++ complete.html	2009-10-21 11:38:04 UTC (rev 4258)
@@ -4869,10 +4869,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>
 

Modified: index
===================================================================
--- index	2009-10-21 11:33:12 UTC (rev 4257)
+++ index	2009-10-21 11:38:04 UTC (rev 4258)
@@ -4699,10 +4699,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>
 

Modified: source
===================================================================
--- source	2009-10-21 11:33:12 UTC (rev 4257)
+++ source	2009-10-21 11:38:04 UTC (rev 4258)
@@ -4280,10 +4280,54 @@
   href="#refsWEBADDRESSES">[WEBADDRESSES]</a></p>
 
   <p>The <dfn>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 <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 <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>
+
+   <li><p><span title="resolve a URL">Resolve</span> <var
+   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 <var
+   title="">fallback base url</var>.</p></li>
+
+  </ol>
+
   <p>This specification defines the URL
   <dfn><code>about:legacy-compat</code></dfn> as a reserved, though
   unresolvable, <code title="">about:</code> URI. <a




More information about the Commit-Watchers mailing list