Skip to content

Commit

Permalink
[giow] (2) Fix all the bits that referred to img.complete and assumed…
Browse files Browse the repository at this point in the history
… it was not returning 'true' when src was missing (that changed recently).

git-svn-id: http://svn.whatwg.org/webapps@5282 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 11, 2010
1 parent 5c67e57 commit 967724c
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 67 deletions.
54 changes: 32 additions & 22 deletions complete.html
Expand Up @@ -20362,14 +20362,13 @@ <h4 id=the-img-element><span class=secno>4.8.1 </span>The <dfn><code>img</code><
else 0. <a href=#refsCSS>[CSS]</a></p>

<p>The IDL attribute <dfn id=dom-img-complete title=dom-img-complete><code>complete</code></dfn> must return
true if the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute's value
is the empty string or if the user agent has fetched the image
specified in the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute,
and it is in a supported image type (i.e. it was decoded without
fatal errors), even if the final <a href=#concept-task title=concept-task>task</a> queued by the <a href=#networking-task-source>networking task
source</a> for the <a href=#fetch title=fetch>fetching</a> of the
image resource has not yet been processed. Otherwise, the attribute
must return false.</p>
true if either the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute
is omitted, or its value is the empty string, or if the user agent
has fetched the image specified in the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute and it is in a supported
image type (i.e. it was decoded without fatal errors), even if the
final <a href=#concept-task title=concept-task>task</a> queued by the
<a href=#networking-task-source>networking task source</a> for the <a href=#fetch title=fetch>fetching</a> of the image resource has not yet been
processed. Otherwise, the attribute must return false.</p>

<p class=note>The value of <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> can thus change while a
<a href=#concept-script title=concept-script>script</a> is executing.</p>
Expand Down Expand Up @@ -30634,12 +30633,13 @@ <h6 id=colors-and-styles><span class=secno>4.8.11.1.4 </span>Colors and styles</
exception.</p> <!-- drawImage() has an equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false, or
if the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false or whose
<code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is omitted or empty,
or if the <var title="">image</var> argument is an
<code><a href=#htmlvideoelement>HTMLVideoElement</a></code> object whose <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either
<code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> or <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, then the
implementation must return null.</p>
<!-- drawImage() has an equivalent paragraph -->
implementation must return null.</p> <!-- drawImage() has an
equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlcanvaselement>HTMLCanvasElement</a></code> object with either a horizontal
Expand Down Expand Up @@ -32129,12 +32129,13 @@ <h6 id=images><span class=secno>4.8.11.1.11 </span>Images</h6>
exception.</p> <!-- createPattern() has an equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false, or
if the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false or whose
<code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is omitted or empty,
or if the <var title="">image</var> argument is an
<code><a href=#htmlvideoelement>HTMLVideoElement</a></code> object whose <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either
<code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> or <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, then the
implementation must return without drawing anything.</p>
<!-- createPattern() has an equivalent paragraph -->
implementation must return without drawing anything.</p> <!--
createPattern() has an equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlcanvaselement>HTMLCanvasElement</a></code> object with either a horizontal
Expand Down Expand Up @@ -47022,8 +47023,9 @@ <h6>The columns</h6>

<li><p>If the <var title="">icon</var> argument is present and not
null, but the given <code>img</code> element's <code
title="dom-img-complete">complete</code> attribute is false, then
let <var title="">icon</var> be null.</p></li>
title="dom-img-complete">complete</code> attribute is false or its
<code title="attr-img-src">src</code> attribute is omitted or
empty, then let <var title="">icon</var> be null.</p></li>

<li><p>If the <var title="">icon</var> argument is present and not
null, then copy the image data from that <code>img</code> element,
Expand Down Expand Up @@ -47698,7 +47700,9 @@ <h6>The rows</h6>
an <code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -47712,7 +47716,9 @@ <h6>The rows</h6>
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -47726,7 +47732,9 @@ <h6>The rows</h6>
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -47739,7 +47747,9 @@ <h6>The rows</h6>
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand Down
54 changes: 32 additions & 22 deletions index
Expand Up @@ -20286,14 +20286,13 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
else 0. <a href=#refsCSS>[CSS]</a></p>

