[html5] r7266 - [giow] (0) Update handling of the <base>.href IDL attribute and clarify how 'doc [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Aug 24 11:52:52 PDT 2012


Author: ianh
Date: 2012-08-24 11:52:50 -0700 (Fri, 24 Aug 2012)
New Revision: 7266

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Update handling of the <base>.href IDL attribute and clarify how 'document's base URL' is defined.
Affected topics: HTML, WebSocket API

Modified: complete.html
===================================================================
--- complete.html	2012-08-24 18:06:12 UTC (rev 7265)
+++ complete.html	2012-08-24 18:52:50 UTC (rev 7266)
@@ -358,10 +358,11 @@
     <ol>
      <li><a href=#terminology-0><span class=secno>2.6.1 </span>Terminology</a></li>
      <li><a href=#parsing-urls><span class=secno>2.6.2 </span>Parsing URLs</a></li>
-     <li><a href=#resolving-urls><span class=secno>2.6.3 </span>Resolving URLs</a></li>
-     <li><a href=#url-manipulation-and-creation><span class=secno>2.6.4 </span>URL manipulation and creation</a></li>
-     <li><a href=#dynamic-changes-to-base-urls><span class=secno>2.6.5 </span>Dynamic changes to base URLs</a></li>
-     <li><a href=#interfaces-for-url-manipulation><span class=secno>2.6.6 </span>Interfaces for URL manipulation</a></ol></li>
+     <li><a href=#base-urls><span class=secno>2.6.3 </span>Base URLs</a></li>
+     <li><a href=#resolving-urls><span class=secno>2.6.4 </span>Resolving URLs</a></li>
+     <li><a href=#url-manipulation-and-creation><span class=secno>2.6.5 </span>URL manipulation and creation</a></li>
+     <li><a href=#dynamic-changes-to-base-urls><span class=secno>2.6.6 </span>Dynamic changes to base URLs</a></li>
+     <li><a href=#interfaces-for-url-manipulation><span class=secno>2.6.7 </span>Interfaces for URL manipulation</a></ol></li>
    <li><a href=#fetching-resources><span class=secno>2.7 </span>Fetching resources</a>
     <ol>
      <li><a href=#concept-http-equivalent><span class=secno>2.7.1 </span>Protocol concepts</a></li>
@@ -7669,8 +7670,62 @@
   </div>
 
 
-  <h4 id=resolving-urls><span class=secno>2.6.3 </span>Resolving URLs</h4>
+  <h4 id=base-urls><span class=secno>2.6.3 </span>Base URLs</h4>
 
+  <p>The <dfn id=fallback-base-url>fallback base URL</dfn> of a <code><a href=#document>Document</a></code>
+  object is the <a href=#absolute-url>absolute URL</a> obtained by running these
+  substeps:</p>
+
+  <ol><li><p>If the <code><a href=#document>Document</a></code> is <a href=#an-iframe-srcdoc-document>an <code>iframe</code>
+   <code title=attr-iframe-srcdoc>srcdoc</code> document</a>,
+   then return the <a href=#document-base-url>document base URL</a> of the
+   <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a>'s
+   <a href=#browsing-context-container>browsing context container</a>'s <code><a href=#document>Document</a></code> and
+   abort these steps.</li>
+
+   <li>
+
+    <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+    <!-- 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 <a href="#the-document's-address">the document's address</a> is
+    <code><a href=#about:blank>about:blank</a></code>, and the <code><a href=#document>Document</a></code>'s
+    <a href=#browsing-context>browsing context</a> has a <a href=#creator-browsing-context>creator browsing
+    context</a>, then return the <a href=#document-base-url>document base URL</a> of
+    the <a href=#creator-document>creator <code>Document</code></a>, and abort these
+    steps.</p>
+
+   </li>
+
+   <!-- http://www.hixie.ch/tests/adhoc/dom/level0/history/pushState/001/ -->
+
+   <li><p>Return <a href="#the-document's-address">the document's address</a>.</li>
+
+  </ol><p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
+  object is the <a href=#absolute-url>absolute URL</a> obtained by running these
+  substeps:</p>
+
+  <ol><li><p>Let <var title="">fallback base url</var> be the
+   <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>.</li>
+
+   <li><p>If there is no <code><a href=#the-base-element>base</a></code> element that 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>; abort these steps. 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><h4 id=resolving-urls><span class=secno>2.6.4 </span>Resolving URLs</h4>
+
   <p>Resolving a URL is the process of taking a relative URL and
   obtaining the absolute URL that it implies.</p>
 
