W3C home > Mailing lists > Public > public-canvas-api@w3.org > April to June 2010

Inconsistent behaviour of globalCompositeOperation property

From: Jatinder Mann <jmann@microsoft.com>
Date: Tue, 25 May 2010 18:56:38 +0000
To: "public-canvas-api@w3.org" <public-canvas-api@w3.org>
Message-ID: <EAACC9DF6817544486F0D0ADA05CA4281A4A63C5@TK5EX14MBXC120.redmond.corp.microsoft.com>
As we were reviewing the globalCompositeOperation property [1] of the Canvas 2D Context, we have noticed that there is a large inconsistency with the way web browsers implement this property.



Firefox 3.6.3 and Opera 10.5 have a similar behaviour that matches the current version of the Canvas 2D Context spec. Chrome 4.1 and Safari 4.0.5 behave similarly to each other, albeit differently from the spec. Today, web developers cannot reliably use this property in designing their webpages due to this interoperability issue.



We consider that the Safari implementation of the Drawing Model makes more sense from a web developer point of view. Most of the Canvas APIs are applied to the next primitive being drawn. However, the clipping behavior, as defined in the current Drawing Model [2], affects the current contents of the Canvas outside of the current primitive being drawn. The Safari Drawing Model calls for the clipping region to only affect the current primitive being drawn.



We recommend updating the spec to match the Safari Drawing Model. We would like to discuss this area in more detail.



Thank you,

Jatinder



[1] http://dev.w3.org/html5/2dcontext/#compositing

[2] http://dev.w3.org/html5/2dcontext/#drawing-model



Jatinder Mann | Microsoft Program Manager | jmann@microsoft.com<mailto:jmann@microsoft.com>
Received on Tuesday, 25 May 2010 18:57:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:31:50 UTC