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

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

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Sat, 02 Mar 2013 11:01:50 +0800
Message-ID: <51316B9E.3030208@oupeng.com>
To: Glenn Maynard <glenn@zewt.org>
Cc: 王铁套 <wang.tietao@outlook.com>, Rik Cabanier <cabanier@gmail.com>, WHAT Working Group <whatwg@whatwg.org>
(13/03/02 5:59), Glenn Maynard wrote:
> I recommend leaving Firefox alone and changing WebKit (and the spec) to
> match Firefox, because we already have interop (at least in the cases I
> tested) between Firefox and IE, and we already have interop during loads in
> all three.  Changing WebKit to throw after loading will get everyone doing
> the same thing--changing Firefox will still leave IE out.
> 
> (I haven't tested with IE10, FWIW, only IE9.)

IE10 behaves the same in your test case.

(13/03/02 6:45), Rik Cabanier wrote:
> Sorry about being unclear. Yes, I meant in addition of.
> So:
> - add your suggested step 1
> - change HTMLImageElement from original step 2 to CanvasImageSource

Did you mean to say "change *HTMLCanvasElement* from original step 2 to
CanvasImageSource" here? The original step 2 has

  # If the image argument is an HTMLCanvasElement object with either a
  # horizontal dimension or a vertical dimension equal to zero, then
  # the implementation throw an InvalidStateError exception and return
  # aborted.

(13/03/02 9:41), Glenn Maynard wrote:
> But why does it throw this exception in the first place?  It's a weird
> special case.  Blitting a zero-size image should do nothing, just like
> drawImage(src, 0, 0, 0, 0).

Just curious. Does it have to be SVG for an image to be zero-sized?



Cheers,
Kenny
-- 
Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Saturday, 2 March 2013 03:02:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 2 March 2013 03:02:22 GMT