RESOLVED FIXED 11666
.getScreenCTM() returns wrong values
https://bugs.webkit.org/show_bug.cgi?id=11666
Summary .getScreenCTM() returns wrong values
Andreas Neumann
Reported 2006-11-21 08:29:57 PST
The method .getScreenCTM() of the object SVGLocatable returns wrong values. Correct values (that are matched by Batik/Opera/Firefox) are indicated in the example.
Attachments
First attempt (12.70 KB, patch)
2006-11-24 07:46 PST, Rob Buis
no flags
Different approach (15.07 KB, patch)
2006-11-24 14:08 PST, Rob Buis
no flags
Even better patch (15.01 KB, patch)
2006-11-24 14:33 PST, Rob Buis
no flags
Fix ChangeLog (15.34 KB, patch)
2006-11-24 14:41 PST, Rob Buis
mitz: review+
Rob Buis
Comment 1 2006-11-24 07:46:50 PST
Created attachment 11621 [details] First attempt What can I say, this should fix the problem :) Cheers, Rob.
mitz
Comment 2 2006-11-24 11:34:50 PST
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?
Rob Buis
Comment 3 2006-11-24 14:08:33 PST
Created attachment 11624 [details] Different approach As Mitz pointed out, there is some code duplication. This patch shares a bit more code. Cheers, Rob.
Rob Buis
Comment 4 2006-11-24 14:33:56 PST
Created attachment 11625 [details] Even better patch Removing the unneeded if now. Cheers, Rob.
Rob Buis
Comment 5 2006-11-24 14:41:52 PST
Created attachment 11626 [details] Fix ChangeLog
mitz
Comment 6 2006-11-24 14:42:56 PST
Comment on attachment 11626 [details] Fix ChangeLog r=me
mitz
Comment 7 2006-11-24 15:35:19 PST
Landed by Rob in r17879.
Andreas Neumann
Comment 8 2006-11-25 06:50:40 PST
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
Note You need to log in before you can comment on or make changes to this bug.