Bug 11801 - Autogenerate POD types in Objc/JS generation
Summary: Autogenerate POD types in Objc/JS generation
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nikolas Zimmermann
Depends on:
Reported: 2006-12-11 05:19 PST by Nikolas Zimmermann
Modified: 2006-12-11 10:08 PST (History)
0 users

See Also:

Initial patch (58.39 KB, patch)
2006-12-11 06:28 PST, Nikolas Zimmermann
no flags Details | Formatted Diff | Diff
Updated patch (58.29 KB, patch)
2006-12-11 09:28 PST, Nikolas Zimmermann
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas Zimmermann 2006-12-11 05:19:48 PST
Currently we have three hand-written bindings, SVGPoint/SVGRect/SVGNumber, living in WebCore/bindings/js and WebCore/bindings/objc. They work around the fact that our wrapper generation assumes to operate on refcounted impl objects (ie. RefPtr<SVGNumber> m_impl). For efficiency we do NOT pass around SVGRect/SVGPoint/SVGNumber pointers around anymore in ksvg2. That's why we need a different style of Js/ObjC wrapper, those who operate on POD types.

Basically the attached patch "models" the hand-written generators as they are right now, but automatically using CodeGeneratorJS.pm / CodeGeneratorObjC.pm. This will help a lot in near future, when we also want to convert SVGAngle/SVGPreserveAspectRatio/SVGMatrix/SVGLength to POD types.
Comment 1 Nikolas Zimmermann 2006-12-11 06:28:02 PST
Created attachment 11801 [details]
Initial patch

This patch autogenerates DOMSVGNumber/DOMSVGRect/DOMSVGPoint, and JSSVGNumber/JSSVGRect/JSSVGPoint. The only limitation is that currently the "matrixTransform" method of SVGPoint.idl had to be disabled, it can only work with Rob's SVGMatrix -> AffineTransform patch.

If this patch gets positive review, we have to wait for Rob's patch to also get r+, and then land both together otherwhise the matrixTransform() layout test would be broken. Hope that's fine...
Comment 2 Nikolas Zimmermann 2006-12-11 09:28:29 PST
Created attachment 11802 [details]
Updated patch

Fix the issue after weinigs first review...
Comment 3 Sam Weinig 2006-12-11 09:36:59 PST
Comment on attachment 11802 [details]
Updated patch

Looks great!
Comment 4 Nikolas Zimmermann 2006-12-11 10:08:13 PST
Landed in r18153.