[html5] r7349 - [giow] (0) Make onerror on <img> only fire when onload doesn't fire. Fixing http [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Sep 14 19:09:59 PDT 2012


Author: ianh
Date: 2012-09-14 19:09:57 -0700 (Fri, 14 Sep 2012)
New Revision: 7349

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Make onerror on <img> only fire when onload doesn't fire.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=15000
Affected topics: HTML

Modified: complete.html
===================================================================
--- complete.html	2012-09-14 16:02:29 UTC (rev 7348)
+++ complete.html	2012-09-15 02:09:57 UTC (rev 7349)
@@ -246,7 +246,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 14 September 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 15 September 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -24446,12 +24446,14 @@
    <dd>The user agent has obtained some of the image data.</dd>
 
    <dt><dfn id=img-all title=img-all>Completely available</dfn></dt>
-   <dd>The user agent has obtained all of the image data.</dd>
+   <dd>The user agent has obtained all of the image data and at least
+   the image dimensions are available.</dd>
 
    <dt><dfn id=img-error title=img-error>Broken</dfn></dt>
    <dd>The user agent has obtained all of the image data that it can,
-   but it cannot decode the image (e.g. the image is corrupted, or the
-   format is not supported, or no data could be obtained).</dd>
+   but it cannot even decode the image enough to get the image
+   dimensions (e.g. the image is corrupted, or the format is not
+   supported, or no data could be obtained).</dd>
 
   </dl><p>When an <code><a href=#the-img-element>img</a></code> element is either in the <a href=#img-inc title=img-inc>partially available</a> state or in the <a href=#img-all title=img-all>completely available</a> state, it is said to be
   <dfn id=img-available title=img-available>available</dfn>.</p>
@@ -24647,7 +24649,7 @@
     source</a> once the resource has been <a href=#fetch title=fetch>fetched</a> must act as appropriate given the
     following alternatives:</p>
 
-    <dl class=switch><dt>If the download was successful</dt>
+    <dl class=switch><dt>If the download was successful and the user agent was able to determine the image's width and height</dt>
 
      <dd>Set the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-all title=img-all>completely available</a> state, update the
      presentation of the image appropriately, add the image to the
@@ -24675,15 +24677,14 @@
     a simple event</a> named <code title=event-load>load</code>
     at the <code><a href=#the-img-element>img</a></code> element.</p>
 
-    <p>If at any point the user agent discovers that the image data is
-    corrupted in some fatal way, or that the image data is not in a
-    supported file format, then the user agent must set the
-    <code><a href=#the-img-element>img</a></code> element to the <a href=#img-error title=img-error>broken</a> state. If the <a href=#fetch title=fetch>fetching</a> algorithm is still running for this
-    element, then the user agent must also abort that algorithm,
-    discarding any pending <a href=#concept-task title=concept-task>tasks</a>
-    generated by that algorithm, and then <a href=#queue-a-task>queue a task</a> to
-    <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#the-img-element>img</a></code>
-    element.</p>
+    <p>Otherwise, either the image data is corrupted in some fatal way
+    such that the image dimensions cannot be obtained, or the image
+    data is not in a supported file format; the user agent must set
+    the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-error title=img-error>broken</a> state, abort the <a href=#fetch title=fetch>fetching</a> algorithm, discarding any pending
+    <a href=#concept-task title=concept-task>tasks</a> generated by that
+    algorithm, and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
+    simple event</a> named <code title=event-error>error</code>
+    at the <code><a href=#the-img-element>img</a></code> element.</p>
 
    </li>
 

Modified: index
===================================================================
--- index	2012-09-14 16:02:29 UTC (rev 7348)
+++ index	2012-09-15 02:09:57 UTC (rev 7349)
@@ -246,7 +246,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 14 September 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 15 September 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -24446,12 +24446,14 @@
    <dd>The user agent has obtained some of the image data.</dd>
 
    <dt><dfn id=img-all title=img-all>Completely available</dfn></dt>
-   <dd>The user agent has obtained all of the image data.</dd>
+   <dd>The user agent has obtained all of the image data and at least
+   the image dimensions are available.</dd>
 
    <dt><dfn id=img-error title=img-error>Broken</dfn></dt>
    <dd>The user agent has obtained all of the image data that it can,
-   but it cannot decode the image (e.g. the image is corrupted, or the
-   format is not supported, or no data could be obtained).</dd>
+   but it cannot even decode the image enough to get the image
+   dimensions (e.g. the image is corrupted, or the format is not
+   supported, or no data could be obtained).</dd>
 
   </dl><p>When an <code><a href=#the-img-element>img</a></code> element is either in the <a href=#img-inc title=img-inc>partially available</a> state or in the <a href=#img-all title=img-all>completely available</a> state, it is said to be
   <dfn id=img-available title=img-available>available</dfn>.</p>
@@ -24647,7 +24649,7 @@
     source</a> once the resource has been <a href=#fetch title=fetch>fetched</a> must act as appropriate given the
     following alternatives:</p>
 
-    <dl class=switch><dt>If the download was successful</dt>
+    <dl class=switch><dt>If the download was successful and the user agent was able to determine the image's width and height</dt>
 
      <dd>Set the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-all title=img-all>completely available</a> state, update the
      presentation of the image appropriately, add the image to the
@@ -24675,15 +24677,14 @@
     a simple event</a> named <code title=event-load>load</code>
     at the <code><a href=#the-img-element>img</a></code> element.</p>
 
-    <p>If at any point the user agent discovers that the image data is
-    corrupted in some fatal way, or that the image data is not in a
-    supported file format, then the user agent must set the
-    <code><a href=#the-img-element>img</a></code> element to the <a href=#img-error title=img-error>broken</a> state. If the <a href=#fetch title=fetch>fetching</a> algorithm is still running for this
-    element, then the user agent must also abort that algorithm,
-    discarding any pending <a href=#concept-task title=concept-task>tasks</a>
-    generated by that algorithm, and then <a href=#queue-a-task>queue a task</a> to
-    <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-error>error</code> at the <code><a href=#the-img-element>img</a></code>
-    element.</p>
+    <p>Otherwise, either the image data is corrupted in some fatal way
+    such that the image dimensions cannot be obtained, or the image
+    data is not in a supported file format; the user agent must set
+    the <code><a href=#the-img-element>img</a></code> element to the <a href=#img-error title=img-error>broken</a> state, abort the <a href=#fetch title=fetch>fetching</a> algorithm, discarding any pending
+    <a href=#concept-task title=concept-task>tasks</a> generated by that
+    algorithm, and then <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a
+    simple event</a> named <code title=event-error>error</code>
+    at the <code><a href=#the-img-element>img</a></code> element.</p>
 
    </li>
 

Modified: source
===================================================================
--- source	2012-09-14 16:02:29 UTC (rev 7348)
+++ source	2012-09-15 02:09:57 UTC (rev 7349)
@@ -26255,12 +26255,14 @@
    <dd>The user agent has obtained some of the image data.</dd>
 
    <dt><dfn title="img-all">Completely available</dfn></dt>
-   <dd>The user agent has obtained all of the image data.</dd>
+   <dd>The user agent has obtained all of the image data and at least
+   the image dimensions are available.</dd>
 
    <dt><dfn title="img-error">Broken</dfn></dt>
    <dd>The user agent has obtained all of the image data that it can,
-   but it cannot decode the image (e.g. the image is corrupted, or the
-   format is not supported, or no data could be obtained).</dd>
+   but it cannot even decode the image enough to get the image
+   dimensions (e.g. the image is corrupted, or the format is not
+   supported, or no data could be obtained).</dd>
 
   </dl>
 
@@ -26488,7 +26490,7 @@
 
     <dl class="switch">
 
-     <dt>If the download was successful</dt>
+     <dt>If the download was successful and the user agent was able to determine the image's width and height</dt>
 
      <dd>Set the <code>img</code> element to the <span
      title="img-all">completely available</span> state, update the
@@ -26522,18 +26524,16 @@
     a simple event</span> named <code title="event-load">load</code>
     at the <code>img</code> element.</p>
 
-    <p>If at any point the user agent discovers that the image data is
-    corrupted in some fatal way, or that the image data is not in a
-    supported file format, then the user agent must set the
-    <code>img</code> element to the <span
-    title="img-error">broken</span> state. If the <span
-    title="fetch">fetching</span> algorithm is still running for this
-    element, then the user agent must also abort that algorithm,
-    discarding any pending <span title="concept-task">tasks</span>
-    generated by that algorithm, and then <span>queue a task</span> to
-    <span>fire a simple event</span> named <code
-    title="event-error">error</code> at the <code>img</code>
-    element.</p>
+    <p>Otherwise, either the image data is corrupted in some fatal way
+    such that the image dimensions cannot be obtained, or the image
+    data is not in a supported file format; the user agent must set
+    the <code>img</code> element to the <span
+    title="img-error">broken</span> state, abort the <span
+    title="fetch">fetching</span> algorithm, discarding any pending
+    <span title="concept-task">tasks</span> generated by that
+    algorithm, and then <span>queue a task</span> to <span>fire a
+    simple event</span> named <code title="event-error">error</code>
+    at the <code>img</code> element.</p>
 
    </li>
 




More information about the Commit-Watchers mailing list