Add the URL decomposition attributes to <a> and <area>. (whatwg r3015)

Add the URL decomposition attributes to <a> and <area>. (whatwg r3015)

pathname
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-uda-pathname
port
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-uda-port
host
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-uda-host
protocol
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-area-protocol
HTMLAreaElement
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#htmlareaelement
relList
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-a-rellist
hostname
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-uda-hostname
HTMLAnchorElement
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#htmlanchorelement
relList
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-area-rellist
4.8.14 Image maps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#image-maps
protocol
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#dom-a-protocol
common setter action
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2178.html#concept-uda-setter

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2177&r2=1.2178&f=h
http://html5.org/tools/web-apps-tracker?from=3014&to=3015

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2177
retrieving revision 1.2178
diff -u -d -r1.2177 -r1.2178
--- Overview.html 28 Apr 2009 23:17:24 -0000 1.2177
+++ Overview.html 29 Apr 2009 00:30:00 -0000 1.2178
@@ -4302,9 +4302,9 @@
   requirements.</p>
 
   <p>On getting, if the <a href="#concept-uda-input" title="concept-uda-input">input</a>
-  fulfills the condition given in the "getter condition" column
-  corresponding to the attribute in the table below, the user agent
-  must return the part of the <a href="#concept-uda-input" title="concept-uda-input">input</a> URL given in the "component"
+  is an <a href="#absolute-url">absolute URL</a> that fulfills the condition given in
+  the "getter condition" column corresponding to the attribute in the
+  table below, the user agent must return the part of the <a href="#concept-uda-input" title="concept-uda-input">input</a> URL given in the "component"
   column, with any prefixes specified in the "prefix" column
   appropriately added to the start of the string and any suffixes
   specified in the "suffix" column appropriately added to the end of
@@ -4314,10 +4314,11 @@
   <p>On setting, the new value must first be mutated as described by
   the "setter preprocessor" column, then mutated by %-escaping any
   characters in the new value that are not valid in the relevant
-  component as given by the "component" column. Then, if the resulting
-  new value fulfills the condition given in the "setter condition"
-  column, the user agent must make a new string <var title="">output</var> by replacing the component of the URL given by
-  the "component" column in the <a href="#concept-uda-input" title="concept-uda-input">input</a> URL with the new value;
+  component as given by the "component" column. Then, if the <a href="#concept-uda-input" title="concept-uda-input">input</a> is an <a href="#absolute-url">absolute
+  URL</a> and the resulting new value fulfills the condition given
+  in the "setter condition" column, the user agent must make a new
+  string <var title="">output</var> by replacing the component of the
+  URL given by the "component" column in the <a href="#concept-uda-input" title="concept-uda-input">input</a> URL with the new value;
   otherwise, the user agent must let <var title="">output</var> be
   equal to the <a href="#concept-uda-input" title="concept-uda-input">input</a>. Finally,
   the user agent must invoke the <a href="#concept-uda-setter" title="concept-uda-setter">common setter action</a> with the
@@ -4356,14 +4357,14 @@
      <td>&mdash;
      <td>&mdash;
      <td>&mdash;
-     <td>&mdash;
+     <td>The new value is not the empty string and <a href="#concept-uda-input" title="concept-uda-input">input</a> is hierarchical and uses a server-based naming authority
     <tr><td><dfn id="dom-uda-hostname" title="dom-uda-hostname"><code>hostname</code></dfn>
      <td><a href="#url-host" title="url-host">&lt;host&gt;</a>
      <td><a href="#concept-uda-input" title="concept-uda-input">input</a> is hierarchical and uses a server-based naming authority
      <td>&mdash;
      <td>&mdash;
      <td>Remove all leading U+002F SOLIDUS ("<code title="">/</code>") characters