@@ -7731,53 +7786,8 @@
     however, as <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes
     are not allowed in <a href=#html-documents>HTML documents</a>.)</p>
 
-    <p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
-    object is the <a href=#absolute-url>absolute URL</a> obtained by running these
-    substeps:</p>
+   </li>
 
-    <ol><li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
-     document's address</a>.</li>
-     <!-- http://www.hixie.ch/tests/adhoc/dom/level0/history/pushState/001/ -->
-
-     <li>
-
-      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
-
-      <!-- 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><a href=#document>Document</a></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 the <code><a href=#document>Document</a></code> is <a href=#an-iframe-srcdoc-document>an
-     <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then
-     let <var title="">fallback base url</var> be the <a href=#document-base-url>document
-     base URL</a> of the <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing
-     context</a>'s <a href=#browsing-context-container>browsing context container</a>'s
-     <code><a href=#document>Document</a></code> instead.</li>
-
-     <li><p>If there is no <code><a href=#the-base-element>base</a></code> element that 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>; abort these steps. 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></li>
-
    <li><p><a href=#parse-a-url title="parse a URL">Parse</a> <var title="">url</var> into its component parts.</li>
 
    <li>
@@ -7906,7 +7916,7 @@
 
   <div class=impl>
 
-  <h4 id=url-manipulation-and-creation><span class=secno>2.6.4 </span>URL manipulation and creation</h4>
+  <h4 id=url-manipulation-and-creation><span class=secno>2.6.5 </span>URL manipulation and creation</h4>
 
   <p>To <dfn id=fragment-escaped title=fragment-escaped>fragment-escape</dfn> a string
   <var title="">input</var>, a user agent must run the following
@@ -7969,7 +7979,7 @@
 
   <div class=impl>
 
-  <h4 id=dynamic-changes-to-base-urls><span class=secno>2.6.5 </span>Dynamic changes to base URLs</h4>
+  <h4 id=dynamic-changes-to-base-urls><span class=secno>2.6.6 </span>Dynamic changes to base URLs</h4>
 
   <p>When an <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attribute is
   set, changed, or removed, the attribute's element, and all
@@ -8038,7 +8048,7 @@
 
 
 <!--TOPIC:DOM APIs-->
-  <h4 id=interfaces-for-url-manipulation><span class=secno>2.6.6 </span>Interfaces for URL manipulation</h4>
+  <h4 id=interfaces-for-url-manipulation><span class=secno>2.6.7 </span>Interfaces for URL manipulation</h4>
 
   <p>An interface that has a complement of <dfn id=url-decomposition-idl-attributes>URL decomposition IDL
   attributes</dfn> has seven attributes with the following
@@ -14627,8 +14637,35 @@
   with <code title=attr-base-target><a href=#attr-base-target>target</a></code> attributes, all but
   the first are ignored.</p>
 
-  <p>The <dfn id=dom-base-href title=dom-base-href><code>href</code></dfn> and <dfn id=dom-base-target title=dom-base-target><code>target</code></dfn> IDL attributes
-  must <a href=#reflect>reflect</a> the respective content attributes of the
+  <p>The <dfn id=dom-base-href title=dom-base-href><code>href</code></dfn> IDL
+  attribute, on getting, must return the result of running the
+  following algorithm:
+
+  <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1715 --><li><p>If the <code><a href=#the-base-element>base</a></code> element has no <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute, then return
+   the <a href=#document-base-url>document base URL</a> and abort these steps.</li>
+
+   <li><p>Let <var title="">fallback base url</var> be the
+   <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>.</li>
+
+   <li><p>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
+   <code><a href=#the-base-element>base</a></code> 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 or
+   <code><a href=#the-base-element>base</a></code> elements).</li>
+
+   <li><p>If the previous step was successful, return the resulting
+   <a href=#absolute-url>absolute URL</a> and abort these steps.</li>
+
+   <li><p>Otherwise, return the empty string.</li>
+
+  </ol><p>The <code title=dom-base-href><a href=#dom-base-href>href</a></code> IDL attribute, on
+  setting, must set the <code title=attr-base-href><a href=#attr-base-href>href</a></code>
+  content attribute to the given new value.</p>
+
+  <p>The <dfn id=dom-base-target title=dom-base-target><code>target</code></dfn> IDL
+  attribute must <a href=#reflect>reflect</a> the content attribute of the
   same name.</p>
 
   </div>

