W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Default value of "complete" attribute on new Image objects

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 10 Aug 2010 17:06:36 -0700
Message-ID: <AANLkTimHc+-t-CYgw=nn2sZDibhizDnAugmcMiHJDtyp@mail.gmail.com>
On Tue, Aug 10, 2010 at 4:56 PM, Philip Taylor <excors+whatwg at gmail.com> wrote:
> On Wed, Aug 11, 2010 at 12:23 AM, Ian Hickson <ian at hixie.ch> wrote:
>> I've updated the spec to have complete return true if the src is the empty
>> string.
>
> Some canvas methods (drawImage, createPattern) are defined in terms of
> the complete attribute ("If the image argument is an HTMLImageElement
> object whose complete attribute is false, [...] then the
> implementation must return without drawing anything."). Now that it
> can be true when the image doesn't have any image data, what should
> they do when passed such an image?

Isn't the image fully loaded, just empty? Seems like drawing such an
image should act "normal". It just so happens that "normal" for an
empty image would be to draw nothing?

Just have to avoid divide-by-zero errors when creating patterns :)

/ Jonas
Received on Tuesday, 10 August 2010 17:06:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:59 UTC