-     <td>&mdash;
+     <td>The new value is not the empty string and <a href="#concept-uda-input" title="concept-uda-input">input</a> is hierarchical and uses a server-based naming authority
     <tr><td><dfn id="dom-uda-port" title="dom-uda-port"><code>port</code></dfn>
      <td><a href="#url-port" title="url-port">&lt;port&gt;</a>
      <td><a href="#concept-uda-input" title="concept-uda-input">input</a> is hierarchical, uses a server-based naming authority, and contained a <a href="#url-port" title="url-port">&lt;port&gt;</a> component (possibly an empty one)
@@ -4371,7 +4372,7 @@
      <td>&mdash;
      <td>Remove any characters in the new value that are not in the range U+0030 DIGIT ZERO .. U+0039 DIGIT NINE.
          If the resulting string is empty, set it to a single U+0030 DIGIT ZERO character ('0').
-     <td>&mdash;
+     <td><a href="#concept-uda-input" title="concept-uda-input">input</a> is hierarchical and uses a server-based naming authority
     <tr><td><dfn id="dom-uda-pathname" title="dom-uda-pathname"><code>pathname</code></dfn>
      <td><a href="#url-path" title="url-path">&lt;path&gt;</a>
      <td><a href="#concept-uda-input" title="concept-uda-input">input</a> is hierarchical
@@ -12226,7 +12227,16 @@
            attribute DOMString <a href="#dom-a-media" title="dom-a-media">media</a>;
            attribute DOMString <a href="#dom-a-hreflang" title="dom-a-hreflang">hreflang</a>;
            attribute DOMString <a href="#dom-a-type" title="dom-a-type">type</a>;
-};</pre><!-- XXX also support the URL decomposition attributes -->
+
+  // <a href="#url-decomposition-attributes">URL decomposition attributes</a>
+           attribute DOMString <a href="#dom-a-protocol" title="dom-a-protocol">protocol</a>;
+           attribute DOMString <a href="#dom-a-host" title="dom-a-host">host</a>;
+           attribute DOMString <a href="#dom-a-hostname" title="dom-a-hostname">hostname</a>;
+           attribute DOMString <a href="#dom-a-port" title="dom-a-port">port</a>;
+           attribute DOMString <a href="#dom-a-pathname" title="dom-a-pathname">pathname</a>;
+           attribute DOMString <a href="#dom-a-search" title="dom-a-search">search</a>;
+           attribute DOMString <a href="#dom-a-hash" title="dom-a-hash">hash</a>;
+};</pre>
     <p>The <code title="command-ro"><a href="#command-ro">Command</a></code> interface must also be implemented by
     this element.</p>
    </dd>
@@ -12308,6 +12318,14 @@
   <a href="#reflect">reflect</a> the <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code>
   content attribute.</p>
 
+  <p>The <code><a href="#the-a-element">a</a></code> element also suports the complement of
+  <a href="#url-decomposition-attributes">URL decomposition attributes</a>, <dfn id="dom-a-protocol" title="dom-a-protocol"><code>protocol</code></dfn>, <dfn id="dom-a-host" title="dom-a-host"><code>host</code></dfn>, <dfn id="dom-a-port" title="dom-a-port"><code>port</code></dfn>, <dfn id="dom-a-hostname" title="dom-a-hostname"><code>hostname</code></dfn>, <dfn id="dom-a-pathname" title="dom-a-pathname"><code>pathname</code></dfn>, <dfn id="dom-a-search" title="dom-a-search"><code>search</code></dfn>, and <dfn id="dom-a-hash" title="dom-a-hash"><code>hash</code></dfn>. These must follow the
+  rules given for URL decomposition attributes, with the <a href="#concept-uda-input" title="concept-uda-input">input</a> being the result of <a href="#resolve-a-url" title="resolve a url">resolving</a> the element's <code title="attr-a-href">href</code> attribute relative to the element,
+  if there is such an attribute and resolving it is successful, or the
+  empty string otherwise; and the <a href="#concept-uda-setter" title="concept-uda-setter">common setter action</a> being the
+  same as setting the element's <code title="attr-a-href">href</code>
+  attribute to the new output value.</p>
+
   </div><div class="example">
 
    <p>The <code><a href="#the-a-element">a</a></code> element may be wrapped around entire