Modified: index
===================================================================
--- index	2012-08-24 18:06:12 UTC (rev 7265)
+++ index	2012-08-24 18:52:50 UTC (rev 7266)
@@ -358,10 +358,11 @@
     <ol>
      <li><a href=#terminology-0><span class=secno>2.6.1 </span>Terminology</a></li>
      <li><a href=#parsing-urls><span class=secno>2.6.2 </span>Parsing URLs</a></li>
-     <li><a href=#resolving-urls><span class=secno>2.6.3 </span>Resolving URLs</a></li>
-     <li><a href=#url-manipulation-and-creation><span class=secno>2.6.4 </span>URL manipulation and creation</a></li>
-     <li><a href=#dynamic-changes-to-base-urls><span class=secno>2.6.5 </span>Dynamic changes to base URLs</a></li>
-     <li><a href=#interfaces-for-url-manipulation><span class=secno>2.6.6 </span>Interfaces for URL manipulation</a></ol></li>
+     <li><a href=#base-urls><span class=secno>2.6.3 </span>Base URLs</a></li>
+     <li><a href=#resolving-urls><span class=secno>2.6.4 </span>Resolving URLs</a></li>
+     <li><a href=#url-manipulation-and-creation><span class=secno>2.6.5 </span>URL manipulation and creation</a></li>
+     <li><a href=#dynamic-changes-to-base-urls><span class=secno>2.6.6 </span>Dynamic changes to base URLs</a></li>
+     <li><a href=#interfaces-for-url-manipulation><span class=secno>2.6.7 </span>Interfaces for URL manipulation</a></ol></li>
    <li><a href=#fetching-resources><span class=secno>2.7 </span>Fetching resources</a>
     <ol>
      <li><a href=#concept-http-equivalent><span class=secno>2.7.1 </span>Protocol concepts</a></li>
@@ -7669,8 +7670,62 @@
   </div>
 
 
-  <h4 id=resolving-urls><span class=secno>2.6.3 </span>Resolving URLs</h4>
+  <h4 id=base-urls><span class=secno>2.6.3 </span>Base URLs</h4>
 
+  <p>The <dfn id=fallback-base-url>fallback base URL</dfn> of a <code><a href=#document>Document</a></code>
+  object is the <a href=#absolute-url>absolute URL</a> obtained by running these
+  substeps:</p>
+
+  <ol><li><p>If the <code><a href=#document>Document</a></code> is <a href=#an-iframe-srcdoc-document>an <code>iframe</code>
+   <code title=attr-iframe-srcdoc>srcdoc</code> document</a>,
+   then return the <a href=#document-base-url>document base URL</a> of the
+   <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing context</a>'s
+   <a href=#browsing-context-container>browsing context container</a>'s <code><a href=#document>Document</a></code> and
+   abort these steps.</li>
+
+   <li>
+
+    <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+    <!-- 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 <a href="#the-document's-address">the document's address</a> is
+    <code><a href=#about:blank>about:blank</a></code>, and the <code><a href=#document>Document</a></code>'s
+    <a href=#browsing-context>browsing context</a> has a <a href=#creator-browsing-context>creator browsing
+    context</a>, then return the <a href=#document-base-url>document base URL</a> of
+    the <a href=#creator-document>creator <code>Document</code></a>, and abort these
+    steps.</p>
+
+   </li>
+
+   <!-- http://www.hixie.ch/tests/adhoc/dom/level0/history/pushState/001/ -->
+
+   <li><p>Return <a href="#the-document's-address">the document's address</a>.</li>
+
+  </ol><p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
+  object is the <a href=#absolute-url>absolute URL</a> obtained by running these
+  substeps:</p>
+
+  <ol><li><p>Let <var title="">fallback base url</var> be the
+   <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>.</li>
+
+   <li><p>If there is no <code><a href=#the-base-element>base</a></code> element that 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>; abort these steps. 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><h4 id=resolving-urls><span class=secno>2.6.4 </span>Resolving URLs</h4>
+
   <p>Resolving a URL is the process of taking a relative URL and
   obtaining the absolute URL that it implies.</p>
 
@@ -7731,53 +7786,8 @@
     however, as <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attributes
     are not allowed in <a href=#html-documents>HTML documents</a>.)</p>
 
-    <p>The <dfn id=document-base-url>document base URL</dfn> of a <code><a href=#document>Document</a></code>
-    object is the <a href=#absolute-url>absolute URL</a> obtained by running these
-    substeps:</p>
+   </li>
 
