W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Canvas feedback (various threads)

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 11 Feb 2011 20:34:49 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1102112026120.26730@ps20323.dreamhostps.com>
On Thu, 10 Feb 2011, Boris Zbarsky wrote:
> On 2/10/11 11:31 PM, Ian Hickson wrote:
> > I think you had a typo in your test. As far as I can tell, all
> > WebKit-based browsers act the same as Opera and Firefox 3 on this:
> > 
> >     http://software.hixie.ch/utilities/js/canvas/?c.clearRect(0%2C%200%2C%20640%2C%20480)%3B%0Ac.save()%3B%0Atry%20%7B%0A%20%20c.strokeStyle%20%3D%20'red'%3B%0A%20%20c.fillText(c.strokeStyle%2C%2020%2C%2080)%3B%0A%20%20c.strokeStyle%20%3D%20'transparent'%3B%0A%20%20c.fillText(c.strokeStyle%2C%2020%2C%20120)%3B%0A%7D%20finally%20%7B%0A%20%20c.restore()%3B%0A%7D%0A
> 
> On that test, Safari 5.0.3 on Mac outputs "red" and "transparent" for 
> the two strings.

Huh. Interesting. I never test release browsers, totally missed this. :-)

Thanks.


> > > Which is less interop than it seems (due to Safari's behavior), and 
> > > about to disappear completely, since both IE9 and Firefox 4 will 
> > > ship with the 0 instead of 0.0....  :(
> > 
> > Is there no chance to fix this in Firefox 4? It _is_ a regression. :-)
> 
> At this point, probably not.  If it's not actively breaking websites 
> it's not being changed before final release.  If it is, we'd at least 
> think about it...

Well I don't really mind what we do at this point.

I'm assuming you're not suggesting changing the alpha=1 case (which is 
also different between CSS and canvas). Is that right?

I guess with IE9 and Firefox4 about to go to the "0" behaviour, and Safari 
still having "0" behaviour, and Opera and Chrome being the only ones doing 
what the spec says, we should move to "0"...

I've changed the spec to make alpha<1 colours work like CSS, and I've 
marked this part of the spec as controversial so that people are aware 
that it could change again. I guess we'll look at the interop here again 
in a few months and see if it's any better. My apologies to Opera and 
WebKit for getting screwed by following the spec.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 11 February 2011 12:34:49 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC