Wednesday, September 17, 2008

Adding some Silverlight to your Chrome (aka Living on the bleeding Chrome edge)

Jon Galloway - Running Silverlight 2 on Google Chrome using the Chrome Dev Channel

“When Google Chrome first came out and I read that it used Webkit, the same rendering engine that powers Safari, I tried browsing a few Silverlight 2 sites. It kind of worked, as long as the sites didn’t exclude browsers that weren’t on Microsoft’s official Silverlight support list. The controls loaded, but didn’t animate or update smoothly. While Microsoft still isn’t officially supporting Silverlight on Chrome, Chrome’s latest Dev Build (0.2.151.2) includes some specific fixes to support Silverlight 2 Beta 2. The information about the updates is in the release notes, specifically revision 1735:

The basic issue here was that the plugin would not paint correctly. The URLs mentioned in this bug load windowed silverlight plugin instances, which invoke the NPN_InvalidateRect API to paint. We send over the rects to the renderer, however these don't generate paints as the plugin is windowed. A peek at Safari's webkit implementation revealed that they merely invoke the InvalidateRect windows API in this context.

I followed the link in Jonas Follesø’s post over to the Chromium Developer instructions for running the Chrome developer build, which are really simple:

…”

Jon, in his usual outstanding style, provides tips and screenshots on how to switch your Chrome on to the “Dev Channel”. Meaning instead of beta version you’ll auto-update to the Dev/Alpha/Bleeding Edge versions, where Silverlight is working (better).

No comments: