html5/spec Overview.html,1.1147,1.1148

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv24263

Modified Files:
	Overview.html 
Log Message:
More cleanup around <img> elements and images: Make the sniffing more predictable (and maybe more secure), make it clear that <img> does sniffing, minor editorial fixes. (whatwg r1957)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1147
retrieving revision 1.1148
diff -u -d -r1.1147 -r1.1148
--- Overview.html	30 Jul 2008 02:24:06 -0000	1.1147
+++ Overview.html	30 Jul 2008 03:01:10 -0000	1.1148
@@ -6712,9 +6712,6 @@
       
   </table>
 
-  <p>User agents must ignore any rows for image types that they do not
-   support.
-
   <p>Otherwise, the sniffed type of the resource is the same as its <var
    title="">official type</var>.
 
@@ -15591,17 +15588,24 @@
    title=event-load>load</code> event</a> on the <code><a
    href="#img">img</a></code> element (this happens after <code
    title=dom-img-complete><a href="#complete">complete</a></code> starts
-   returning true). If the download fails or it completes but the image is
-   not a valid or supported image, the user agent must <a
-   href="#firing5">fire an <code title=event-error>error</code> event</a> on
-   the <code><a href="#img">img</a></code> element.
+   returning true). If the download fails without a response from the remote
+   server, or it completes but the image is not a valid or supported image,
+   the user agent must <a href="#firing5">fire an <code
+   title=event-error>error</code> event</a> on the <code><a
+   href="#img">img</a></code> element.
 
-  <p>The remote server's response metadata (e.g. an HTTP 404 status code, or
-   <a href="#content-type5" title=Content-Type>associated Content-Type
-   headers</a>) must be ignored when determining whether the resource
-   obtained is a valid image or not.
+  <p>Whether the image is fetched successfully or not (e.g. whether the
+   response code was a 2xx code or equivalent) must be ignored when
+   determining the image's type and whether it is a valid image.
 
-  <p class=note>This allows servers to return images with error responses.
+  <p class=note>This allows servers to return images with error responses,
+   and have them displayed.
+
+  <p>The user agents should apply the <a href="#content-type8"
+   title="Content-Type sniffing: image">image sniffing rules</a> to determine
+   the type of the image, with the image's <a href="#content-type5"
+   title=Content-Type>associated Content-Type headers</a> giving the <var
+   title="">official type</var>.
 
   <p>User agents must not support non-image resources with the <code><a
    href="#img">img</a></code> element. User agents must not run executable
@@ -16725,7 +16729,8 @@
      href="#plugin">plugin</a> for it.
   </ol>
 
-  <p>Whether the resource is fetched successfully or not must be ignored when
+  <p>Whether the resource is fetched successfully or not (e.g. whether the
+   response code was a 2xx code or equivalent) must be ignored when
    determining the resource's type and when handing the resource to the
    plugin.
 

Received on Wednesday, 30 July 2008 03:01:47 UTC