The method .getScreenCTM() of the object SVGLocatable returns wrong values. Correct values (that are matched by Batik/Opera/Firefox) are indicated in the example.
Created attachment 11621 [details] First attempt What can I say, this should fix the problem :) Cheers, Rob.
Comment on attachment 11621 [details] First attempt The * is on the wrong side: + SVGMatrix *ctm = SVGLocatable::getScreenCTM(this); But I'm somewhat confused by this patch. SVGTextElement inherits from SVGTransformable, yet it calls directly to SVGLocatable's implementations of getCTM and getScreenCTM. The only other class that inherits directly from SVGTransformable is SVGStyledTransformableElement, whose getCTM and getScreenCTM implementations also awkwardly call SVGLocatable's implementation (and then apply the local transformation). Wouldn't it be possible to implement getCTM and getScreenCTM in SVGTransformable (by invoking SVGLocatable's implementation and multiplying by the localMatrix()) and get rid of the implementations in both SVGTextElement and SVGStyledTransformableElement?
Created attachment 11624 [details] Different approach As Mitz pointed out, there is some code duplication. This patch shares a bit more code. Cheers, Rob.
Created attachment 11625 [details] Even better patch Removing the unneeded if now. Cheers, Rob.
Created attachment 11626 [details] Fix ChangeLog
Comment on attachment 11626 [details] Fix ChangeLog r=me
Landed by Rob in r17879.
I can confirm that this is now working - thanks for implementing! The next road block on getting my examples work is: SVGPoint.matrixTransform() - see http://bugs.webkit.org/show_bug.cgi?id=11685 Thanks, Andreas