This is actually by design -- the canvas itself may need to apply a base transform to scale the rendering in case it renders at a higher resolution than 1:1 due to CSS scaling; having that base transform returned would be confusing. However, we could push for a currentTransform property that returns the matrix without any base transform, and have the canvas keep track of the matrix math itself.
Ah, so there are actually two transformation matrices. The "outer" one being the document matrix, and the "inner" one being the canvas-local. Having the canvas-local matrix would be useful for drawing on the canvas, and the outer matrix's use would be in aligning HTML elements with canvas objects and mapping mouse coordinates. While the document matrix is pretty trivial to get at the moment ([elementWidth/canvasWidth, 0, 0, elementHeight/canvasHeight, 0, 0]), WebKit recently got affine CSS transformations. For those, having explicit access to the document matrix might be nice. I guess the following use cases should cover the needed matrices: "How much do I translate this point to move it under the mouse pointer?" - projecting the mouse pointer to user-space "How much do I move this canvas point to put it under that HTML element?" - projecting a document space point to user-space "What coordinates should I give this HTML element so that it appears above that canvas point?" - projecting a user-space point to document space
Are we still interested in this RFE?
Ilmari, can you bring this up with the WHATWG? I think we should figure out exactly what we want and get everybody to do it.