[html5] r7962 - [giow] (3) Make <base> elements not be affected by changes by to the document's [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Jun 12 12:05:17 PDT 2013


Author: ianh
Date: 2013-06-12 12:05:15 -0700 (Wed, 12 Jun 2013)
New Revision: 7962

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Make <base> elements not be affected by changes by to the document's address
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18459
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2013-06-12 18:09:33 UTC (rev 7961)
+++ complete.html	2013-06-12 19:05:15 UTC (rev 7962)
@@ -6527,18 +6527,13 @@
   </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>
+  <ol><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 in the <code><a href=#document>Document</a></code>, then the
+   <a href=#document-base-url>document base URL</a> is the <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>;
+   abort these steps.</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>Otherwise, the <a href=#document-base-url>document base URL</a> is the <a href=#frozen-base-url>frozen base URL</a> of the
+   first <code><a href=#the-base-element>base</a></code> element in the <code><a href=#document>Document</a></code> that has an <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute, in <a href=#tree-order>tree order</a>.</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><div class=impl>
 
   <h4 id=resolving-urls><span class=secno>2.5.2 </span>Resolving URLs</h4>
@@ -12468,6 +12463,25 @@
   with <code title=attr-base-target><a href=#attr-base-target>target</a></code> attributes, all but
   the first are ignored.</p>
 
+  <p>A <code><a href=#the-base-element>base</a></code> element that is the first <code><a href=#the-base-element>base</a></code> element with an <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute in a particular <code><a href=#document>Document</a></code> has a
+  <dfn id=frozen-base-url>frozen base URL</dfn>. The <a href=#frozen-base-url>frozen base URL</a> must be <a href=#set-the-frozen-base-url title="set the frozen
+  base URL">set</a>, synchronously, whenever any of the following situations occur:</p>
+
+  <ul class=brief><li>The <code><a href=#the-base-element>base</a></code> element becomes the first <code><a href=#the-base-element>base</a></code> element in <a href=#tree-order>tree
+   order</a> with an <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute in its
+   <code><a href=#document>Document</a></code>.</li>
+
+   <li>The <code><a href=#the-base-element>base</a></code> element is the first <code><a href=#the-base-element>base</a></code> element in <a href=#tree-order>tree
+   order</a> with an <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute in its
+   <code><a href=#document>Document</a></code>, and its <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute is
+   changed.</li>
+
+  </ul><p>To <dfn id=set-the-frozen-base-url>set the <span>frozen base URL</span></dfn>, <a href=#resolve-a-url title="resolve a URL">resolve</a>
+  the value of the element's <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute relative to
+  the <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>; if this is successful, set the
+  <a href=#frozen-base-url>frozen base URL</a> to the <a href=#resulting-absolute-url>resulting absolute URL</a>, otherwise, set the
+  <a href=#frozen-base-url>frozen base URL</a> to the <a href=#fallback-base-url>fallback base URL</a>.</p>
+
   <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:

Modified: index
===================================================================
--- index	2013-06-12 18:09:33 UTC (rev 7961)
+++ index	2013-06-12 19:05:15 UTC (rev 7962)
@@ -6527,18 +6527,13 @@
   </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>
+  <ol><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 in the <code><a href=#document>Document</a></code>, then the
+   <a href=#document-base-url>document base URL</a> is the <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>;
+   abort these steps.</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>Otherwise, the <a href=#document-base-url>document base URL</a> is the <a href=#frozen-base-url>frozen base URL</a> of the
+   first <code><a href=#the-base-element>base</a></code> element in the <code><a href=#document>Document</a></code> that has an <code title=attr-base-href><a href=#attr-base-href>href</a></code> attribute, in <a href=#tree-order>tree order</a>.</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><div class=impl>
 
   <h4 id=resolving-urls><span class=secno>2.5.2 </span>Resolving URLs</h4>
@@ -12468,6 +12463,25 @@
   with <code title=attr-base-target><a href=#attr-base-target>target</a></code> attributes, all but
   the first are ignored.</p>
 
