- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 18 Jun 2008 04:26:10 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv32151
Modified Files:
Overview.html
Log Message:
Revamp the way that type='' on <link> is defined to actually be accurate. Allow sniffing when the expected type is an image. (whatwg r1784)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.973
retrieving revision 1.974
diff -u -d -r1.973 -r1.974
--- Overview.html 18 Jun 2008 03:37:31 -0000 1.973
+++ Overview.html 18 Jun 2008 04:26:07 -0000 1.974
@@ -7770,7 +7770,8 @@
then the <code title=attr-link-media><a href="#media0">media</a></code>
attribute is prescriptive. The user agent must apply the external resource
to <span>views</span><!-- XXX xref --> while their state match the listed
- media, and must not apply them otherwise.
+ media and the other relevant conditions apply, and must not apply them
+ otherwise.
<p id=default-media>The default, if the <code title=attr-link-media><a
href="#media0">media</a></code> attribute is omitted, is <code>all</code>,
@@ -7789,26 +7790,48 @@
href="#references">[RFC2046]</a>
<p>For <a href="#links1" title="external resource link">external resource
- links</a>, user agents may use the type given in this attribute to decide
- whether or not to consider using the resource at all. If the UA does not
- support the given MIME type for the given link relationship, then the UA
- may opt not to download and apply the resource.
+ links</a>, the <code title=attr-link-type><a href="#type">type</a></code>
+ attribute is used as a hint to user agents so that they can avoid
+ downloading resources they do not support. If the attribute is present,
+ then the user agent must assume that the resource is of the given type. If
+ the attribute is omitted, but the external resource link type has a
+ default type defined, then the user agent must assume that the resource is
+ of that type. If the UA does not support the given MIME type for the given
+ link relationship, then the UA should not download the resource; if the UA
+ does support the given MIME type for the given link relationship, then the
+ UA should download the resource. If the attribute is omitted, and the
+ external resource link type does not have a default type defined, but the
+ user agent would fetch the resource if the type was known and supported,
+ then the user agent should fetch the resource under the assumption that it
+ will be supported.
<p>User agents must not consider the <code title=attr-link-type><a
href="#type">type</a></code> attribute authoritative — upon fetching
- the resource, user agents must not use metadata included in the link to
- the resource to determine its type.
+ the resource, user agents must not use the <code title=attr-link-type><a
+ href="#type">type</a></code> attribute to determine its actual type. Only
+ the actual type (as defined in the next paragraph) is used to determine
+ whether to <em>apply</em> the resource, not the aforementioned assumed
+ type.
- <p>If the attribute is omitted, but the user agent would fetch the resource
- if the type was known and supported, then the user agent must fetch the
- resource and determine its type <a href="#content-type8"
- title=Content-Type>from its Content-Type metadata</a> to determine if it
- supports (and can apply) that external resource. If no type metadata is
- specified, but the external resource link type has a default type defined,
- then the user agent must assume that the resource is of that type.
+ <p>If the resource is expected to be an image, user agents may apply the <a
+ href="#content-type6" title="Content-Type sniffing: image">image sniffing
+ rules</a>, with the <var title="">official type</var> being the type
+ determined from the resource's <a href="#content-type8"
+ title=Content-Type>Content-Type metadata</a>, and use the resulting
+ sniffed type of the resource as if it was the actual type. Otherwise, if
+ the resource is not expected to be an image, or if the user agent opts not
+ to apply those rules, then the user agent must use the resource's <a
+ href="#content-type8" title=Content-Type>Content-Type metadata</a> to
+ determine the type of the resource. If there is no type metadata, but the
+ external resource link type has a default type defined, then the user
+ agent must assume that the resource is of that type.
+
+ <p>Once the user agent has established the type of the resource, the user
+ agent must apply the resource if it is of a supported type and the other
+ relevant conditions apply, and must ignore the resource otherwise.
<div class=example>
- <p>If a document contains four style sheet links labeled as follows:</p>
+ <p>If a document contains style sheet links labeled as follows:</p>
<pre><link rel="stylesheet" href="A" type="text/plain">
<link rel="stylesheet" href="B" type="text/css">
@@ -34189,8 +34212,8 @@
<p>User agents must ignore any rows for image types that they do not
support.
- <p>Otherwise, the <i>sniffed type</i> of the resource is the same as its
- <var title="">official type</var>.
+ <p>Otherwise, the sniffed type of the resource is the same as its <var
+ title="">official type</var>.
<h4 id=content-type3><span class=secno>4.10.4 </span><dfn
id=content-type7>Content-Type sniffing: feed or HTML</dfn></h4>
Received on Wednesday, 18 June 2008 04:26:45 UTC