Short URL: http://html5.org/r/1558
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 1558 | <link rel='icon' sizes=''> | 2008-05-08 02:17 |
Index: source
===================================================================
--- source (revision 1557)
+++ source (revision 1558)
@@ -5899,6 +5899,7 @@
<dd><code title="attr-link-media">media</code></dd>
<dd><code title="attr-link-hreflang">hreflang</code></dd>
<dd><code title="attr-link-type">type</code></dd>
+ <dd><code title="attr-link-sizes">sizes</code></dd>
<dd>Also, the <code title="attr-link-title">title</code> attribute has special semantics on this element.</dd>
<dt>DOM interface:</dt>
<dd>
@@ -5910,6 +5911,7 @@
attribute DOMString <span title="dom-link-media">media</span>;
attribute DOMString <span title="dom-link-hreflang">hreflang</span>;
attribute DOMString <span title="dom-link-type">type</span>;
+ attribute DOMString <span title="dom-link-sizes">sizes</span>;
};</pre>
<p>The <code>LinkStyle</code> interface must also be implemented
by this element, the <span>styling processing model</span> defines
@@ -6102,6 +6104,12 @@
elements in that a link without a title does not inherit the title
of the parent element: it merely has no title.</p>
+ <p>The <code title="attr-link-sizes">sizes</code> attribute is used
+ with the <code title="rel-icon">icon</code> link type. The attribute
+ must not be specified on <code>link</code> elements that do not have
+ a <code title="attr-link-rel">rel</code> attribute that specifies
+ the <code title="rel-icon">icon</code> keyword.</p>
+
<p>Some versions of HTTP defined a <code title="">Link:</code>
header, to be processed like a series of <code>link</code> elements.
When processing links, those must be taken into consideration as
@@ -6120,7 +6128,8 @@
title="dom-link-rel"><code>rel</code></dfn>, <dfn
title="dom-link-media"><code>media</code></dfn>, <dfn
title="dom-link-hreflang"><code>hreflang</code></dfn>, and <dfn
- title="dom-link-type"><code>type</code></dfn> each must
+ title="dom-link-type"><code>type</code></dfn>, and <dfn
+ title="dom-link-sizes"><code>sizes</code></dfn> each must
<span>reflect</span> the respective content attributes of the same
name.</p>
@@ -32437,13 +32446,80 @@
<p>Icons could be auditory icons, visual icons, or other kinds of
icons. If multiple icons are provided, the user agent must select
the most appropriate icon according to the <code
- title="attr-link-media">media</code> attribute.</p>
+ title="attr-link-media">media</code> and <code
+ title="attr-link-sizes">sizes</code> attributes. If there are
+ multiple equally appropriate icons, user agents must use the first
+ one declared in <span>tree order</span>.</p>
<p>There is no default type for resources given by the <code
title="rel-icon">icon</code> keyword.</p> <!-- XXX we don't define
the content-type sniffing for this keyword -->
+ <p>The <dfn title="attr-link-sizes"><code>sizes</code></dfn>
+ attribute gives the sizes of icons for visual media.</p>
+ <p>If the specified, the attribute must have a value that is an
+ <span>unordered set of unique space-separated tokens</span>. The
+ values must all be either <code
+ title="attr-link-sizes-any">any</code> or a value that consists of
+ two <span title="valid non-negative integer">valid non-negative
+ integers</span> that do not have a leading U+0030 DIGIT ZERO (0)
+ character and that are separated by a single U+0078 LATIN SMALL
+ LETTER X character.</p>
+
+ <p>The keywords represent icon sizes.</p>
+
+ <p>To parse and process the attribute's value, the user agent must
+ first <span title="split a string on spaces">split the attribute's
+ value on spaces</span>, and must then parse each resulting keyword
+ to determine what it represents.</p>
+
+ <p>The <dfn title="attr-link-sizes-any"><code>any</code> keyword
+ represents that the resource contains a scalable icon, e.g. as
+ provided by an SVG image.</p>
+
+ <p>Other keywords must be further parsed as follows to determine
+ what they represent:</p>
+
+ <ul>
+
+ <li><p>If the keyword doesn't contain exactly one U+0078 LATIN
+ SMALL LETTER X character, then this keyword doesn't represent
+ anything. Abort these steps for that keyword.</p></li>
+
+ <li><p>Let <var title="">width string</var> be the string before
+ the "<code title="">x</code>".</p></li>
+
+ <li><p>Let <var title="">hight string</var> be the string after the
+ "<code title="">x</code>".</p></li>
+
+ <li><p>If either <var title="">width string</var> or <var
+ title="">height string</var> start with a U+0030 DIGIT ZERO (0)
+ character or contain any characters other than characters in the
+ range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then this
+ keyword doesn't represent anything. Abort these steps for that
+ keyword.</p></li>
+
+ <li><p>Apply the <span>rules for parsing non-negative
+ integers</span> to <var title="">width string</var> to obtain <var
+ title="">width</var>.</p></li>
+
+ <li><p>Apply the <span>rules for parsing non-negative
+ integers</span> to <var title="">height string</var> to obtain <var
+ title="">height</var>.</p></li>
+
+ <li><p>The keyword represents that the resource contains a bitmap
+ icon with a width of <var title="">width</var> device pixels and a
+ height of <var title="">height</var> device pixels.</p></li>
+
+ </ul>
+
+ <p>The keywords specified on the <code
+ title="attr-link-sizes">sizes</code> attribute must not represent
+ icon sizes that are not actually available in the linked
+ resource.</p>
+
+
<h5>Link type "<dfn title="rel-license"><code>license</code></dfn>"</h5>
<p>The <code title="rel-license">license</code> keyword may be used