-    <ol><li><p>Let <var title="">fallback base url</var> be <a href="#the-document's-address">the
-     document's address</a>.</li>
-     <!-- http://www.hixie.ch/tests/adhoc/dom/level0/history/pushState/001/ -->
-
-     <li>
-
-      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
-
-      <!-- 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><a href=#document>Document</a></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 the <code><a href=#document>Document</a></code> is <a href=#an-iframe-srcdoc-document>an
-     <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then
-     let <var title="">fallback base url</var> be the <a href=#document-base-url>document
-     base URL</a> of the <code><a href=#document>Document</a></code>'s <a href=#browsing-context>browsing
-     context</a>'s <a href=#browsing-context-container>browsing context container</a>'s
-     <code><a href=#document>Document</a></code> instead.</li>
-
-     <li><p>If there is no <code><a href=#the-base-element>base</a></code> element that 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>; abort these steps. 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></li>
-
    <li><p><a href=#parse-a-url title="parse a URL">Parse</a> <var title="">url</var> into its component parts.</li>
 
    <li>
@@ -7906,7 +7916,7 @@
 
   <div class=impl>
 
-  <h4 id=url-manipulation-and-creation><span class=secno>2.6.4 </span>URL manipulation and creation</h4>
+  <h4 id=url-manipulation-and-creation><span class=secno>2.6.5 </span>URL manipulation and creation</h4>
 
   <p>To <dfn id=fragment-escaped title=fragment-escaped>fragment-escape</dfn> a string
   <var title="">input</var>, a user agent must run the following
@@ -7969,7 +7979,7 @@
 
   <div class=impl>
 
-  <h4 id=dynamic-changes-to-base-urls><span class=secno>2.6.5 </span>Dynamic changes to base URLs</h4>
+  <h4 id=dynamic-changes-to-base-urls><span class=secno>2.6.6 </span>Dynamic changes to base URLs</h4>
 
   <p>When an <code title=attr-xml-base><a href=#the-xml:base-attribute-(xml-only)>xml:base</a></code> attribute is
   set, changed, or removed, the attribute's element, and all
@@ -8038,7 +8048,7 @@
 
 
 <!--TOPIC:DOM APIs-->
-  <h4 id=interfaces-for-url-manipulation><span class=secno>2.6.6 </span>Interfaces for URL manipulation</h4>
+  <h4 id=interfaces-for-url-manipulation><span class=secno>2.6.7 </span>Interfaces for URL manipulation</h4>
 
   <p>An interface that has a complement of <dfn id=url-decomposition-idl-attributes>URL decomposition IDL
   attributes</dfn> has seven attributes with the following
@@ -14627,8 +14637,35 @@
   with <code title=attr-base-target><a href=#attr-base-target>target</a></code> attributes, all but
   the first are ignored.</p>
 
-  <p>The <dfn id=dom-base-href title=dom-base-href><code>href</code></dfn> and <dfn id=dom-base-target title=dom-base-target><code>target</code></dfn> IDL attributes
-  must <a href=#reflect>reflect</a> the respective content attributes of the
+  <p>The <dfn id=dom-base-href title=dom-base-href><code>href</code></dfn> IDL
+  attribute, on getting, must return the result of running the
+  following algorithm:
+
+  <ol><!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1715 --><li><p>If the <code><a href=#the-base-element>base</a></code> element has no <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute, then return
+   the <a href=#document-base-url>document base URL</a> and abort these steps.</li>
+
+   <li><p>Let <var title="">fallback base url</var> be the
+   <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>.</li>
+
+   <li><p>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
+   <code><a href=#the-base-element>base</a></code> 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 or
+   <code><a href=#the-base-element>base</a></code> elements).</li>
+
+   <li><p>If the previous step was successful, return the resulting
+   <a href=#absolute-url>absolute URL</a> and abort these steps.</li>
+
+   <li><p>Otherwise, return the empty string.</li>
+
+  </ol><p>The <code title=dom-base-href><a href=#dom-base-href>href</a></code> IDL attribute, on
+  setting, must set the <code title=attr-base-href><a href=#attr-base-href>href</a></code>
+  content attribute to the given new value.</p>
+
+  <p>The <dfn id=dom-base-target title=dom-base-target><code>target</code></dfn> IDL
+  attribute must <a href=#reflect>reflect</a> the content attribute of the
   same name.</p>
 
   </div>

Modified: source
===================================================================
--- source	2012-08-24 18:06:12 UTC (rev 7265)
+++ source	2012-08-24 18:52:50 UTC (rev 7266)
@@ -7458,6 +7458,75 @@
   </div>
 
 
