WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25226
Add a RenderObject::localToParentTransform method which includes the full transform between local and parent local
https://bugs.webkit.org/show_bug.cgi?id=25226
Summary
Add a RenderObject::localToParentTransform method which includes the full tra...
Eric Seidel (no email)
Reported
2009-04-15 17:40:38 PDT
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. :)
Attachments
First stab at localToParentTransform
(18.96 KB, patch)
2009-04-16 15:36 PDT
,
Eric Seidel (no email)
simon.fraser
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-04-16 15:36:07 PDT
Created
attachment 29558
[details]
First stab at localToParentTransform 14 files changed, 142 insertions(+), 49 deletions(-)
Simon Fraser (smfr)
Comment 2
2009-04-16 16:21:46 PDT
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.
Eric Seidel (no email)
Comment 3
2009-04-16 16:24:16 PDT
(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!
Eric Seidel (no email)
Comment 4
2009-04-16 16:27:56 PDT
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug