I tend to get carried away when I work on something I think is really useful and interesting. Such is the case with the XUL canvas tag I'm working on. Joe Hewitt's original version creates a simple image buffer which can be drawn into using a few drawing functions. My updated version can do that, but also quite a bit more. It supports lots of drawing functions to draw lines, text and images, as well as pixel drawing.

The canvas also supports custom layouts, which can be used to position and size the children of the canvas in interesting ways. XUL doesn't really need this capability -- it's various layout types are quite suitable. However, there was another task I was working on where I realized it would be very useful to be able to use a simpler set of layout tags, where the complexity was hidden behind a custom layout. With the canvas, this custom layout is done in XBL. Actually, I designed the canvas such that one could create custom elements where the actual painting and layout was hidden in XBL.

In fact, I managed to implement a few XAML elements such as GridLayout using the canvas, and was successfully able to display some of the XAML examples from the MSDN documentation completely unmodified. OK, I only implemented the very basics of the examples, but there's potential for some interesting things. Note that I'm not trying to create a XUL-XAML layer -- that would be almost impossible.

Since I don't have CVS write access to the Mozilla, I'm not sure if there's an easy way of creating a patch. So I may have to zip everything up and then hope that I haven't missed something.