HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2097More thoroughly make the <img> processing model work with the new fetching and event loop definitions.2008-08-21 10:25
@@ -13534,30 +13534,30 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
   <p>Fetching the image must <span>delay the <code
   title="event-load">load</code> event</span>.</p>
 
   <p class="warning">This, unfortunately, can be used to perform a
   rudimentary port scan of the user's local network (especially in
   conjunction with scripting, though scripting isn't actually
   necessary to carry out such an attack). User agents may implement
   <span title="origin">cross-origin</span> access control policies
   that mitigate this attack.</p>
 
-  <p>Once the resource has been fetched, if the image is a valid and
-  supported image, then the image is said to be <i>available</i>; the
-  user agent must <span>fire a <code title="event-load">load</code>
-  event</span> on the <code>img</code> element (this happens after
-  <code title="dom-img-complete">complete</code> starts returning
-  true). If the fetching process 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 <span>fire an <code
-  title="event-error">error</code> event</span> on the
-  <code>img</code> element.</p>
+  <p>If the image's type is a supported image type, and the image is a
+  valid image of that type, then the image is said to be
+  <i>available</i> (this affects exactly what the element represents,
+  as defined below). This can be true even before the image is
+  completely downloaded, if the user agent supports incremental
+  rendering of images; in such cases, each <span
+  title="concept-task">task</span> that is <span title="queue a
+  task">queued</span> by the <span>networking task source</span> while
+  the image is being <span title="fetch">fetched</span> must update
+  the presentation of the image appropriately.</p>
 
   <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>
 
   <p class="note">This allows servers to return images with error
   responses, and have them displayed.</p>
 
   <p>The user agents should apply the <span title="Content-Type
   sniffing: image">image sniffing rules</span> to determine the type
@@ -13572,39 +13572,53 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
   HTML element). User agents must not run executable code
   (e.g. scripts) embedded in the image resource. User agents must only
   display the first page of a multipage resource (e.g. a PDF
   file). User agents must not allow the resource to act in an
   interactive fashion, but should honour any animation in the
   resource.</p>
 
   <p>This specification does not specify which image types are to be
   supported.</p>
 
+  <p>The <span title="concept-task">task</span> that is <span
+  title="queue a task">queued</span> by the <span>networking task
+  source</span> once the resource has been <span
+  title="fetch">fetched</span>, must, if the download was successful
+  and the image is <i>available</i>, <span>queue a task</span> to
+  <span>fire a <code title="event-load">load</code> event</span> on
+  the <code>img</code> element (this happens after <code
+  title="dom-img-complete">complete</code> starts returning true); and
+  otherwise, if the fetching process fails without a response from the
+  remote server, or completes but the image is not a valid or
+  supported image, <span>queue a task</span> to <span>fire an <code
+  title="event-error">error</code> event</span> on the
+  <code>img</code> element.</p>
+
   <hr>
 
   <p>What an <code>img</code> element represents depends on the <code
   title="attr-img-src">src</code> attribute and the <code
   title="attr-img-alt">alt</code> attribute.</p>
 
   <dl class="switch">
 
    <dt>If the <code title="attr-img-src">src</code> attribute is set
    and the <code title="attr-img-alt">alt</code> attribute is set to
    the empty string</dt>
 
    <dd>
 
     <p>The image is either decorative or supplemental to the rest of
     the content, redundant with some other information in the
     document.</p>
 
-    <p>If the image is available and the user agent is configured to
+    <p>If the image is <i>available</i> and the user agent is configured to
     display that image, then the element represents the image
     specified by the <code title="attr-img-src">src</code>
     attribute.</p>
 
     <p>Otherwise, the element represents nothing, and may be omitted
     completely from the rendering. User agents may provide the user
     with a notification that an image is present but has been omitted
     from the rendering.</p>
 
    </dd>