@@ -22155,7 +22173,16 @@
            attribute DOMString <a href="#dom-area-media" title="dom-area-media">media</a>;
            attribute DOMString <a href="#dom-area-hreflang" title="dom-area-hreflang">hreflang</a>;
            attribute DOMString <a href="#dom-area-type" title="dom-area-type">type</a>;
-};</pre><!-- XXX also support the URL decomposition attributes -->
+
+  // <a href="#url-decomposition-attributes">URL decomposition attributes</a>
+           attribute DOMString <a href="#dom-area-protocol" title="dom-area-protocol">protocol</a>;
+           attribute DOMString <a href="#dom-area-host" title="dom-area-host">host</a>;
+           attribute DOMString <a href="#dom-area-hostname" title="dom-area-hostname">hostname</a>;
+           attribute DOMString <a href="#dom-area-port" title="dom-area-port">port</a>;
+           attribute DOMString <a href="#dom-area-pathname" title="dom-area-pathname">pathname</a>;
+           attribute DOMString <a href="#dom-area-search" title="dom-area-search">search</a>;
+           attribute DOMString <a href="#dom-area-hash" title="dom-area-hash">hash</a>;
+};</pre>
    </dd>
   </dl><p>The <code><a href="#the-area-element">area</a></code> element <a href="#represents">represents</a> either a
   hyperlink with some text and a corresponding area on an <a href="#image-map">image
@@ -22273,6 +22300,14 @@
   <a href="#reflect">reflect</a> the <code title="attr-hyperlink-rel"><a href="#attr-hyperlink-rel">rel</a></code>
   content attribute.</p>
 
+  <p>The <code><a href="#the-area-element">area</a></code> element also suports the complement of
+  <a href="#url-decomposition-attributes">URL decomposition attributes</a>, <dfn id="dom-area-protocol" title="dom-area-protocol"><code>protocol</code></dfn>, <dfn id="dom-area-host" title="dom-area-host"><code>host</code></dfn>, <dfn id="dom-area-port" title="dom-area-port"><code>port</code></dfn>, <dfn id="dom-area-hostname" title="dom-area-hostname"><code>hostname</code></dfn>, <dfn id="dom-area-pathname" title="dom-area-pathname"><code>pathname</code></dfn>, <dfn id="dom-area-search" title="dom-area-search"><code>search</code></dfn>, and <dfn id="dom-area-hash" title="dom-area-hash"><code>hash</code></dfn>. These must follow the
+  rules given for URL decomposition attributes, with the <a href="#concept-uda-input" title="concept-uda-input">input</a> being the result of <a href="#resolve-a-url" title="resolve a url">resolving</a> the element's <code title="attr-area-href">href</code> attribute relative to the
+  element, if there is such an attribute and resolving it is
+  successful, or the empty string otherwise; and the <a href="#concept-uda-setter" title="concept-uda-setter">common setter action</a> being the
+  same as setting the element's <code title="attr-area-href">href</code> attribute to the new output
+  value.</p>
+
   </div><h4 id="image-maps"><span class="secno">4.8.14 </span>Image maps</h4><!-- TESTS
   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/smallcats%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%3E%0A%3Cmap%20name%3Da%3E%0A%20%3Carea%20onclick%3Dw%28%271%27%29%20coords%3D%270%25%200%25%20100%25%20100%25%27%20href%3Djavascript%3A%3E%0A%3C/map%3E
   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A%3Cbody%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/smallcats%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/sample%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3Cmap%20name%3Da%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%20%3Carea%20onclick%3Dw%28%271%27%29%20coords%3D%270%200%2050%2050%27%20href%3Djavascript%3A%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3C/map%3E%0A%3Cscript%3E%0A%20var%20x%20%3D%20document.getElementsByTagName%28%27img%27%29%5B0%5D%3B%0A%20x.parentNode.appendChild%28x%29%3B%0A%20document.getElementsByTagName%28%27area%27%29%5B0%5D.focus%28%29%3B%0A%3C/script%3E

Received on Wednesday, 29 April 2009 00:32:26 UTC