[whatwg] Canvas feedback (various threads)

James Robinson jamesr at google.com
Thu Feb 10 20:54:40 PST 2011


On Thu, Feb 10, 2011 at 8:39 PM, Boris Zbarsky <bzbarsky at mit.edu> 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.
>
> And this test:
> 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'orly%2C%20do%20you%20think%20so'%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
>
> outputs "red" and "orly, do you think so" in the same browser.
>
> Does Safari on Mac behave differently from Safari on Windows here?


The version of WebKit used by Safari 5.0.3 is rather antiquated at this
point.  Using the latest WebKit nightly build, or Chrome 10.0.648.45
dev (which has a significantly newer version of WebKit), I get #ff0000 and
rgba(0, 0, 0, 0.0) on the first test and #ff0000 / #ff0000 on the second.
 Presumably at some point Apple will release a new version of Safari that
matches the behavior nightlies currently have.

- James

>
>
>  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...
>
> -Boris
>



More information about the whatwg mailing list