@@ -13619,68 +13633,68 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
 
     <p>The image is a key part of the content, and there is no textual
     equivalent of the image available. The string consisting of all
     the characters between the first and the last character of the
     value of the <code title="attr-img-alt">alt</code> attribute gives
     the kind of image (e.g. photo, diagram, user-uploaded image). If
     that value is the empty string (i.e. the attribute is just "<code
     title="">{}</code>"), then even the kind of image being shown is
     not known.</p>
 
-    <p>If the image is available, the element represents the image
+    <p>If the image is <i>available</i>, the element represents the image
     specified by the <code title="attr-img-src">src</code>
     attribute.</p>
 
-    <p>If the image is not available or if the user agent is not
+    <p>If the image is not <i>available</i> or if the user agent is not
     configured to display the image, then the user agent should
     display some sort of indicator that the image is not being
     rendered, and, if possible, provide to the user the information
     regarding the kind of image that is (as derived from the <code
     title="attr-img-alt">alt</code> attribute).</p>
 
    </dd>
 
    <dt>If the <code title="attr-img-src">src</code> attribute is set
    and the <code title="attr-img-alt">alt</code> attribute is set to a
    value that isn't matched by the previous two entries (not empty,
    not "<code title="">{...}</code>")</dt>
 
    <dd>
 
     <p>The image is a key part of the content; the <code
     title="attr-img-alt">alt</code> attribute gives a textual
     equivalent or replacement for the image.</p>
 
-    <p>If the image is available and the user agent is configured to
+    <p>If the image is <i>available</i> and the user agent is configured to
     display that image, then the element represents the image
     specified by the <code title="attr-img-src">src</code>
     attribute.</p>
 
     <p>Otherwise, the element represents the text given by the <code
     title="attr-img-alt">alt</code> attribute. User agents may provide
     the user with a notification that an image is present but has been
     omitted from the rendering.</p>
 
    </dd>
 
    <dt>If the <code title="attr-img-src">src</code> attribute is set
    and the <code title="attr-img-alt">alt</code> attribute is not</dt>
 
    <dd>
 
     <p>The image's role in the document is unknown.</p>
 
-    <p>If the image is available, the element represents the image
+    <p>If the image is <i>available</i>, the element represents the image
     specified by the <code title="attr-img-src">src</code>
     attribute.</p>
 
-    <p>If the image is not available or if the user agent is not
+    <p>If the image is not <i>available</i> or if the user agent is not
     configured to display the image, then the user agent may display
     some sort of indicator that the image is not being rendered.</p>
 
    </dd>
 
    <dt>If the <code title="attr-img-src">src</code> attribute is not
    set and the <code title="attr-img-alt">alt</code> attribute is set
    to a string whose first character is a U+007B LEFT CURLY BRACKET
    character ({) and whose last character is a U+007D RIGHT CURLY
    BRACKET character (})</dt>
@@ -13762,22 +13776,22 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
   title="dom-img-isMap"><code>isMap</code></dfn> each must
   <span>reflect</span> the respective content attributes of the same
   name.</p>
 
   <p>The DOM attributes <dfn
   title="dom-img-width"><code>width</code></dfn> and <dfn
   title="dom-img-height"><code>height</code></dfn> must return the
   rendered width and height of the image, in CSS pixels, if the image
   is being rendered, and is being rendered to a visual medium; or else
   the intrinsic with and height of the image, in CSS pixels, if the
-  image is available but not being rendered to a visual medium; or
-  else 0, if the image is not available or its dimensions are not
+  image is <i>available</i> but not being rendered to a visual medium; or
+  else 0, if the image is not <i>available</i> or its dimensions are not
   known. <a href="#refsCSS21">[CSS21]</a></p>
 
   <p>The DOM attribute <dfn
   title="dom-img-complete"><code>complete</code></dfn> must return
   true if the user agent has fetched the image specified in the <code
   title="attr-img-src">src</code> attribute, and it is a valid image,
   even if the final <span title="concept-task">task</span> queued by
   the <span>networking task source</span> for the <span
   title="fetch">fetching</span> of the image resource has not yet been
   processed. Otherwise, the attribute must return false.</p>
@@ -14140,21 +14154,21 @@ than its green and orange slices, which is always a good sign.&lt;/p>
 green question mark centered inside it.">&lt;/p></strong>
 
 &lt;p>How unoriginal can you get? I mean, oooooh, a question mark, how
 &lt;em>revolutionary&lt;/em>, how utterly &lt;em>ground-breaking&lt;/em>, I'm
 sure everyone will rush to adopt those specifications now! They could
 at least have tried for some sort of, I don't know, sequence of
 rounded squares with varying shades of green and bold white outlines,
 at least that would look good on the cover of a blue book.&lt;/p></pre>
 
    <p>This example shows how the alternative text should be written
-   such that if the image isn't available, and the text is used
+   such that if the image isn't <i>available</i>, and the text is used
    instead, the text flows seamlessly into the surrounding text, as
    if the image had never been there in the first place.</p>
 
   </div>
 
 
   <h6>Text that has been rendered to a graphic for typographical effect</h6>
 
   <p>Sometimes, an image just consists of text, and the purpose of the
   image is not to highlight the actual typographic effects used to

|