Changeset 71227 in webkit


Ignore:
Timestamp:
Nov 3, 2010 4:13:10 AM (13 years ago)
Author:
Nikolas Zimmermann
Message:

2010-11-03 Nikolas Zimmermann <nzimmermann@rim.com>

Reviewed by Dirk Schulze.

Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
https://bugs.webkit.org/show_bug.cgi?id=48898

Convert SVGAnimatedString/SVGStringList to the new svg animated type concept.
SVGStringList is special compared to all other SVG*Lists, as it returns non-live elements.
That means myStringList.getItem(0) = 'foobar' doesn't take effect.

When appending an item to a SVGStringList, that has been taken from another list, it's not removed from the list origin.
That demanded a new SVGStringListPropertyTearOff which does just that.

Tests: svg/W3C-SVG-1.1-SE/types-dom-06-f.svg

svg/dom/SVGStringList.html

  • GNUmakefile.am: Add SVGAnimatedString.h / SVGStringListPropertyTearOff.h to build.
  • WebCore.gypi: Ditto.
  • WebCore.pro: Ditto.
  • WebCore.vcproj/WebCore.vcproj: Ditto.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • bindings/scripts/CodeGenerator.pm: Recognize SVGAnimatedString as new style svg animated type. Map SVGStringList to SVGStringListPropertyTearOff.
  • bindings/scripts/CodeGeneratorJS.pm: Handle SVGStringListPropertyTearOff in GetSVGPropertyTypes.
  • bindings/scripts/CodeGeneratorObjC.pm: Ditto.
  • bindings/scripts/CodeGeneratorV8.pm: Ditto.
  • svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGAnimatedString handling.
  • svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
  • svg/SVGAElement.cpp: Renamed target to svgTarget() to avoid clashes with Element::target(), adjust the bindings to call svgTarget() instead of target(), when processing SVGAElement. (WebCore::SVGAElement::parseMappedAttribute): (WebCore::SVGAElement::synchronizeProperty):
  • svg/SVGAElement.h:
  • svg/SVGAltGlyphElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
  • svg/SVGAnimatedString.h: Added.
  • svg/SVGCursorElement.h: Ditto.
  • svg/SVGFEBlendElement.h: Ditto.
  • svg/SVGFEColorMatrixElement.h: Ditto.
  • svg/SVGFEComponentTransferElement.h: Ditto.
  • svg/SVGFECompositeElement.h: Ditto.
  • svg/SVGFEConvolveMatrixElement.h: Ditto.
  • svg/SVGFEDiffuseLightingElement.h: Ditto.
  • svg/SVGFEDisplacementMapElement.h: Ditto.
  • svg/SVGFEGaussianBlurElement.h: Ditto.
  • svg/SVGFEImageElement.h: Ditto.
  • svg/SVGFEMergeNodeElement.h: Ditto.
  • svg/SVGFEMorphologyElement.h: Ditto.
  • svg/SVGFEOffsetElement.h: Ditto.
  • svg/SVGFESpecularLightingElement.h: Ditto.
  • svg/SVGFETileElement.h: Ditto.
  • svg/SVGFilterElement.h: Ditto.
  • svg/SVGFilterPrimitiveStandardAttributes.h: Ditto.
  • svg/SVGForeignObjectElement.h: Ditto.
  • svg/SVGGradientElement.h: Ditto.
  • svg/SVGImageElement.h: Ditto.
  • svg/SVGLengthList.idl: Remove leftover SVGListProperty marker.
  • svg/SVGMPathElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
  • svg/SVGPatternElement.h: Ditto.
  • svg/SVGScriptElement.h: Ditto.
  • svg/SVGStringList.cpp: Make SVGStringList a plain Vector<String>. (WebCore::SVGStringList::commitChange): React to SVGStringList changes. (WebCore::SVGStringList::reset): (WebCore::SVGStringList::parse):
  • svg/SVGStringList.h: (WebCore::SVGStringList::SVGStringList):
  • svg/SVGStyledElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
  • svg/SVGTRefElement.h: Ditto.
  • svg/SVGTests.cpp: Adapt to SVGStringList API changes. (WebCore::SVGTests::SVGTests): (WebCore::SVGTests::hasExtension): (WebCore::SVGTests::isValid): (WebCore::SVGTests::parseMappedAttribute): (WebCore::SVGTests::isKnownAttribute):
  • svg/SVGTests.h: Ditto. (WebCore::SVGTests::requiredFeatures): (WebCore::SVGTests::requiredExtensions): (WebCore::SVGTests::systemLanguage):
  • svg/SVGTextPathElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
  • svg/SVGURIReference.h: Adapt to SVGStringList API changes. (WebCore::SVGURIReference::~SVGURIReference):
  • svg/SVGUseElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
  • svg/SVGViewElement.cpp: Adapt to SVGStringList API changes. (WebCore::SVGViewElement::SVGViewElement): (WebCore::SVGViewElement::parseMappedAttribute):
  • svg/SVGViewElement.h: Ditto. (WebCore::SVGViewElement::viewTarget):
  • svg/properties/SVGAnimatedPropertyMacros.h: Moved GetOwnerElementForType heleprs from SVGAnimatedPropertySynchronizer into this file.
  • svg/properties/SVGAnimatedPropertySynchronizer.h:
  • svg/properties/SVGPropertyTraits.h: Handle SVGStringList.
  • svg/properties/SVGStringListPropertyTearOff.h: Added. This is a simplified version of SVGListPropertyTearOff, tied to SVGStringList and its special demands. (WebCore::SVGStringListPropertyTearOff::create): (WebCore::SVGStringListPropertyTearOff::clear): (WebCore::SVGStringListPropertyTearOff::numberOfItems): (WebCore::SVGStringListPropertyTearOff::initialize): (WebCore::SVGStringListPropertyTearOff::getItem): (WebCore::SVGStringListPropertyTearOff::insertItemBefore): (WebCore::SVGStringListPropertyTearOff::replaceItem): (WebCore::SVGStringListPropertyTearOff::removeItem): (WebCore::SVGStringListPropertyTearOff::appendItem): (WebCore::SVGStringListPropertyTearOff::SVGStringListPropertyTearOff):

2010-11-03 Nikolas Zimmermann <nzimmermann@rim.com>

Reviewed by Dirk Schulze.

Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
https://bugs.webkit.org/show_bug.cgi?id=48898

Add a new SVGStringList test ensuring that the items returned by getItem etc. are not live (it's a plain DOMString).
Add a new test from SVG 1.1 2nd edition regarding SVGStringList. The list operations all pass, but because of a bug
in SVGTests requiredFeatures handling (see bug 40887) there's still one red rectangle in the middle.

  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.checksum: Added.
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.png: Added.
  • platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt: Added.
  • svg/W3C-SVG-1.1-SE/types-dom-06-f.svg: Added.
  • svg/dom/SVGStringList-expected.txt: Added.
  • svg/dom/SVGStringList.html: Added.
  • svg/dom/script-tests/SVGStringList.js: Added.
Location:
trunk
Files:
9 added
54 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r71225 r71227  
     12010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Reviewed by Dirk Schulze.
     4
     5        Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
     6        https://bugs.webkit.org/show_bug.cgi?id=48898
     7
     8        Add a new SVGStringList test ensuring that the items returned by getItem etc. are not live (it's a plain DOMString).
     9        Add a new test from SVG 1.1 2nd edition regarding SVGStringList. The list operations all pass, but because of a bug
     10        in SVGTests requiredFeatures handling (see bug 40887) there's still one red rectangle in the middle.
     11
     12        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.checksum: Added.
     13        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.png: Added.
     14        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt: Added.
     15        * svg/W3C-SVG-1.1-SE/types-dom-06-f.svg: Added.
     16        * svg/dom/SVGStringList-expected.txt: Added.
     17        * svg/dom/SVGStringList.html: Added.
     18        * svg/dom/script-tests/SVGStringList.js: Added.
     19
    1202010-11-03  Daniel Bates  <dbates@rim.com>
    221
  • trunk/WebCore/ChangeLog

    r71222 r71227  
     12010-11-03  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Reviewed by Dirk Schulze.
     4
     5        Convert SVGAnimatedString/SVGStringList to the new SVG*PropertyTearOff concept
     6        https://bugs.webkit.org/show_bug.cgi?id=48898
     7
     8        Convert SVGAnimatedString/SVGStringList to the new svg animated type concept.
     9        SVGStringList is special compared to all other SVG*Lists, as it returns non-live elements.
     10        That means myStringList.getItem(0) = 'foobar' doesn't take effect.
     11
     12        When appending an item to a SVGStringList, that has been taken from another list, it's not removed from the list origin.
     13        That demanded a new SVGStringListPropertyTearOff which does just that.
     14
     15        Tests: svg/W3C-SVG-1.1-SE/types-dom-06-f.svg
     16               svg/dom/SVGStringList.html
     17
     18        * GNUmakefile.am: Add SVGAnimatedString.h / SVGStringListPropertyTearOff.h to build.
     19        * WebCore.gypi: Ditto.
     20        * WebCore.pro: Ditto.
     21        * WebCore.vcproj/WebCore.vcproj: Ditto.
     22        * WebCore.xcodeproj/project.pbxproj: Ditto.
     23        * bindings/scripts/CodeGenerator.pm: Recognize SVGAnimatedString as new style svg animated type. Map SVGStringList to SVGStringListPropertyTearOff.
     24        * bindings/scripts/CodeGeneratorJS.pm: Handle SVGStringListPropertyTearOff in GetSVGPropertyTypes.
     25        * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
     26        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
     27        * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGAnimatedString handling.
     28        * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
     29        * svg/SVGAElement.cpp: Renamed target to svgTarget() to avoid clashes with Element::target(), adjust the bindings to call svgTarget() instead of target(), when processing SVGAElement.
     30        (WebCore::SVGAElement::parseMappedAttribute):
     31        (WebCore::SVGAElement::synchronizeProperty):
     32        * svg/SVGAElement.h:
     33        * svg/SVGAltGlyphElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
     34        * svg/SVGAnimatedString.h: Added.
     35        * svg/SVGCursorElement.h: Ditto.
     36        * svg/SVGFEBlendElement.h: Ditto.
     37        * svg/SVGFEColorMatrixElement.h: Ditto.
     38        * svg/SVGFEComponentTransferElement.h: Ditto.
     39        * svg/SVGFECompositeElement.h: Ditto.
     40        * svg/SVGFEConvolveMatrixElement.h: Ditto.
     41        * svg/SVGFEDiffuseLightingElement.h: Ditto.
     42        * svg/SVGFEDisplacementMapElement.h: Ditto.
     43        * svg/SVGFEGaussianBlurElement.h: Ditto.
     44        * svg/SVGFEImageElement.h: Ditto.
     45        * svg/SVGFEMergeNodeElement.h: Ditto.
     46        * svg/SVGFEMorphologyElement.h: Ditto.
     47        * svg/SVGFEOffsetElement.h: Ditto.
     48        * svg/SVGFESpecularLightingElement.h: Ditto.
     49        * svg/SVGFETileElement.h: Ditto.
     50        * svg/SVGFilterElement.h: Ditto.
     51        * svg/SVGFilterPrimitiveStandardAttributes.h: Ditto.
     52        * svg/SVGForeignObjectElement.h: Ditto.
     53        * svg/SVGGradientElement.h: Ditto.
     54        * svg/SVGImageElement.h: Ditto.
     55        * svg/SVGLengthList.idl: Remove leftover SVGListProperty marker.
     56        * svg/SVGMPathElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
     57        * svg/SVGPatternElement.h: Ditto.
     58        * svg/SVGScriptElement.h: Ditto.
     59        * svg/SVGStringList.cpp: Make SVGStringList a plain Vector<String>.
     60        (WebCore::SVGStringList::commitChange): React to SVGStringList changes.
     61        (WebCore::SVGStringList::reset):
     62        (WebCore::SVGStringList::parse):
     63        * svg/SVGStringList.h:
     64        (WebCore::SVGStringList::SVGStringList):
     65        * svg/SVGStyledElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
     66        * svg/SVGTRefElement.h: Ditto.
     67        * svg/SVGTests.cpp: Adapt to SVGStringList API changes.
     68        (WebCore::SVGTests::SVGTests):
     69        (WebCore::SVGTests::hasExtension):
     70        (WebCore::SVGTests::isValid):
     71        (WebCore::SVGTests::parseMappedAttribute):
     72        (WebCore::SVGTests::isKnownAttribute):
     73        * svg/SVGTests.h: Ditto.
     74        (WebCore::SVGTests::requiredFeatures):
     75        (WebCore::SVGTests::requiredExtensions):
     76        (WebCore::SVGTests::systemLanguage):
     77        * svg/SVGTextPathElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
     78        * svg/SVGURIReference.h: Adapt to SVGStringList API changes.
     79        (WebCore::SVGURIReference::~SVGURIReference):
     80        * svg/SVGUseElement.h: s/DECLARE_ANIMATED_PROPERTY/DECLARED_ANIMATED_STATIC_PROPERTY_NEW/
     81        * svg/SVGViewElement.cpp: Adapt to SVGStringList API changes.
     82        (WebCore::SVGViewElement::SVGViewElement):
     83        (WebCore::SVGViewElement::parseMappedAttribute):
     84        * svg/SVGViewElement.h: Ditto.
     85        (WebCore::SVGViewElement::viewTarget):
     86        * svg/properties/SVGAnimatedPropertyMacros.h: Moved GetOwnerElementForType heleprs from SVGAnimatedPropertySynchronizer into this file.
     87        * svg/properties/SVGAnimatedPropertySynchronizer.h:
     88        * svg/properties/SVGPropertyTraits.h: Handle SVGStringList.
     89        * svg/properties/SVGStringListPropertyTearOff.h: Added. This is a simplified version of SVGListPropertyTearOff, tied to SVGStringList and its special demands.
     90        (WebCore::SVGStringListPropertyTearOff::create):
     91        (WebCore::SVGStringListPropertyTearOff::clear):
     92        (WebCore::SVGStringListPropertyTearOff::numberOfItems):
     93        (WebCore::SVGStringListPropertyTearOff::initialize):
     94        (WebCore::SVGStringListPropertyTearOff::getItem):
     95        (WebCore::SVGStringListPropertyTearOff::insertItemBefore):
     96        (WebCore::SVGStringListPropertyTearOff::replaceItem):
     97        (WebCore::SVGStringListPropertyTearOff::removeItem):
     98        (WebCore::SVGStringListPropertyTearOff::appendItem):
     99        (WebCore::SVGStringListPropertyTearOff::SVGStringListPropertyTearOff):
     100
    11012010-11-03  Zoltan Herczeg  <zherczeg@webkit.org>
    2102
  • trunk/WebCore/GNUmakefile.am

    r71204 r71227  
    30393039        WebCore/svg/properties/SVGPropertyTearOff.h \
    30403040        WebCore/svg/properties/SVGPropertyTraits.h \
     3041        WebCore/svg/properties/SVGStringListPropertyTearOff.h \
    30413042        WebCore/svg/RadialGradientAttributes.h \
    30423043        WebCore/svg/SVGAElement.cpp \
     
    30623063        WebCore/svg/SVGAnimatedPreserveAspectRatio.h \
    30633064        WebCore/svg/SVGAnimatedRect.h \
     3065        WebCore/svg/SVGAnimatedString.h \
    30643066        WebCore/svg/SVGAnimateElement.cpp \
    30653067        WebCore/svg/SVGAnimateElement.h \
  • trunk/WebCore/WebCore.gypi

    r71210 r71227  
    39583958            'svg/properties/SVGPropertyTearOff.h',
    39593959            'svg/properties/SVGPropertyTraits.h',
     3960            'svg/properties/SVGStringListPropertyTearOff.h',
    39603961            'svg/ColorDistance.cpp',
    39613962            'svg/ColorDistance.h',
     
    39973998            'svg/SVGAnimatedPreserveAspectRatio.h',
    39983999            'svg/SVGAnimatedRect.h',
     4000            'svg/SVGAnimatedString.h',
    39994001            'svg/SVGAnimationElement.cpp',
    40004002            'svg/SVGAnimationElement.h',
  • trunk/WebCore/WebCore.pro

    r71117 r71227  
    23682368    svg/properties/SVGPropertyTearOff.h \
    23692369    svg/properties/SVGPropertyTraits.h \
     2370    svg/properties/SVGStringListPropertyTearOff.h \
    23702371    svg/SVGAElement.h \
    23712372    svg/SVGAltGlyphElement.h \
     
    23842385    svg/SVGAnimatedPreserveAspectRatio.h \
    23852386    svg/SVGAnimatedRect.h \
     2387    svg/SVGAnimatedString.h \
    23862388    svg/SVGAnimateElement.h \
    23872389    svg/SVGAnimateMotionElement.h \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r71204 r71227  
    6167361673                        </File>
    6167461674                        <File
     61675                                RelativePath="..\svg\SVGAnimatedString.h"
     61676                                >
     61677                        </File>
     61678                        <File
    6167561679                                RelativePath="..\svg\SVGAnimateElement.h"
    6167661680                                >
     
    6273362737                                <File
    6273462738                                        RelativePath="..\svg\properties\SVGPropertyTraits.h"
     62739                                        >
     62740                                </File>
     62741                                <File
     62742                                        RelativePath="..\svg\properties\SVGStringListPropertyTearOff.h"
    6273562743                                        >
    6273662744                                </File>
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r71103 r71227  
    114114                084D0E3E11F5816100081E1A /* SVGResourcesCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 084D0E3A11F5816100081E1A /* SVGResourcesCache.cpp */; };
    115115                084D0E3F11F5816100081E1A /* SVGResourcesCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 084D0E3B11F5816100081E1A /* SVGResourcesCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
     116                084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */ = {isa = PBXBuildFile; fileRef = 084DB59A128008CC002A6D64 /* SVGAnimatedString.h */; settings = {ATTRIBUTES = (Private, ); }; };
    116117                084DBAA10ED39D360038C226 /* WMLVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 084DBA9D0ED39D350038C226 /* WMLVariables.cpp */; };
    117118                084DBAA20ED39D360038C226 /* WMLVariables.h in Headers */ = {isa = PBXBuildFile; fileRef = 084DBA9E0ED39D360038C226 /* WMLVariables.h */; };
     
    244245                08E192540EDE0C3A0087B780 /* WMLErrorHandling.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E192520EDE0C3A0087B780 /* WMLErrorHandling.h */; };
    245246                08E4FE460E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */; };
     247                08E58FF512801CF70045903D /* SVGStringListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E58FF412801CF70045903D /* SVGStringListPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
    246248                08E6A2E80EEE035200AC1206 /* WMLPostfieldElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08E6A2E60EEE035200AC1206 /* WMLPostfieldElement.cpp */; };
    247249                08E6A2E90EEE035200AC1206 /* WMLPostfieldElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08E6A2E70EEE035200AC1206 /* WMLPostfieldElement.h */; };
     
    61376139                084D0E3A11F5816100081E1A /* SVGResourcesCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourcesCache.cpp; sourceTree = "<group>"; };
    61386140                084D0E3B11F5816100081E1A /* SVGResourcesCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGResourcesCache.h; sourceTree = "<group>"; };
     6141                084DB59A128008CC002A6D64 /* SVGAnimatedString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedString.h; sourceTree = "<group>"; };
    61396142                084DBA9D0ED39D350038C226 /* WMLVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLVariables.cpp; sourceTree = "<group>"; };
    61406143                084DBA9E0ED39D360038C226 /* WMLVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLVariables.h; sourceTree = "<group>"; };
     
    62546257                08E192520EDE0C3A0087B780 /* WMLErrorHandling.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLErrorHandling.h; sourceTree = "<group>"; };
    62556258                08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGLengthCustom.cpp; sourceTree = "<group>"; };
     6259                08E58FF412801CF70045903D /* SVGStringListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGStringListPropertyTearOff.h; sourceTree = "<group>"; };
    62566260                08E6A2E60EEE035200AC1206 /* WMLPostfieldElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLPostfieldElement.cpp; sourceTree = "<group>"; };
    62576261                08E6A2E70EEE035200AC1206 /* WMLPostfieldElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLPostfieldElement.h; sourceTree = "<group>"; };
     
    1175511759                                088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */,
    1175611760                                088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */,
     11761                                08E58FF412801CF70045903D /* SVGStringListPropertyTearOff.h */,
    1175711762                        );
    1175811763                        path = properties;
     
    1603516040                                08C859BF1274575300A5728D /* SVGAnimatedRect.h */,
    1603616041                                B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */,
     16042                                084DB59A128008CC002A6D64 /* SVGAnimatedString.h */,
    1603716043                                B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */,
    1603816044                                B22277F80D00BF1F0071B782 /* SVGAnimatedTransformList.idl */,
     
    2083120837                                08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */,
    2083220838                                08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */,
     20839                                084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */,
    2083320840                                B22279900D00BF220071B782 /* SVGAnimateElement.h in Headers */,
    2083420841                                B22279930D00BF220071B782 /* SVGAnimateMotionElement.h in Headers */,
     
    2097420981                                B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */,
    2097520982                                B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */,
     20983                                08E58FF512801CF70045903D /* SVGStringListPropertyTearOff.h in Headers */,
    2097620984                                B2227AAF0D00BF220071B782 /* SVGStylable.h in Headers */,
    2097720985                                B2227AB20D00BF220071B782 /* SVGStyledElement.h in Headers */,
  • trunk/WebCore/bindings/scripts/CodeGenerator.pm

    r71103 r71227  
    6161                                   "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
    6262                                   "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1,
    63                                    "SVGAnimatedPreserveAspectRatio" => 1, "SVGAnimatedRect" => 1);
     63                                   "SVGAnimatedPreserveAspectRatio" => 1, "SVGAnimatedRect" => 1,
     64                                   "SVGAnimatedString" => 1);
    6465
    6566my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
     
    8485    "SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>",
    8586    "SVGPreserveAspectRatio" => "SVGPropertyTearOff<SVGPreserveAspectRatio>",
    86     "SVGRect" => "SVGPropertyTearOff<FloatRect>"
     87    "SVGRect" => "SVGPropertyTearOff<FloatRect>",
     88    "SVGStringList" => "SVGStringListPropertyTearOff"
    8789);
    8890
     
    481483
    482484    my $attributeName = $attribute->signature->name;
     485    my $attributeType = $generator->StripModule($attribute->signature->type);
    483486
    484487    # Avoid clash with C++ keyword.
    485488    $attributeName = "_operator" if $attributeName eq "operator";
    486489
     490    # SVGAElement defines a non-virtual "String& target() const" method which clashes with "virtual String target() const" in Element.
     491    # To solve this issue the SVGAElement method was renamed to "svgTarget", take care of that when calling this method.
     492    $attributeName = "svgTarget" if $attributeName eq "target" and $attributeType eq "SVGAnimatedString";
     493
    487494    # SVG animated types need to use a special attribute name.
    488495    # The rest of the special casing for SVG animated types is handled in the language-specific code generators.
    489     $attributeName .= "Animated" if $generator->IsSVGAnimatedType($generator->StripModule($attribute->signature->type));
     496    $attributeName .= "Animated" if $generator->IsSVGAnimatedType($attributeType);
    490497
    491498    return $attributeName;
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r71103 r71227  
    25072507        $headerIncludes{"$svgWrappedNativeType.h"} = 1;
    25082508        $headerIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
     2509    } elsif ($svgNativeType =~ /SVGStringListPropertyTearOff/) {
     2510        $svgListPropertyType = "SVGStringList";
     2511        $headerIncludes{"$svgWrappedNativeType.h"} = 1;
    25092512    }
    25102513
     
    26802683        $value = "static_cast<" . GetNativeType($type) . ">($value)";
    26812684    } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($type) and not $implClassName =~ /List$/) {
    2682         $value = $codeGenerator->GetSVGTypeNeedingTearOff($type) . "::create($value)";
     2685        my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($type);
     2686        if ($tearOffType eq "SVGStringListPropertyTearOff") {
     2687            my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
     2688            $value = $codeGenerator->GetSVGTypeNeedingTearOff($type) . "::create($extraImp$value)";
     2689        } else {
     2690            $value = $codeGenerator->GetSVGTypeNeedingTearOff($type) . "::create($value)";
     2691        }
    26832692    }
    26842693
  • trunk/WebCore/bindings/scripts/CodeGeneratorObjC.pm

    r71103 r71227  
    691691        $svgListPropertyType = "WebCore::$svgWrappedNativeType";
    692692        $svgListPropertyType =~ s/</\<WebCore::/;
     693    } elsif ($svgNativeType =~ /SVGStringListPropertyTearOff/) {
     694        $svgListPropertyType = "WebCore::SVGStringList";
    693695    }
    694696
     
    10251027        push(@internalHeaderContent, "\n#import <WebCore/$className.h>\n\n");
    10261028        push(@internalHeaderContent, "#import <WebCore/SVGAnimatedPropertyTearOff.h>\n\n") if $svgPropertyType;
    1027         push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n") if $svgListPropertyType;
     1029        if ($svgListPropertyType) {
     1030            if ($svgListPropertyType eq "WebCore::SVGStringList") {
     1031                push(@internalHeaderContent, "#import <WebCore/SVGStringListPropertyTearOff.h>\n\n");
     1032            } else {
     1033                push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n");
     1034            }
     1035        }
    10281036        push(@internalHeaderContent, $interfaceAvailabilityVersionCheck) if length $interfaceAvailabilityVersion;
    10291037
     
    13201328                if ($codeGenerator->IsSVGTypeNeedingTearOff($attribute->signature->type) and not $implClassName =~ /List$/) {
    13211329                    my $idlTypeWithNamespace = GetSVGTypeWithNamespace($attribute->signature->type);
    1322                     $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($getterContentHead";
     1330                    if ($idlTypeWithNamespace eq "WebCore::SVGStringListPropertyTearOff") {
     1331                        my $extraImp = "WebCore::GetOwnerElementForType<$implClassNameWithNamespace, WebCore::IsDerivedFromSVGElement<$implClassNameWithNamespace>::value>::ownerElement(IMPL), ";
     1332                        $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($extraImp$getterContentHead";
     1333                    } else {
     1334                        $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($getterContentHead";
     1335                    }
    13231336                    $getterContentTail .= ")))";
    13241337                } else {
  • trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r71103 r71227  
    227227        $svgListPropertyType = $svgWrappedNativeType;
    228228        $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1,
     229    } elsif ($svgNativeType =~ /SVGStringListPropertyTearOff/) {
     230        $svgListPropertyType = "SVGStringList";
     231        $implIncludes{"$svgWrappedNativeType.h"} = 1;
    229232    }
    230233
     
    922925    } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($attrType) and not $implClassName =~ /List$/) {
    923926        $implIncludes{"V8$attrType.h"} = 1;
    924         my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
    925         push(@implContentDecls, "    return toV8(WTF::getPtr(${svgNativeType}::create($result)));\n");
     927        my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
     928        if ($tearOffType eq "SVGStringListPropertyTearOff") {
     929            my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
     930            push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create($extraImp$result)));\n");
     931        } else {
     932            push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create($result)));\n");
     933        }
    926934    } elsif ($attrIsPodType) {
    927935        $implIncludes{"V8${attrType}.h"} = 1;
  • trunk/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h

    r71103 r71227  
    3131struct DeprecatedSVGAnimatedPropertyTraits : public Noncopyable { };
    3232
    33 // SVGAnimatedString
    34 template<>
    35 struct DeprecatedSVGAnimatedPropertyTraits<String> : public Noncopyable {
    36     typedef const String& PassType;
    37     typedef String ReturnType;
    38     typedef String StoredType;
    39 
    40     static ReturnType null() { return String(); }
    41     static ReturnType toReturnType(const StoredType& type) { return type; }
    42     static String toString(PassType type) { return type; }
    43 };
    44 
    4533// SVGAnimatedTransformList
    4634template<>
  • trunk/WebCore/svg/DeprecatedSVGAnimatedTemplate.h

    r71103 r71227  
    153153
    154154    // Common type definitions, to ease IDL generation.
    155     typedef DeprecatedSVGAnimatedTemplate<String> SVGAnimatedString;
    156155    typedef DeprecatedSVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
    157156
  • trunk/WebCore/svg/SVGAElement.cpp

    r68854 r71227  
    7272{
    7373    if (attr->name() == SVGNames::targetAttr)
    74         setTargetBaseValue(attr->value());
     74        setSVGTargetBaseValue(attr->value());
    7575    else {
    7676        if (SVGURIReference::parseMappedAttribute(attr))
     
    106106
    107107    if (attrName == anyQName()) {
    108         synchronizeTarget();
     108        synchronizeSVGTarget();
    109109        synchronizeHref();
    110110        synchronizeExternalResourcesRequired();
     
    113113
    114114    if (attrName == SVGNames::targetAttr)
    115         synchronizeTarget();
     115        synchronizeSVGTarget();
    116116    else if (SVGURIReference::isKnownAttribute(attrName))
    117117        synchronizeHref();
  • trunk/WebCore/svg/SVGAElement.h

    r70857 r71227  
    4747       
    4848        virtual String title() const;
     49        virtual String target() const { return svgTarget(); }
    4950
    5051        virtual void parseMappedAttribute(Attribute*);
     
    6364        virtual bool childShouldCreateRenderer(Node*) const;
    6465
    65         DECLARE_ANIMATED_PROPERTY(SVGAElement, SVGNames::targetAttr, String, Target, target)
     66        // This defines a non-virtual "String& target() const" method before, that would clash with "virtual String target() const"
     67        // in Element. That's why it's now named "String& svgTarget() const", to avoid the clash. The CodeGenerators take care
     68        // of calling svgTargetAnimated() instead of targetAnimated(), see CodeGenerator.pm.
     69        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGAElement, SVGNames::targetAttr, String, SVGTarget, svgTarget)
    6670
    6771        // SVGURIReference
    68         DECLARE_ANIMATED_PROPERTY(SVGAElement, XLinkNames::hrefAttr, String, Href, href)
     72        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGAElement, XLinkNames::hrefAttr, String, Href, href)
    6973
    7074        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGAltGlyphElement.h

    r66397 r71227  
    5353
    5454        // SVGURIReference
    55         DECLARE_ANIMATED_PROPERTY(SVGAltGlyphElement, XLinkNames::hrefAttr, String, Href, href)
     55        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGAltGlyphElement, XLinkNames::hrefAttr, String, Href, href)
    5656    };
    5757
  • trunk/WebCore/svg/SVGCursorElement.h

    r70857 r71227  
    5959
    6060        // SVGURIReference
    61         DECLARE_ANIMATED_PROPERTY(SVGCursorElement, XLinkNames::hrefAttr, String, Href, href)
     61        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGCursorElement, XLinkNames::hrefAttr, String, Href, href)
    6262
    6363        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGFEBlendElement.h

    r70872 r71227  
    3939    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
    4040
    41     DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::inAttr, String, In1, in1)
    42     DECLARE_ANIMATED_PROPERTY(SVGFEBlendElement, SVGNames::in2Attr, String, In2, in2)
     41    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEBlendElement, SVGNames::inAttr, String, In1, in1)
     42    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEBlendElement, SVGNames::in2Attr, String, In2, in2)
    4343    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEBlendElement, SVGNames::modeAttr, int, Mode, mode)
    4444};
  • trunk/WebCore/svg/SVGFEColorMatrixElement.h

    r70979 r71227  
    4141    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
    4242
    43     DECLARE_ANIMATED_PROPERTY(SVGFEColorMatrixElement, SVGNames::inAttr, String, In1, in1)
     43    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::inAttr, String, In1, in1)
    4444    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::typeAttr, int, Type, type)
    4545    DECLARE_ANIMATED_LIST_PROPERTY_NEW(SVGFEColorMatrixElement, SVGNames::valuesAttr, SVGNumberList, Values, values)
  • trunk/WebCore/svg/SVGFEComponentTransferElement.h

    r66397 r71227  
    3939    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
    4040
    41     DECLARE_ANIMATED_PROPERTY(SVGFEComponentTransferElement, SVGNames::inAttr, String, In1, in1)
     41    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEComponentTransferElement, SVGNames::inAttr, String, In1, in1)
    4242};
    4343
  • trunk/WebCore/svg/SVGFECompositeElement.h

    r70979 r71227  
    4040    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
    4141
    42     DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::inAttr, String, In1, in1)
    43     DECLARE_ANIMATED_PROPERTY(SVGFECompositeElement, SVGNames::in2Attr, String, In2, in2)
     42    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::inAttr, String, In1, in1)
     43    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::in2Attr, String, In2, in2)
    4444    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::operatorAttr, int, _operator, _operator)
    4545    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFECompositeElement, SVGNames::k1Attr, float, K1, k1)
  • trunk/WebCore/svg/SVGFEConvolveMatrixElement.h

    r70979 r71227  
    4545    static const AtomicString& kernelUnitLengthYIdentifier();
    4646
    47     DECLARE_ANIMATED_PROPERTY(SVGFEConvolveMatrixElement, SVGNames::inAttr, String, In1, in1)
     47    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::inAttr, String, In1, in1)
    4848    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::orderXAttr, long, OrderX, orderX)
    4949    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEConvolveMatrixElement, SVGNames::orderYAttr, long, OrderY, orderY)
  • trunk/WebCore/svg/SVGFEDiffuseLightingElement.h

    r70979 r71227  
    4747    static const AtomicString& kernelUnitLengthYIdentifier();
    4848
    49     DECLARE_ANIMATED_PROPERTY(SVGFEDiffuseLightingElement, SVGNames::inAttr, String, In1, in1)
     49    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDiffuseLightingElement, SVGNames::inAttr, String, In1, in1)
    5050    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDiffuseLightingElement, SVGNames::diffuseConstantAttr, float, DiffuseConstant, diffuseConstant)
    5151    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDiffuseLightingElement, SVGNames::surfaceScaleAttr, float, SurfaceScale, surfaceScale)
  • trunk/WebCore/svg/SVGFEDisplacementMapElement.h

    r70979 r71227  
    4040    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
    4141   
    42     DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::inAttr, String, In1, in1)
    43     DECLARE_ANIMATED_PROPERTY(SVGFEDisplacementMapElement, SVGNames::in2Attr, String, In2, in2)
     42    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDisplacementMapElement, SVGNames::inAttr, String, In1, in1)
     43    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDisplacementMapElement, SVGNames::in2Attr, String, In2, in2)
    4444    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDisplacementMapElement, SVGNames::xChannelSelectorAttr, int, XChannelSelector, xChannelSelector)
    4545    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEDisplacementMapElement, SVGNames::yChannelSelectorAttr, int, YChannelSelector, yChannelSelector)
  • trunk/WebCore/svg/SVGFEGaussianBlurElement.h

    r70979 r71227  
    4545    static const AtomicString& stdDeviationYIdentifier();
    4646
    47     DECLARE_ANIMATED_PROPERTY(SVGFEGaussianBlurElement, SVGNames::inAttr, String, In1, in1)
     47    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEGaussianBlurElement, SVGNames::inAttr, String, In1, in1)
    4848    DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationXIdentifier(), float, StdDeviationX, stdDeviationX)
    4949    DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationYIdentifier(), float, StdDeviationY, stdDeviationY)
  • trunk/WebCore/svg/SVGFEImageElement.h

    r71103 r71227  
    6060
    6161    // SVGURIReference
    62     DECLARE_ANIMATED_PROPERTY(SVGFEImageElement, XLinkNames::hrefAttr, String, Href, href)
     62    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEImageElement, XLinkNames::hrefAttr, String, Href, href)
    6363
    6464    // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGFEMergeNodeElement.h

    r69206 r71227  
    2323
    2424#if ENABLE(SVG) && ENABLE(FILTERS)
     25#include "SVGAnimatedPropertyMacros.h"
    2526#include "SVGElement.h"
    26 #include "SVGNames.h"
    2727
    2828namespace WebCore {
     
    3939        virtual void synchronizeProperty(const QualifiedName&);
    4040
    41         DECLARE_ANIMATED_PROPERTY(SVGFEMergeNodeElement, SVGNames::inAttr, String, In1, in1)
     41        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEMergeNodeElement, SVGNames::inAttr, String, In1, in1)
    4242    };
    4343
  • trunk/WebCore/svg/SVGFEMorphologyElement.h

    r70979 r71227  
    4444    static const AtomicString& radiusYIdentifier();
    4545
    46     DECLARE_ANIMATED_PROPERTY(SVGFEMorphologyElement, SVGNames::inAttr, String, In1, in1)
     46    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEMorphologyElement, SVGNames::inAttr, String, In1, in1)
    4747    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEMorphologyElement, SVGNames::operatorAttr, int, _operator, _operator)
    4848    DECLARE_ANIMATED_STATIC_PROPERTY_MULTIPLE_WRAPPERS_NEW(SVGFEMorphologyElement, SVGNames::radiusAttr, radiusXIdentifier(), float, RadiusX, radiusX)
  • trunk/WebCore/svg/SVGFEOffsetElement.h

    r70979 r71227  
    4040    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
    4141
    42     DECLARE_ANIMATED_PROPERTY(SVGFEOffsetElement, SVGNames::inAttr, String, In1, in1)
     42    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEOffsetElement, SVGNames::inAttr, String, In1, in1)
    4343    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEOffsetElement, SVGNames::dxAttr, float, Dx, dx)
    4444    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFEOffsetElement, SVGNames::dyAttr, float, Dy, dy)
  • trunk/WebCore/svg/SVGFESpecularLightingElement.h

    r70979 r71227  
    4343    static const AtomicString& kernelUnitLengthYIdentifier();
    4444
    45     DECLARE_ANIMATED_PROPERTY(SVGFESpecularLightingElement, SVGNames::inAttr, String, In1, in1)
     45    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFESpecularLightingElement, SVGNames::inAttr, String, In1, in1)
    4646    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFESpecularLightingElement, SVGNames::specularConstantAttr, float, SpecularConstant, specularConstant)
    4747    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFESpecularLightingElement, SVGNames::specularExponentAttr, float, SpecularExponent, specularExponent)
  • trunk/WebCore/svg/SVGFETileElement.h

    r68022 r71227  
    3939    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*);
    4040
    41     DECLARE_ANIMATED_PROPERTY(SVGFETileElement, SVGNames::inAttr, String, In1, in1)
     41    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFETileElement, SVGNames::inAttr, String, In1, in1)
    4242};
    4343
  • trunk/WebCore/svg/SVGFilterElement.h

    r70872 r71227  
    7373
    7474    // SVGURIReference
    75     DECLARE_ANIMATED_PROPERTY(SVGFilterElement, XLinkNames::hrefAttr, String, Href, href)
     75    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFilterElement, XLinkNames::hrefAttr, String, Href, href)
    7676
    7777    // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h

    r70223 r71227  
    6767    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::widthAttr, SVGLength, Width, width)
    6868    DECLARE_ANIMATED_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::heightAttr, SVGLength, Height, height)
    69     DECLARE_ANIMATED_PROPERTY(SVGFilterPrimitiveStandardAttributes, SVGNames::resultAttr, String, Result, result)
     69    DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGFilterPrimitiveStandardAttributes, SVGNames::resultAttr, String, Result, result)
    7070};
    7171
  • trunk/WebCore/svg/SVGForeignObjectElement.h

    r70857 r71227  
    5959
    6060        // SVGURIReference
    61         DECLARE_ANIMATED_PROPERTY(SVGForeignObjectElement, XLinkNames::hrefAttr, String, Href, href)
     61        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGForeignObjectElement, XLinkNames::hrefAttr, String, Href, href)
    6262
    6363        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGGradientElement.h

    r70872 r71227  
    5555
    5656        // SVGURIReference
    57         DECLARE_ANIMATED_PROPERTY(SVGGradientElement, XLinkNames::hrefAttr, String, Href, href)
     57        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, XLinkNames::hrefAttr, String, Href, href)
    5858
    5959        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGImageElement.h

    r71103 r71227  
    7474
    7575        // SVGURIReference
    76         DECLARE_ANIMATED_PROPERTY(SVGImageElement, XLinkNames::hrefAttr, String, Href, href)
     76        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGImageElement, XLinkNames::hrefAttr, String, Href, href)
    7777
    7878        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGLengthList.idl

    r70223 r71227  
    2727module svg {
    2828
    29     interface [Conditional=SVG, SVGListProperty=SVGLengthList] SVGLengthList {
     29    interface [Conditional=SVG] SVGLengthList {
    3030        readonly attribute unsigned long numberOfItems;
    3131
  • trunk/WebCore/svg/SVGMPathElement.h

    r70857 r71227  
    4545       
    4646        // SVGURIReference
    47         DECLARE_ANIMATED_PROPERTY(SVGMPathElement, XLinkNames::hrefAttr, String, Href, href)
     47        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGMPathElement, XLinkNames::hrefAttr, String, Href, href)
    4848
    4949        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGPatternElement.h

    r71103 r71227  
    7474
    7575        // SVGURIReference
    76         DECLARE_ANIMATED_PROPERTY(SVGPatternElement, XLinkNames::hrefAttr, String, Href, href)
     76        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, XLinkNames::hrefAttr, String, Href, href)
    7777
    7878        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGScriptElement.h

    r70857 r71227  
    7777
    7878        // SVGURIReference
    79         DECLARE_ANIMATED_PROPERTY(SVGScriptElement, XLinkNames::hrefAttr, String, Href, href)
     79        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGScriptElement, XLinkNames::hrefAttr, String, Href, href)
    8080
    8181        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGStringList.cpp

    r66397 r71227  
    2424#include "SVGStringList.h"
    2525
     26#include "SVGElement.h"
    2627#include "SVGParserUtilities.h"
    2728
    2829namespace WebCore {
    2930
    30 SVGStringList::SVGStringList(const QualifiedName& attributeName)
    31     : SVGList<String>(attributeName)
     31void SVGStringList::commitChange(SVGElement* contextElement)
    3232{
     33    ASSERT(contextElement);
     34    contextElement->invalidateSVGAttributes();
     35    contextElement->svgAttributeChanged(m_attributeName);
    3336}
    3437
    35 void SVGStringList::reset(const String& str)
     38void SVGStringList::reset(const String& string)
    3639{
    37     ExceptionCode ec = 0;
     40    parse(string, ' ');
    3841
    39     parse(str, ' ');
    40     if (numberOfItems() == 0)
    41         appendItem(String(""), ec); // Create empty string...
     42    // Add empty string, if list is empty.
     43    if (isEmpty())
     44        append(String(""));
    4245}
    4346
     
    4548{
    4649    // TODO : more error checking/reporting
    47     ExceptionCode ec = 0;
    48     clear(ec);
     50    clear();
    4951
    5052    const UChar* ptr = data.characters();
     
    5658        if (ptr == start)
    5759            break;
    58         appendItem(String(start, ptr - start), ec);
     60        append(String(start, ptr - start));
    5961        skipOptionalSpacesOrDelimiter(ptr, end, delimiter);
    6062    }
  • trunk/WebCore/svg/SVGStringList.h

    r66397 r71227  
    11/*
    2  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
     2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
    33 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
    44 *
     
    2323
    2424#if ENABLE(SVG)
    25 #include "PlatformString.h"
    26 #include "SVGList.h"
     25#include "QualifiedName.h"
     26#include <wtf/Vector.h>
     27#include <wtf/text/WTFString.h>
    2728
    2829namespace WebCore {
    2930
    30     class SVGStringList : public SVGList<String> {
    31     public:
    32         static PassRefPtr<SVGStringList> create(const QualifiedName& attributeName) { return adoptRef(new SVGStringList(attributeName)); }
     31class SVGElement;
    3332
    34         void reset(const String& str);
    35         void parse(const String& data, UChar delimiter = ',');
    36        
    37     private:
    38         SVGStringList(const QualifiedName&);
    39     };
     33class SVGStringList : public Vector<String> {
     34public:
     35    SVGStringList(const QualifiedName& attributeName)
     36        : m_attributeName(attributeName)
     37    {
     38    }
     39
     40    void reset(const String&);
     41    void parse(const String&, UChar delimiter = ',');
     42
     43    // Only used by SVGStringListPropertyTearOff.
     44    void commitChange(SVGElement* contextElement);
     45
     46private:
     47    const QualifiedName& m_attributeName;
     48};
    4049
    4150} // namespace WebCore
    4251
    4352#endif // ENABLE(SVG)
    44 #endif // SVGStringList_h
     53#endif
  • trunk/WebCore/svg/SVGStyledElement.h

    r69437 r71227  
    2323
    2424#if ENABLE(SVG)
     25#include "SVGAnimatedPropertyMacros.h"
    2526#include "HTMLNames.h"
    26 #include "SVGElement.h"
    2727#include "SVGLocatable.h"
    2828#include "SVGStylable.h"
     
    8484        HashSet<SVGStyledElement*> m_elementsWithRelativeLengths;
    8585
    86         DECLARE_ANIMATED_PROPERTY(SVGStyledElement, HTMLNames::classAttr, String, ClassName, className)
     86        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGStyledElement, HTMLNames::classAttr, String, ClassName, className)
    8787    };
    8888
  • trunk/WebCore/svg/SVGTRefElement.h

    r66397 r71227  
    4646
    4747        // SVGURIReference
    48         DECLARE_ANIMATED_PROPERTY(SVGTRefElement, XLinkNames::hrefAttr, String, Href, href)
     48        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTRefElement, XLinkNames::hrefAttr, String, Href, href)
    4949    };
    5050
  • trunk/WebCore/svg/SVGTests.cpp

    r66397 r71227  
    2727#include "DOMImplementation.h"
    2828#include "Language.h"
    29 #include "SVGElement.h"
    3029#include "SVGNames.h"
    3130#include "SVGStringList.h"
     
    3433
    3534SVGTests::SVGTests()
     35    : m_features(SVGNames::requiredFeaturesAttr)
     36    , m_extensions(SVGNames::requiredExtensionsAttr)
     37    , m_systemLanguage(SVGNames::systemLanguageAttr)
    3638{
    3739}
    3840
    39 SVGTests::~SVGTests()
     41bool SVGTests::hasExtension(const String&) const
    4042{
    41 }
    42 
    43 SVGStringList* SVGTests::requiredFeatures() const
    44 {
    45     if (!m_features)
    46         m_features = SVGStringList::create(SVGNames::requiredFeaturesAttr);
    47 
    48     return m_features.get();
    49 }
    50 
    51 SVGStringList* SVGTests::requiredExtensions() const
    52 {
    53     if (!m_extensions)
    54         m_extensions = SVGStringList::create(SVGNames::requiredExtensionsAttr);
    55 
    56     return m_extensions.get();
    57 }
    58 
    59 SVGStringList* SVGTests::systemLanguage() const
    60 {
    61     if (!m_systemLanguage)
    62         m_systemLanguage = SVGStringList::create(SVGNames::systemLanguageAttr);
    63 
    64     return m_systemLanguage.get();
     43    // FIXME: Implement me!
     44    return false;
    6545}
    6646
    6747bool SVGTests::isValid() const
    6848{
    69     ExceptionCode ec = 0;
    70 
    71     if (m_features) {
    72         for (unsigned long i = 0; i < m_features->numberOfItems(); i++) {
    73             String value = m_features->getItem(i, ec);
    74             if (value.isEmpty() || !DOMImplementation::hasFeature(value, String()))
    75                 return false;
    76         }
     49    unsigned featuresSize = m_features.size();
     50    for (unsigned i = 0; i < featuresSize; ++i) {
     51        String value = m_features.at(i);
     52        if (value.isEmpty() || !DOMImplementation::hasFeature(value, String()))
     53            return false;
    7754    }
    7855
    79     if (m_systemLanguage) {
    80         for (unsigned long i = 0; i < m_systemLanguage->numberOfItems(); i++)
    81             if (m_systemLanguage->getItem(i, ec) != defaultLanguage().substring(0, 2))
    82                 return false;
     56    unsigned systemLanguageSize = m_systemLanguage.size();
     57    for (unsigned i = 0; i < systemLanguageSize; ++i) {
     58        String value = m_systemLanguage.at(i);
     59        if (value != defaultLanguage().substring(0, 2))
     60            return false;
    8361    }
    8462
    85     if (m_extensions && m_extensions->numberOfItems() > 0)
     63    if (!m_extensions.isEmpty())
    8664        return false;
    8765
     
    9270{
    9371    if (attr->name() == SVGNames::requiredFeaturesAttr) {
    94         requiredFeatures()->reset(attr->value());
     72        m_features.reset(attr->value());
    9573        return true;
    9674    } else if (attr->name() == SVGNames::requiredExtensionsAttr) {
    97         requiredExtensions()->reset(attr->value());
     75        m_extensions.reset(attr->value());
    9876        return true;
    9977    } else if (attr->name() == SVGNames::systemLanguageAttr) {
    100         systemLanguage()->reset(attr->value());
     78        m_systemLanguage.reset(attr->value());
    10179        return true;
    10280    }
     
    10785bool SVGTests::isKnownAttribute(const QualifiedName& attrName)
    10886{
    109     return (attrName == SVGNames::requiredFeaturesAttr ||
    110             attrName == SVGNames::requiredExtensionsAttr ||
    111             attrName == SVGNames::systemLanguageAttr);
     87    return attrName == SVGNames::requiredFeaturesAttr
     88        || attrName == SVGNames::requiredExtensionsAttr
     89        || attrName == SVGNames::systemLanguageAttr;
    11290}
    11391
  • trunk/WebCore/svg/SVGTests.h

    r66397 r71227  
    2323
    2424#if ENABLE(SVG)
    25 #include <wtf/Forward.h>
    26 #include <wtf/RefPtr.h>
     25#include "SVGStringList.h"
    2726
    2827namespace WebCore {
    2928
    30     class Attribute;
    31     class QualifiedName;
    32     class SVGStringList;
     29class Attribute;
     30class QualifiedName;
    3331
    34     class SVGTests {
    35     public:
    36         SVGStringList* requiredFeatures() const;
    37         SVGStringList* requiredExtensions() const;
    38         SVGStringList* systemLanguage() const;
     32class SVGTests {
     33public:
     34    SVGStringList& requiredFeatures() { return m_features; }
     35    SVGStringList& requiredExtensions() { return m_extensions; }
     36    SVGStringList& systemLanguage() { return m_systemLanguage; }
    3937
    40         bool hasExtension(const String&) const { return false; }
     38    bool hasExtension(const String&) const;
     39    bool isValid() const;
    4140
    42         bool isValid() const;
    43        
    44         bool parseMappedAttribute(Attribute*);
    45         bool isKnownAttribute(const QualifiedName&);
     41    bool parseMappedAttribute(Attribute*);
     42    bool isKnownAttribute(const QualifiedName&);
    4643
    47     protected:
    48         SVGTests();
    49         ~SVGTests();
     44protected:
     45    SVGTests();
    5046
    51     private:
    52         mutable RefPtr<SVGStringList> m_features;
    53         mutable RefPtr<SVGStringList> m_extensions;
    54         mutable RefPtr<SVGStringList> m_systemLanguage;
    55     };
     47private:
     48    SVGStringList m_features;
     49    SVGStringList m_extensions;
     50    SVGStringList m_systemLanguage;
     51};
    5652
    5753} // namespace WebCore
  • trunk/WebCore/svg/SVGTextPathElement.h

    r70872 r71227  
    7373   
    7474        // SVGURIReference
    75         DECLARE_ANIMATED_PROPERTY(SVGTextPathElement, XLinkNames::hrefAttr, String, Href, href)
     75        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGTextPathElement, XLinkNames::hrefAttr, String, Href, href)
    7676    };
    7777
  • trunk/WebCore/svg/SVGURIReference.h

    r70135 r71227  
    2828namespace WebCore {
    2929
    30     class Attribute;
     30class Attribute;
    3131
    32     class SVGURIReference {
    33     public:
    34         virtual ~SVGURIReference() { }
     32class SVGURIReference {
     33public:
     34    virtual ~SVGURIReference() { }
    3535
    36         bool parseMappedAttribute(Attribute*);
    37         bool isKnownAttribute(const QualifiedName&);
     36    bool parseMappedAttribute(Attribute*);
     37    bool isKnownAttribute(const QualifiedName&);
    3838
    39         static String getTarget(const String& url);
     39    static String getTarget(const String& url);
    4040
    41     protected:
    42         virtual void setHrefBaseValue(DeprecatedSVGAnimatedPropertyTraits<String>::PassType) = 0;
    43     };
     41protected:
     42    virtual void setHrefBaseValue(const String&) = 0;
     43};
    4444
    4545} // namespace WebCore
  • trunk/WebCore/svg/SVGUseElement.h

    r70857 r71227  
    8888
    8989        // SVGURIReference
    90         DECLARE_ANIMATED_PROPERTY(SVGUseElement, XLinkNames::hrefAttr, String, Href, href)
     90        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGUseElement, XLinkNames::hrefAttr, String, Href, href)
    9191
    9292        // SVGExternalResourcesRequired
  • trunk/WebCore/svg/SVGViewElement.cpp

    r66498 r71227  
    3535inline SVGViewElement::SVGViewElement(const QualifiedName& tagName, Document* document)
    3636    : SVGStyledElement(tagName, document)
     37    , m_viewTarget(SVGNames::viewTargetAttr)
    3738{
    3839}
     
    4344}
    4445
    45 SVGStringList* SVGViewElement::viewTarget() const
    46 {
    47     if (!m_viewTarget)
    48         m_viewTarget = SVGStringList::create(SVGNames::viewTargetAttr);
    49 
    50     return m_viewTarget.get();
    51 }
    52 
    5346void SVGViewElement::parseMappedAttribute(Attribute* attr)
    5447{
    5548    if (attr->name() == SVGNames::viewTargetAttr)
    56         viewTarget()->reset(attr->value());
     49        viewTarget().reset(attr->value());
    5750    else {
    5851        if (SVGExternalResourcesRequired::parseMappedAttribute(attr)
  • trunk/WebCore/svg/SVGViewElement.h

    r71103 r71227  
    2424#if ENABLE(SVG)
    2525#include "SVGAnimatedPropertyMacros.h"
     26#include "SVGStringList.h"
    2627#include "SVGStyledElement.h"
    2728#include "SVGExternalResourcesRequired.h"
     
    3132namespace WebCore {
    3233
    33     class SVGStringList;
    3434    class SVGViewElement : public SVGStyledElement,
    3535                           public SVGExternalResourcesRequired,
     
    3939        static PassRefPtr<SVGViewElement> create(const QualifiedName&, Document*);
    4040
    41         SVGStringList* viewTarget() const;
     41        SVGStringList& viewTarget() { return m_viewTarget; }
    4242
    4343    private:
     
    5555        DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::viewBoxAttr, FloatRect, ViewBox, viewBox)
    5656        DECLARE_ANIMATED_PROPERTY_NEW(SVGViewElement, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
    57  
    58         mutable RefPtr<SVGStringList> m_viewTarget;
     57
     58        SVGStringList m_viewTarget;
    5959    };
    6060
  • trunk/WebCore/svg/properties/SVGAnimatedPropertyMacros.h

    r70872 r71227  
    3232
    3333namespace WebCore {
     34
     35class SVGElement;
     36
     37// GetOwnerElementForType implementation
     38template<typename OwnerType, bool isDerivedFromSVGElement>
     39struct GetOwnerElementForType;
     40
     41template<typename OwnerType>
     42struct GetOwnerElementForType<OwnerType, true> {
     43    static SVGElement* ownerElement(OwnerType* type)
     44    {
     45        return type;
     46    }
     47};
     48
     49template<typename OwnerType>
     50struct GetOwnerElementForType<OwnerType, false> {   
     51    static SVGElement* ownerElement(OwnerType* type)
     52    {
     53        SVGElement* context = type->contextElement();
     54        ASSERT(context);
     55        return context;
     56    }
     57};
     58
     59// IsDerivedFromSVGElement implementation
     60template<typename OwnerType>
     61struct IsDerivedFromSVGElement {
     62    static const bool value = true;
     63};
     64
     65class SVGViewSpec;
     66template<>
     67struct IsDerivedFromSVGElement<SVGViewSpec> {
     68    static const bool value = false;
     69};
    3470
    3571template<typename PropertyType>
  • trunk/WebCore/svg/properties/SVGAnimatedPropertySynchronizer.h

    r70303 r71227  
    2323#if ENABLE(SVG)
    2424namespace WebCore {
    25 
    26 class SVGElement;
    27 
    28 // GetOwnerElementForType implementation
    29 template<typename OwnerType, bool isDerivedFromSVGElement>
    30 struct GetOwnerElementForType;
    31 
    32 template<typename OwnerType>
    33 struct GetOwnerElementForType<OwnerType, true> : public Noncopyable {
    34     static SVGElement* ownerElement(OwnerType* type)
    35     {
    36         return type;
    37     }
    38 };
    39 
    40 template<typename OwnerType>
    41 struct GetOwnerElementForType<OwnerType, false> : public Noncopyable {   
    42     static SVGElement* ownerElement(OwnerType* type)
    43     {
    44         SVGElement* context = type->contextElement();
    45         ASSERT(context);
    46         return context;
    47     }
    48 };
    49 
    50 // IsDerivedFromSVGElement implementation
    51 template<typename OwnerType>
    52 struct IsDerivedFromSVGElement : public Noncopyable {
    53     static const bool value = true;
    54 };
    55 
    56 class SVGViewSpec;
    57 template<>
    58 struct IsDerivedFromSVGElement<SVGViewSpec> : public Noncopyable {
    59     static const bool value = false;
    60 };
    6125
    6226// Helper template used for synchronizing SVG <-> XML properties
  • trunk/WebCore/svg/properties/SVGPropertyTraits.h

    r70979 r71227  
    2929#include "SVGNumberList.h"
    3030#include "SVGPreserveAspectRatio.h"
     31#include "SVGStringList.h"
    3132#include <wtf/text/StringBuilder.h>
    3233
     
    118119};
    119120
     121template<>
     122struct SVGPropertyTraits<SVGStringList> {
     123    typedef String ListItemType;
     124};
     125
    120126}
    121127
Note: See TracChangeset for help on using the changeset viewer.