[whatwg] Compatibility problems with HTML5 Canvas spec.

Oliver Hunt oliver at apple.com
Tue Sep 25 14:34:21 PDT 2007

On 25/09/2007, at 2:19 PM, Philip Taylor wrote:

> On 25/09/2007, Oliver Hunt <oliver at apple.com> wrote:
>> Firefox 2/3 and Safari 2 clear the context's path on strokeRect/
>> fillRect, this violates the spec -- but there are many websites that
>> now rely on such behaviour despite the behaviour defined in hmtl5.
>> This means that those browsers that match the current draft (eg.
>> Safari 3 and Opera 9.x) fail to render these websites "correctly".
> How hard would it be to get those sites fixed? If there are problems
> in something like PlotKit or Reflection.js, which lots of people copy
> onto their own servers, then it would be a pain to break
> compatibility. If it's just sites like canvaspaint.org where there is
> a single copy of the code and the developer still exists and can
> update it, it seems a much less significant problem to break
> compatibility.

I've only seen it on major sites -- it just appears that FFX3 is  
to be updated to match the correct behaviour, which is worrying in  
terms of compatibility.

Certainly I would prefer that FFX behaviour was fixed as the spec'd  
behaviour is much
more technically sane.

>> Unfortunately it isn't really an edge case as it's a relatively
>> common occurance -- people expect that the rect drawing function (for
>> example) will clear the path, so expect clearRect
>> (myCanvasElement.width, myCanvasElement.height) to clear the rect and
>> reset the path, and other similarly exciting things :-/
> Firefox also resets the path on drawImage and putImageData, unlike
> Opera and Safari 3 - do people depend on that behaviour too?

That honestly never occurred to me :-O

I can't see why people would expect it to, but i wouldn't have  
thought they'd think that about fill/strokeRect :-/

>> --Oliver
> -- 
> Philip Taylor
> excors at gmail.com

More information about the whatwg mailing list