Permalink
Browse files

[giow] (2) Add the URL decomposition attributes to <a> and <area>.

git-svn-id: http://svn.whatwg.org/webapps@3015 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Apr 29, 2009
1 parent 4fca054 commit 5b7174ad043198690b22dd804b4097fa14f31711
Showing with 118 additions and 25 deletions.
  1. +47 −12 index
  2. +71 −13 source
59 index
@@ -4765,9 +4765,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
@@ -4777,10 +4777,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
@@ -4819,22 +4820,22 @@
<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)
<td>&mdash;
<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
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>
<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>
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
<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>


84 source
@@ -4440,9 +4440,9 @@
requirements.</p>

<p>On getting, if the <span title="concept-uda-input">input</span>
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 <span
is an <span>absolute URL</span> 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 <span
title="concept-uda-input">input</span> 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
@@ -4453,11 +4453,12 @@
<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 <span
component as given by the "component" column. Then, if the <span
title="concept-uda-input">input</span> is an <span>absolute
URL</span> 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 <span
title="concept-uda-input">input</span> URL with the new value;
otherwise, the user agent must let <var title="">output</var> be
equal to the <span title="concept-uda-input">input</span>. Finally,
@@ -4506,15 +4507,15 @@
<td>&mdash;
<td>&mdash;
<td>&mdash;
<td>&mdash;
<td>The new value is not the empty string and <span title="concept-uda-input">input</span> is hierarchical and uses a server-based naming authority
<tr>
<td><dfn title="dom-uda-hostname"><code>hostname</code></dfn>
<td><span title="url-host">&lt;host&gt;</span>
<td><span title="concept-uda-input">input</span> 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 <span title="concept-uda-input">input</span> is hierarchical and uses a server-based naming authority
<tr>
<td><dfn title="dom-uda-port"><code>port</code></dfn>
<td><span title="url-port">&lt;port&gt;</span>
@@ -4523,7 +4524,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><span title="concept-uda-input">input</span> is hierarchical and uses a server-based naming authority
<tr>
<td><dfn title="dom-uda-pathname"><code>pathname</code></dfn>
<td><span title="url-path">&lt;path&gt;</span>
attribute DOMString <span title="dom-a-media">media</span>;
attribute DOMString <span title="dom-a-hreflang">hreflang</span>;
attribute DOMString <span title="dom-a-type">type</span>;
};</pre><!-- XXX also support the URL decomposition attributes -->

// <span>URL decomposition attributes</span>
attribute DOMString <span title="dom-a-protocol">protocol</span>;
attribute DOMString <span title="dom-a-host">host</span>;
attribute DOMString <span title="dom-a-hostname">hostname</span>;
attribute DOMString <span title="dom-a-port">port</span>;
attribute DOMString <span title="dom-a-pathname">pathname</span>;
attribute DOMString <span title="dom-a-search">search</span>;
attribute DOMString <span title="dom-a-hash">hash</span>;
};</pre>
<p>The <code title="command-ro">Command</code> interface must also be implemented by
this element.</p>
</dd>
<span>reflect</span> the <code title="attr-hyperlink-rel">rel</code>
content attribute.</p>

<p>The <code>a</code> element also suports the complement of
<span>URL decomposition attributes</span>, <dfn
title="dom-a-protocol"><code>protocol</code></dfn>, <dfn
title="dom-a-host"><code>host</code></dfn>, <dfn
title="dom-a-port"><code>port</code></dfn>, <dfn
title="dom-a-hostname"><code>hostname</code></dfn>, <dfn
title="dom-a-pathname"><code>pathname</code></dfn>, <dfn
title="dom-a-search"><code>search</code></dfn>, and <dfn
title="dom-a-hash"><code>hash</code></dfn>. These must follow the
rules given for URL decomposition attributes, with the <span
title="concept-uda-input">input</span> being the result of <span
title="resolve a url">resolving</span> 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 <span
title="concept-uda-setter">common setter action</span> 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">
attribute DOMString <span title="dom-area-media">media</span>;
attribute DOMString <span title="dom-area-hreflang">hreflang</span>;
attribute DOMString <span title="dom-area-type">type</span>;
};</pre><!-- XXX also support the URL decomposition attributes -->

// <span>URL decomposition attributes</span>
attribute DOMString <span title="dom-area-protocol">protocol</span>;
attribute DOMString <span title="dom-area-host">host</span>;
attribute DOMString <span title="dom-area-hostname">hostname</span>;
attribute DOMString <span title="dom-area-port">port</span>;
attribute DOMString <span title="dom-area-pathname">pathname</span>;
attribute DOMString <span title="dom-area-search">search</span>;
attribute DOMString <span title="dom-area-hash">hash</span>;
};</pre>
</dd>
</dl>

<span>reflect</span> the <code title="attr-hyperlink-rel">rel</code>
content attribute.</p>

<p>The <code>area</code> element also suports the complement of
<span>URL decomposition attributes</span>, <dfn
title="dom-area-protocol"><code>protocol</code></dfn>, <dfn
title="dom-area-host"><code>host</code></dfn>, <dfn
title="dom-area-port"><code>port</code></dfn>, <dfn
title="dom-area-hostname"><code>hostname</code></dfn>, <dfn
title="dom-area-pathname"><code>pathname</code></dfn>, <dfn
title="dom-area-search"><code>search</code></dfn>, and <dfn
title="dom-area-hash"><code>hash</code></dfn>. These must follow the
rules given for URL decomposition attributes, with the <span
title="concept-uda-input">input</span> being the result of <span
title="resolve a url">resolving</span> 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 <span
title="concept-uda-setter">common setter action</span> being the
same as setting the element's <code
title="attr-area-href">href</code> attribute to the new output
value.</p>

</div>


0 comments on commit 5b7174a

Please sign in to comment.