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

[whatwg] CanvasRenderingContext2D::createPattern and partially loaded images

From: Eric Seidel <eric@webkit.org>
Date: Fri, 8 Aug 2008 17:04:47 -0700
Message-ID: <f3f9e0a30808081704x13f91859yc2c8deb2602b70a8@mail.gmail.com>
Nevermind:

If the image argument is an HTMLImageElement object whose complete
attribute is false, then the implementation must raise an
INVALID_STATE_ERR exception.

-eric

On Fri, Aug 8, 2008 at 5:03 PM, Eric Seidel <eric at webkit.org> wrote:
> http://www.whatwg.org/specs/web-apps/current-work/#createpattern
>
> Notes that:
> The first argument gives the image to use as the pattern (either an
> HTMLImageElement or an HTMLCanvasElement). Modifying this image after
> calling the createPattern() method must not affect the pattern.
>
> What does this mean for images which are not yet fully loaded from the
> network?  Safari's current behavior is that the pattern will draw the
> image with as much data as we know about that network resource *at the
> time the pattern is drawn*.  Instead of at the time the pattern is
> created (as the spec seems to imply).  Meaning if you're a web author,
> and you don't bother to listen for Image load events, if your user is
> on a slow network, each time you draw your pattern, you'll have
> slightly more of the image until it completes.
>
> I can disable this feature of Safari (make it so that
> "createPattern()" creates a copy of the image, in whatever loaded
> state it may be), or we can change the spec to say that incremental
> loading images do not count as "modifying the image after calling
> createPattern()".
>
> Thoughts?
>
> -eric
>
Received on Friday, 8 August 2008 17:04:47 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC