RESOLVED FIXED 11830
JS SVG POD types do not work properly when being assigned
https://bugs.webkit.org/show_bug.cgi?id=11830
Summary JS SVG POD types do not work properly when being assigned
Nikolas Zimmermann
Reported 2006-12-14 12:04:42 PST
All SVG pod type wrappers have problems, with putValueProperty(). The property modification actually works inside JSSVGPoint/JSSVGRect though only acting on a copy of the actual variable stored in the JSSVGPoint/JSSVGRect object. if you write ie. "document.rootElement.width.baseVal.value = 100" the value is only updated in the wrappers (aka. document.rootElement.width.baseVal.value _is_ 100 afterwards) but the SVGSVGElement doesn't notice this. If we'd store pointers in the JS SVG wrappers it would work, but that would require passing FloatPoint/FloatRect pointers around everywhere in ksvg2/. No one wants this, so we need another solution specificially for the auto-generated wrappers. Attaching patch for this soon (I've worked two weeks to find a solution :-)
Attachments
Initial patch (31.18 KB, patch)
2006-12-14 12:13 PST, Nikolas Zimmermann
darin: review+
Nikolas Zimmermann
Comment 1 2006-12-14 12:13:11 PST
Created attachment 11841 [details] Initial patch No new regressions, none fixed. Can't create a LayoutTest for this, as things only break, if you apply my SVGLength* -> SVGLength patch and do NOT have this patch yet.
Darin Adler
Comment 2 2006-12-14 12:22:04 PST
Comment on attachment 11841 [details] Initial patch I think there's some const missing here. Since SVGMatrix is immutable, I think the AffineTransform inside an SVGMatrix should be const. Regardless, r=me
Nikolas Zimmermann
Comment 3 2006-12-14 12:39:36 PST
(In reply to comment #2) > (From update of attachment 11841 [details] [edit]) > I think there's some const missing here. Since SVGMatrix is immutable, I think > the AffineTransform inside an SVGMatrix should be const. > > Regardless, r=me Thanks a lot for the quick review! You mean in JSSVGMatrixCustom.cpp, regarding the const? Niko
Nikolas Zimmermann
Comment 4 2006-12-14 12:55:40 PST
Landed in r18217. Also found & fixed the const issue mentioned by Darin.
Note You need to log in before you can comment on or make changes to this bug.