W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2013

Re: [whatwg] A question about the drawimage() canvas function

From: Rik Cabanier <cabanier@gmail.com>
Date: Fri, 1 Mar 2013 14:45:09 -0800
Message-ID: <CAGN7qDCbXfj+ohX8gM07HTxWrbSPgud5+RxjQE3VUtYrrRRuyg@mail.gmail.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: (wrong string) Ž‹“— <wang.tietao@outlook.com>, WHAT Working Group <whatwg@whatwg.org>
On Fri, Mar 1, 2013 at 2:40 PM, Glenn Maynard <glenn@zewt.org> wrote:

> On Fri, Mar 1, 2013 at 4:24 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> I think it should say:
>>
>>>
>>> 1. If the image argument is an HTMLImageElement object in the broken
>>> state, then throw an InvalidStateError exception, return aborted and abort
>>> these steps.
>>> 2. If the image argument is an HTMLImageElement object that is not fully
>>> decodable, or if the image argument is an HTMLVideoElement object whose
>>> readyState attribute is either HAVE_NOTHING or HAVE_METADATA, then return
>>> bad and abort these steps.
>>> 3. (original step 2, unchanged)
>>>
>>
>> I think original step 2 should be updated to *CanvasImageSource* instead
>> of HTMLImageElement. This is certainly how webkit implemented it.
>>
>
> That sounds fine too, as long as you mean in addition to the above and not
> instead of.
>
> (If you mean instead of, I disagree.  As far as throwing or not throwing
> based on the broken or loading state question, it seems like WebKit should
> change to match FF and IE, since those two already agree, and WebKit also
> agrees with one of the two drawImage overloads tested.)
>
>
Sorry about being unclear. Yes, I meant in addition of.
So:
- add your suggested step 1
- change HTMLImageElement from original step 2 to CanvasImageSource
Received on Friday, 1 March 2013 22:45:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 1 March 2013 22:45:35 GMT