2006-09-15 Nikolas Zimmermann <zimmermann@kde.org>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Sep 2006 23:55:41 +0000 (23:55 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Sep 2006 23:55:41 +0000 (23:55 +0000)
commit50f195c110c15d707815840b34774c66216ff787
treea1d00705038b309701324e630f477f90dbb569d8
parent193166ac5d9a22c0ae0e4e3b74cae27f3aba6be5
2006-09-15  Nikolas Zimmermann  <zimmermann@kde.org>

        Reviewed by Eric.

Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10835
        Fix svg memory leaks.

        Reworked SVGList to deal with RefPtr's for ptr types
        which makes manual refcounting unnecessary, and is much safer.

        Removing all virtual functions (nullItem) from SVGList, and
        also remove SVGListBase. Switch to a similar concept like
        Vector/VectorTraits (see new file SVGListTraits.h).

        Credits go to Eric/Maciej for the inspiration.

        * CMakeLists.txt: Add SVGListTraits.cpp to build
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * bindings/scripts/CodeGeneratorJS.pm: Generator changes for SVGTransform/PathSeg/LengthList (now RefPtr based)
        * kcanvas/RenderSVGText.cpp: Add some get() methods, as SVGLengthList is RefPtr based now.
        (WebCore::RenderSVGText::translationForAttributes):
        * ksvg2/svg/SVGAnimateTransformElement.cpp: Add some get() methods, as SVGTransformList is RefPtr based now.
        (WebCore::SVGAnimateTransformElement::handleTimerEvent):
        * ksvg2/svg/SVGElementInstanceList.cpp: Be RefPtr based.
        (WebCore::SVGElementInstanceList::SVGElementInstanceList):
        * ksvg2/svg/SVGElementInstanceList.h:
        * ksvg2/svg/SVGLengthList.cpp: Ditto.
        (WebCore::SVGLengthList::SVGLengthList):
        * ksvg2/svg/SVGLengthList.h: Ditto.
        * ksvg2/svg/SVGList.h: Rewrote, as described above.
        (WebCore::SVGListTypeOperations::nullItem):
        (WebCore::SVGList::SVGList):
        (WebCore::SVGList::~SVGList):
        (WebCore::SVGList::clear):
        (WebCore::SVGList::getFirst):
        (WebCore::SVGList::getLast):
        (WebCore::SVGList::getItem):
        (WebCore::SVGList::replaceItem):
        (WebCore::SVGList::removeItem):
        * ksvg2/svg/SVGListTraits.cpp: Added.
        * ksvg2/svg/SVGListTraits.h: Added.
        (WebCore::):
        * ksvg2/svg/SVGPathElement.cpp: Add some get() methods, as SVGPathSegList is RefPtr based now.
        (WebCore::SVGPathElement::toPathData):
        * ksvg2/svg/SVGPathSegList.cpp: Be RefPtr based.
        (WebCore::SVGPathSegList::SVGPathSegList):
        * ksvg2/svg/SVGPathSegList.h: Ditto.
        * ksvg2/svg/SVGTransform.cpp: Style cleanup.
        (SVGTransform::SVGTransform):
        * ksvg2/svg/SVGTransformList.cpp: Be RefPtr based.
        (SVGTransformList::SVGTransformList):
        (SVGTransformList::createSVGTransformFromMatrix):
        (SVGTransformList::consolidate):
        * ksvg2/svg/SVGTransformList.h: Ditto.
        * ksvg2/svg/SVGTransformable.cpp: Fix RefPtr usage of SVGTransform.
        (SVGTransformable::parseTransformAttribute):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
WebCore/ChangeLog
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/kcanvas/RenderSVGText.cpp
WebCore/ksvg2/svg/SVGAnimateTransformElement.cpp
WebCore/ksvg2/svg/SVGElementInstanceList.cpp
WebCore/ksvg2/svg/SVGElementInstanceList.h
WebCore/ksvg2/svg/SVGLengthList.cpp
WebCore/ksvg2/svg/SVGLengthList.h
WebCore/ksvg2/svg/SVGList.h
WebCore/ksvg2/svg/SVGListTraits.h [new file with mode: 0644]
WebCore/ksvg2/svg/SVGNumberList.cpp
WebCore/ksvg2/svg/SVGNumberList.h
WebCore/ksvg2/svg/SVGPathElement.cpp
WebCore/ksvg2/svg/SVGPathSegList.cpp
WebCore/ksvg2/svg/SVGPathSegList.h
WebCore/ksvg2/svg/SVGTransform.cpp
WebCore/ksvg2/svg/SVGTransformList.cpp
WebCore/ksvg2/svg/SVGTransformList.h
WebCore/ksvg2/svg/SVGTransformable.cpp