Browse files

[acgiow] (2) Make <img src=''> a special case. (credit: bz)

git-svn-id: http://svn.whatwg.org/webapps@2566 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent c834515 commit 447abc78d3ede7b24a7f991a1b1dce8bb683dcb4 @Hixie Hixie committed Dec 24, 2008
Showing with 43 additions and 12 deletions.
  1. +21 −6 index
  2. +22 −6 source
View
27 index
@@ -14600,7 +14600,9 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
<p>The <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute must be
present, and must contain a <a href=#valid-url>valid URL</a> 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 <a href="#the-document's-address">the document's address</a>, then the <code title=attr-img-src><a href=#attr-img-src>src</a></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
@@ -14628,8 +14630,15 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
user agent must <a href=#fetch>fetch</a> the resource specifed by the
<code title=attr-img-src><a href=#attr-img-src>src</a></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><a href=#attr-img-src>src</a></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><a href=#attr-img-src>src</a></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 <a href="#the-document's-address">the
+ document's address</a>.</p>
<p>Fetching the image must <a href=#delay-the-load-event>delay the <code title=event-load>load</code> event</a>.</p>
@@ -14650,6 +14659,12 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
the image is being <a href=#fetch title=fetch>fetched</a> 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><a href=#attr-img-src>src</a></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 <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>) must be
ignored when determining the image's type and whether it is a valid
@@ -14699,9 +14714,9 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
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><a href=#attr-img-src>src</a></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><a href=#attr-img-src>src</a></code>
attribute.</p>
<p>Otherwise, the element represents nothing, and may be omitted
View
28 source
@@ -15597,7 +15597,10 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
<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
@@ -15630,8 +15633,15 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
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>
@@ -15654,6 +15664,12 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
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
@@ -15715,9 +15731,9 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
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

0 comments on commit 447abc7

Please sign in to comment.