Add a RenderObject::localToParentTransform method which includes the full transform between local and parent local The current localTransform() method is just the transform="" animated transform value from the SVGStyledTransformable element. Commonly we need the full transform from local coordinates to parent local coordinates (as in computeRepaintRect() or even in the current absoluteTransform() implementation). Add a localToParentTransform() to cover this case (and possibly remove localTransform()... although the layout test results currently depend on localTransform()). This will make it very easy to add functioning computeRepaintRect() methods, and will clean up lots of places where we have to be sure to add all the transforms in the right order. Now we'll just add one single transform (or its inverse) which will be easy to tell if we have it in the right order or not. :)
Created attachment 29558 [details] First stab at localToParentTransform 14 files changed, 142 insertions(+), 49 deletions(-)
Comment on attachment 29558 [details] First stab at localToParentTransform r=me, but the localToParentTransform() terminology is a bit of a mismatch with RenderObjects 'getTransformFromContainer', which includes the offset the containing blocks renderer, and the transform of the renderer. Eventually it would be good to have the point/quad mapping methods that are exposed on RenderObject just work for SVG, so we should look at mapLocalToContainer/mapAbsoluteToLocalPoint at some point too.
(In reply to comment #2) > (From update of attachment 29558 [details] [review]) > r=me, but the localToParentTransform() terminology is a bit of a mismatch with > RenderObjects 'getTransformFromContainer', which includes the offset the > containing blocks renderer, and the transform of the renderer. > > Eventually it would be good to have the point/quad mapping methods that are > exposed on RenderObject just work for SVG, so we should look at > mapLocalToContainer/mapAbsoluteToLocalPoint at some point too. Agreed. I'm still not a fan of the getTransformFromContainer terminology (or I don't really understand it) after you description over IRC. But I would like to unify the two transform models (or at least make them interoperable) sooner rather than later!
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/rendering/RenderObject.cpp M WebCore/rendering/RenderObject.h M WebCore/rendering/RenderSVGContainer.cpp M WebCore/rendering/RenderSVGContainer.h M WebCore/rendering/RenderSVGHiddenContainer.cpp M WebCore/rendering/RenderSVGHiddenContainer.h M WebCore/rendering/RenderSVGRoot.cpp M WebCore/rendering/RenderSVGRoot.h M WebCore/rendering/RenderSVGTransformableContainer.cpp M WebCore/rendering/RenderSVGTransformableContainer.h M WebCore/rendering/RenderSVGViewportContainer.cpp M WebCore/rendering/RenderSVGViewportContainer.h M WebCore/rendering/SVGRenderSupport.cpp Committed r42598