Re: Clarification on CanvasGradient Behaviour

Jatinder Mann wrote:
> Hi,
> 
> As we continue to review the HTML5 Canvas 2D Context Specification
> [1] we came across an issue that needs clarification in Section 5
> Colors and styles.
> 
> What is the expected behaviour when a CanvasGradient object is
> modified after it gets assigned? Does the drawing use the parameters
> of the gradient at the time of assignment or at the time of drawing?

Test case: 
http://philip.html5.org/tests/canvas/suite/tests/2d.gradient.object.update.html

It looks like the latest versions of Firefox, Opera, Safari and 
Konqueror agree that the gradient is drawn based on the stops that are 
present at the time of drawing (which is the behaviour the test 
expects). Only Chrome disagrees and uses the stops at the time of 
assignment.

I don't see anything in the spec that is explicit about this, so I agree 
it would be nice to clarify it. It may be best if you could file a bug 
(<http://www.w3.org/Bugs/Public/enter_bug.cgi?component=HTML5%20spec%20bugs&product=HTML%20WG>) 
to ensure that the editor sees it and responds to it.

-- 
Philip Taylor
pjt47@cam.ac.uk

Received on Wednesday, 3 March 2010 17:23:06 UTC