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

Kang-Hao (Kenny) Lu kanghaol at oupeng.com
Fri Mar 1 19:01:50 PST 2013


(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/



More information about the whatwg mailing list