+  <p>A <code><a href=#the-base-element>base</a></code> element that is the first <code><a href=#the-base-element>base</a></code> element with an <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute in a particular <code><a href=#document>Document</a></code> has a
+  <dfn id=frozen-base-url>frozen base URL</dfn>. The <a href=#frozen-base-url>frozen base URL</a> must be <a href=#set-the-frozen-base-url title="set the frozen
+  base URL">set</a>, synchronously, whenever any of the following situations occur:</p>
+
+  <ul class=brief><li>The <code><a href=#the-base-element>base</a></code> element becomes the first <code><a href=#the-base-element>base</a></code> element in <a href=#tree-order>tree
+   order</a> with an <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute in its
+   <code><a href=#document>Document</a></code>.</li>
+
+   <li>The <code><a href=#the-base-element>base</a></code> element is the first <code><a href=#the-base-element>base</a></code> element in <a href=#tree-order>tree
+   order</a> with an <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute in its
+   <code><a href=#document>Document</a></code>, and its <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute is
+   changed.</li>
+
+  </ul><p>To <dfn id=set-the-frozen-base-url>set the <span>frozen base URL</span></dfn>, <a href=#resolve-a-url title="resolve a URL">resolve</a>
+  the value of the element's <code title=attr-base-href><a href=#attr-base-href>href</a></code> content attribute relative to
+  the <code><a href=#document>Document</a></code>'s <a href=#fallback-base-url>fallback base URL</a>; if this is successful, set the
+  <a href=#frozen-base-url>frozen base URL</a> to the <a href=#resulting-absolute-url>resulting absolute URL</a>, otherwise, set the
+  <a href=#frozen-base-url>frozen base URL</a> to the <a href=#fallback-base-url>fallback base URL</a>.</p>
+
   <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:

Modified: source
===================================================================
--- source	2013-06-12 18:09:33 UTC (rev 7961)
+++ source	2013-06-12 19:05:15 UTC (rev 7962)
@@ -5934,23 +5934,15 @@
 
   <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>
+   title="attr-base-href">href</code> attribute in the <code>Document</code>, then the
+   <span>document base URL</span> is the <code>Document</code>'s <span>fallback base URL</span>;
+   abort these steps.</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>Otherwise, the <span>document base URL</span> is the <span>frozen base URL</span> of the
+   first <code>base</code> element in the <code>Document</code> that has an <code
+   title="attr-base-href">href</code> attribute, in <span>tree order</span>.</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>
 
 
@@ -12717,6 +12709,30 @@
   with <code title="attr-base-target">target</code> attributes, all but
   the first are ignored.</p>
 
+  <p>A <code>base</code> element that is the first <code>base</code> element with an <code
+  title="attr-base-href">href</code> content attribute in a particular <code>Document</code> has a
+  <dfn>frozen base URL</dfn>. The <span>frozen base URL</span> must be <span title="set the frozen
+  base URL">set</span>, synchronously, whenever any of the following situations occur:</p>
+
+  <ul class="brief">
+
+   <li>The <code>base</code> element becomes the first <code>base</code> element in <span>tree
+   order</span> with an <code title="attr-base-href">href</code> content attribute in its
+   <code>Document</code>.</li>
+
+   <li>The <code>base</code> element is the first <code>base</code> element in <span>tree
+   order</span> with an <code title="attr-base-href">href</code> content attribute in its
+   <code>Document</code>, and its <code title="attr-base-href">href</code> content attribute is
+   changed.</li>
+
+  </ul>
+
+  <p>To <dfn>set the <span>frozen base URL</span></dfn>, <span title="resolve a URL">resolve</span>
+  the value of the element's <code title="attr-base-href">href</code> content attribute relative to
+  the <code>Document</code>'s <span>fallback base URL</span>; if this is successful, set the
+  <span>frozen base URL</span> to the <span>resulting absolute URL</span>, otherwise, set the
+  <span>frozen base URL</span> to the <span>fallback base URL</span>.</p>
+
   <p>The <dfn title="dom-base-href"><code>href</code></dfn> IDL
   attribute, on getting, must return the result of running the
   following algorithm:




More information about the Commit-Watchers mailing list