<p>The IDL attribute <dfn id=dom-img-complete title=dom-img-complete><code>complete</code></dfn> must return
true if the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute's value
is the empty string or if the user agent has fetched the image
specified in the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute,
and it is in a supported image type (i.e. it was decoded without
fatal errors), even if the final <a href=#concept-task title=concept-task>task</a> queued by the <a href=#networking-task-source>networking task
source</a> for the <a href=#fetch title=fetch>fetching</a> of the
image resource has not yet been processed. Otherwise, the attribute
must return false.</p>
true if either the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute
is omitted, or its value is the empty string, or if the user agent
has fetched the image specified in the <code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute and it is in a supported
image type (i.e. it was decoded without fatal errors), even if the
final <a href=#concept-task title=concept-task>task</a> queued by the
<a href=#networking-task-source>networking task source</a> for the <a href=#fetch title=fetch>fetching</a> of the image resource has not yet been
processed. Otherwise, the attribute must return false.</p>

<p class=note>The value of <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> can thus change while a
<a href=#concept-script title=concept-script>script</a> is executing.</p>
Expand Down Expand Up @@ -30561,12 +30560,13 @@ idea from Mihai:
exception.</p> <!-- drawImage() has an equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false, or
if the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false or whose
<code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is omitted or empty,
or if the <var title="">image</var> argument is an
<code><a href=#htmlvideoelement>HTMLVideoElement</a></code> object whose <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either
<code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> or <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, then the
implementation must return null.</p>
<!-- drawImage() has an equivalent paragraph -->
implementation must return null.</p> <!-- drawImage() has an
equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlcanvaselement>HTMLCanvasElement</a></code> object with either a horizontal
Expand Down Expand Up @@ -32056,12 +32056,13 @@ v5DVT (also check for '- -' bits in the part above) --><p>The <dfn id=dom-contex
exception.</p> <!-- createPattern() has an equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false, or
if the <var title="">image</var> argument is an
<code><a href=#htmlimageelement>HTMLImageElement</a></code> object whose <code title=dom-img-complete><a href=#dom-img-complete>complete</a></code> attribute is false or whose
<code title=attr-img-src><a href=#attr-img-src>src</a></code> attribute is omitted or empty,
or if the <var title="">image</var> argument is an
<code><a href=#htmlvideoelement>HTMLVideoElement</a></code> object whose <code title=dom-media-readyState><a href=#dom-media-readystate>readyState</a></code> attribute is either
<code title=dom-media-HAVE_NOTHING><a href=#dom-media-have_nothing>HAVE_NOTHING</a></code> or <code title=dom-media-HAVE_METADATA><a href=#dom-media-have_metadata>HAVE_METADATA</a></code>, then the
implementation must return without drawing anything.</p>
<!-- createPattern() has an equivalent paragraph -->
implementation must return without drawing anything.</p> <!--
createPattern() has an equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code><a href=#htmlcanvaselement>HTMLCanvasElement</a></code> object with either a horizontal
Expand Down Expand Up @@ -46949,8 +46950,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {

<li><p>If the <var title="">icon</var> argument is present and not
null, but the given <code>img</code> element's <code
title="dom-img-complete">complete</code> attribute is false, then
let <var title="">icon</var> be null.</p></li>
title="dom-img-complete">complete</code> attribute is false or its
<code title="attr-img-src">src</code> attribute is omitted or
empty, then let <var title="">icon</var> be null.</p></li>

<li><p>If the <var title="">icon</var> argument is present and not
null, then copy the image data from that <code>img</code> element,
Expand Down Expand Up @@ -47625,7 +47627,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
an <code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -47639,7 +47643,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -47653,7 +47659,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -47666,7 +47674,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand Down
57 changes: 34 additions & 23 deletions source
Expand Up @@ -21677,15 +21677,15 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {

<p>The IDL attribute <dfn
title="dom-img-complete"><code>complete</code></dfn> must return
true if the <code title="attr-img-src">src</code> attribute's value
is the empty string or if the user agent has fetched the image
specified in the <code title="attr-img-src">src</code> attribute,
and it is in a supported image type (i.e. it was decoded without
fatal errors), 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>
true if either the <code title="attr-img-src">src</code> attribute
is omitted, or its value is the empty string, or if the user agent
has fetched the image specified in the <code
title="attr-img-src">src</code> attribute and it is in a supported
image type (i.e. it was decoded without fatal errors), 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>

<p class="note">The value of <code
title="dom-img-complete">complete</code> can thus change while a
Expand Down Expand Up @@ -33612,14 +33612,15 @@ idea from Mihai:

<p>If the <var title="">image</var> argument is an
<code>HTMLImageElement</code> object whose <code
title="dom-img-complete">complete</code> attribute is false, or
if the <var title="">image</var> argument is an
title="dom-img-complete">complete</code> attribute is false or whose
<code title="attr-img-src">src</code> attribute is omitted or empty,
or if the <var title="">image</var> argument is an
<code>HTMLVideoElement</code> object whose <code
title="dom-media-readyState">readyState</code> attribute is either
<code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code> or <code
title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, then the
implementation must return null.</p>
<!-- drawImage() has an equivalent paragraph -->
implementation must return null.</p> <!-- drawImage() has an
equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code>HTMLCanvasElement</code> object with either a horizontal
Expand Down Expand Up @@ -35381,14 +35382,15 @@ v5DVT (also check for '- -' bits in the part above) -->

<p>If the <var title="">image</var> argument is an
<code>HTMLImageElement</code> object whose <code
title="dom-img-complete">complete</code> attribute is false, or
if the <var title="">image</var> argument is an
title="dom-img-complete">complete</code> attribute is false or whose
<code title="attr-img-src">src</code> attribute is omitted or empty,
or if the <var title="">image</var> argument is an
<code>HTMLVideoElement</code> object whose <code
title="dom-media-readyState">readyState</code> attribute is either
<code title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code> or <code
title="dom-media-HAVE_METADATA">HAVE_METADATA</code>, then the
implementation must return without drawing anything.</p>
<!-- createPattern() has an equivalent paragraph -->
implementation must return without drawing anything.</p> <!--
createPattern() has an equivalent paragraph -->

<p>If the <var title="">image</var> argument is an
<code>HTMLCanvasElement</code> object with either a horizontal
Expand Down Expand Up @@ -52736,8 +52738,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {

<li><p>If the <var title="">icon</var> argument is present and not
null, but the given <code>img</code> element's <code
title="dom-img-complete">complete</code> attribute is false, then
let <var title="">icon</var> be null.</p></li>
title="dom-img-complete">complete</code> attribute is false or its
<code title="attr-img-src">src</code> attribute is omitted or
empty, then let <var title="">icon</var> be null.</p></li>

<li><p>If the <var title="">icon</var> argument is present and not
null, then copy the image data from that <code>img</code> element,
Expand Down Expand Up @@ -53412,7 +53415,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
an <code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -53426,7 +53431,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -53440,7 +53447,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand All @@ -53453,7 +53462,9 @@ interface <dfn>RenderingContext2DCallback</dfn> {
<code>img</code> element.</p>

<p>If there is an <code>img</code> element specified, its <code
title="dom-img-complete">complete</code> attribute is true.</p>
title="dom-img-complete">complete</code> attribute is true and
its <code title="attr-img-src">src</code> attribute is neither
omitted nor empty.</p>

</dd>

Expand Down

0 comments on commit 967724c

Please sign in to comment.