HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
2566[Authors] [Conformance Checkers] [Gecko] [Internet Explorer] [Opera] [Webkit] Make <img src=''> a special case. (credit: bz)2008-12-24 11:04
@@ -15590,21 +15590,24 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
 
   <p>The image given by the <dfn
   title="attr-img-src"><code>src</code></dfn> attribute is the
   embedded content, and the value of the <dfn
   title="attr-img-alt"><code>alt</code></dfn> attribute is the
   <code>img</code> element's <span>fallback content</span>.</p>
 
   <p>The <code title="attr-img-src">src</code> attribute must be
   present, and must contain a <span>valid URL</span> referencing a
   non-interactive, optionally animated, image resource that is neither
-  paged nor scripted.</p>
+  paged nor scripted. If the <i>base URI of the element</i> is the
+  same as <span>the document's address</span>, then the <code
+  title="attr-img-src">src</code> attribute's value must not be the
+  empty string.</p>
 
   <p class="note">Images can thus be static bitmaps (e.g. PNGs, GIFs,
   JPEGs), single-page vector documents (single-page PDFs, XML files
   with an SVG root element), animated bitmaps (APNGs, animated GIFs),
   animated vector graphics (XML files with an SVG root element that
   use declarative SMIL animation), and so forth. However, this also
   precludes SVG files with script, multipage PDF files, interactive
   MNG files, HTML documents, plain text documents, and so forth.</p>
 
   <p>The requirements on the <code title="attr-img-alt">alt</code>
@@ -15623,22 +15626,29 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
   add anything useful to the document.</p>
 
   <hr>
 
   <p>When an <code>img</code> is created with a <code
   title="attr-img-src">src</code> attribute, and whenever the <code
   title="attr-img-src">src</code> attribute is set subsequently, the
   user agent must <span>fetch</span> the resource specifed by the
   <code title="attr-img-src">src</code> attribute's value, unless the
   user agent cannot support images, or its support for images has been
-  disabled, or the user agent only fetches elements on demand.</p>
-  <!-- Note how this does NOT happen when the base URL changes. -->
+  disabled, or the user agent only fetches elements on demand, or the
+  element's <code title="attr-img-src">src</code> attribute has a
+  value that is an <i>ignored self-reference</i>.</p> <!-- Note how
+  this does NOT happen when the base URL changes. -->
+
+  <p>The <code title="attr-img-src">src</code> attribute's value is an
+  <i>ignored self-reference</i> if its value is the empty string, and
+  the <i>base URI of the element</i> is the same as <span>the
+  document's address</span>.</p>
 
   <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>
@@ -15647,20 +15657,26 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
   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>If the image was not fetched (e.g. because the UA's image support
+  is disabled, or because the <code title="attr-img-src">src</code>
+  attribute's value is an <i>ignored self-reference</i>), or if the
+  conditions in the previous paragraph are not met, then the image is
+  <em>not</em> <i>available</i>.</p>
+
   <p>Whether the image is fetched successfully or not (e.g. whether
   the response code was a 2xx code <span
   title="concept-http-equivalent-codes">or equivalent</span>) 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
@@ -15708,23 +15724,23 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
    <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 <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>
+    <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>
 
    <dt>If the <code title="attr-img-src">src</code> attribute is set

|