+  <h4>Base URLs</h4>
+
+  <p>The <dfn>fallback base URL</dfn> of a <code>Document</code>
+  object is the <span>absolute URL</span> obtained by running these
+  substeps:</p>
+
+  <ol>
+
+   <li><p>If the <code>Document</code> is <span>an <code>iframe</code>
+   <code title="attr-iframe-srcdoc">srcdoc</code> document</span>,
+   then return the <span>document base URL</span> of the
+   <code>Document</code>'s <span>browsing context</span>'s
+   <span>browsing context container</span>'s <code>Document</code> and
+   abort these steps.</p></li>
+
+   <li>
+
+    <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
+
+    <!-- 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 <span>the document's address</span> is
+    <code>about:blank</code>, and the <code>Document</code>'s
+    <span>browsing context</span> has a <span>creator browsing
+    context</span>, then return the <span>document base URL</span> of
+    the <span>creator <code>Document</code></span>, and abort these
+    steps.</p>
+
+   </li>
+
+   <!-- http://www.hixie.ch/tests/adhoc/dom/level0/history/pushState/001/ -->
+
+   <li><p>Return <span>the document's address</span>.</p></li>
+
+  </ol>
+
+  <p>The <dfn>document base URL</dfn> of a <code>Document</code>
+  object is the <span>absolute URL</span> obtained by running these
+  substeps:</p>
+
+  <ol>
+
+   <li><p>Let <var title="">fallback base url</var> be the
+   <code>Document</code>'s <span>fallback base URL</span>.</p></li>
+
+   <li><p>If there is no <code>base</code> element that has an <code
+   title="attr-base-href">href</code> attribute, then the
+   <span>document base URL</span> is <var title="">fallback base
+   url</var>; abort these steps. 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>
+
+
   <h4>Resolving URLs</h4>
 
   <p>Resolving a URL is the process of taking a relative URL and
@@ -7528,62 +7597,6 @@
     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>
-    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>
-     <!-- http://www.hixie.ch/tests/adhoc/dom/level0/history/pushState/001/ -->
-
-     <li>
-
-      <!-- http://www.hixie.ch/tests/adhoc/html/navigation/javascript-url/ -->
-
-      <!-- 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 the <code>Document</code> is <span>an
-     <code>iframe</code> <code
-     title="attr-iframe-srcdoc">srcdoc</code> document</span>, then
-     let <var title="">fallback base url</var> be the <span>document
-     base URL</span> of the <code>Document</code>'s <span>browsing
-     context</span>'s <span>browsing context container</span>'s
-     <code>Document</code> instead.</p></li>
-
-     <li><p>If there is no <code>base</code> element that has an <code
-     title="attr-base-href">href</code> attribute, then the
-     <span>document base URL</span> is <var title="">fallback base
-     url</var>; abort these steps. 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>
-
    </li>
 
    <li><p><span title="parse a URL">Parse</span> <var
@@ -15452,9 +15465,43 @@
   with <code title="attr-base-target">target</code> attributes, all but
   the first are ignored.</p>
 
-  <p>The <dfn title="dom-base-href"><code>href</code></dfn> and <dfn
-  title="dom-base-target"><code>target</code></dfn> IDL attributes
-  must <span>reflect</span> the respective content attributes of the
+  <p>The <dfn title="dom-base-href"><code>href</code></dfn> IDL
+  attribute, on getting, must return the result of running the
+  following algorithm:
+
+  <ol> <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1715 -->
+
+   <li><p>If the <code>base</code> element has no <code
+   title="attr-base-href">href</code> content attribute, then return
+   the <span>document base URL</span> and abort these steps.</p></li>
+
+   <li><p>Let <var title="">fallback base url</var> be the
+   <code>Document</code>'s <span>fallback base URL</span>.</p></li>
+
+   <li><p>Let <var title="">url</var> be the value of the <code
+   title="attr-base-href">href</code> attribute of the
+   <code>base</code> 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 or
+   <code>base</code> elements).</p></li>
+
+   <li><p>If the previous step was successful, return the resulting
+   <span>absolute URL</span> and abort these steps.</p></li>
+
+   <li><p>Otherwise, return the empty string.</p></li>
+
+  </ol>
+
+  <p>The <code title="dom-base-href">href</code> IDL attribute, on
+  setting, must set the <code title="attr-base-href">href</code>
+  content attribute to the given new value.</p>
+
+  <p>The <dfn title="dom-base-target"><code>target</code></dfn> IDL
+  attribute must <span>reflect</span> the content attribute of the
   same name.</p>
 
   </div>




More information about the Commit-Watchers mailing list