Remove the SVG property tear off objects for SVGAnimatedString
authorsaid@apple.com <said@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 21:46:39 +0000 (21:46 +0000)
committersaid@apple.com <said@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Mar 2019 21:46:39 +0000 (21:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196065

Patch by Said Abou-Hallawa <said@apple.com> on 2019-03-21
Reviewed by Simon Fraser.

-- Define SVGAnimatedString to be SVGAnimatedPrimitiveProperty<String>.

-- Add SVGAnimatedStringAccessor to associate an attribute name with a
   pointer to an SVGAnimatedString member of an SVGElement. Given a
   pointer to an SVGElement, this accessor will and create an animator
   for the animated property.

-- Add SVGAnimatedStringAnimator to animated an SVGAnimatedString.

-- Add SVGAnimationStringFunction which is a discrete function and is
   responsible for progressing an animated String over a period of time.

-- Define SVGStringAnimator to be SVGPrimitivePropertyAnimator<String,
   SVGAnimationStringFunction>. SVGStringAnimator is responsible for
   animating attributes with no reflecting animated properties, e.g.
   "font-family".

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::SVGAElement):
(WebCore::SVGAElement::parseAttribute):
(WebCore::SVGAElement::registerAttributes): Deleted.
* svg/SVGAElement.h:
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::hasValidAttributeType const):
(WebCore::SVGAnimateElementBase::isDiscreteAnimator const):
* svg/SVGAnimateElementBase.h:
* svg/SVGAnimatedString.cpp: Removed.
* svg/SVGAnimatedString.h: Removed.
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
The animation controller has to tell whether the animator is discrete or
not. The properties are now registered either in SVGAttributeRegistry which
relies on the tear off objects to know the AnimatedPropertyType of the
property. Or it is registered in SVGPropertyOwnerRegistry which creates
the animators through the accessors. Each animator knows whether it is
discrete or not.

* svg/SVGAnimatorFactory.h:
(WebCore::SVGAnimatorFactory::create):
* svg/SVGAttributeAnimationController.cpp:
(WebCore::SVGAttributeAnimationController::isDiscreteAnimator const):
* svg/SVGAttributeAnimationController.h:
* svg/SVGAttributeAnimationControllerBase.h:
* svg/SVGCursorElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::registerAttributes): Deleted.
* svg/SVGElement.h:
(WebCore::SVGElement::isKnownAttribute):
(WebCore::SVGElement::className const):
(WebCore::SVGElement::classNameAnimated):
(WebCore::SVGElement::attributeRegistry): Deleted.
* svg/SVGExternalResourcesRequired.cpp:
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::SVGFEBlendElement):
(WebCore::SVGFEBlendElement::registerAttributes):
(WebCore::SVGFEBlendElement::parseAttribute):
* svg/SVGFEBlendElement.h:
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
(WebCore::SVGFEColorMatrixElement::registerAttributes):
(WebCore::SVGFEColorMatrixElement::parseAttribute):
* svg/SVGFEColorMatrixElement.h:
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
(WebCore::SVGFEComponentTransferElement::parseAttribute):
(WebCore::SVGFEComponentTransferElement::registerAttributes): Deleted.
* svg/SVGFEComponentTransferElement.h:
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::SVGFECompositeElement):
(WebCore::SVGFECompositeElement::registerAttributes):
(WebCore::SVGFECompositeElement::parseAttribute):
* svg/SVGFECompositeElement.h:
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
(WebCore::SVGFEConvolveMatrixElement::registerAttributes):
(WebCore::SVGFEConvolveMatrixElement::parseAttribute):
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
(WebCore::SVGFEDiffuseLightingElement::parseAttribute):
(WebCore::SVGFEDiffuseLightingElement::registerAttributes): Deleted.
* svg/SVGFEDiffuseLightingElement.h:
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
(WebCore::SVGFEDisplacementMapElement::registerAttributes):
(WebCore::SVGFEDisplacementMapElement::parseAttribute):
* svg/SVGFEDisplacementMapElement.h:
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
(WebCore::SVGFEDropShadowElement::parseAttribute):
(WebCore::SVGFEDropShadowElement::svgAttributeChanged):
(WebCore::SVGFEDropShadowElement::registerAttributes): Deleted.
* svg/SVGFEDropShadowElement.h:
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
(WebCore::SVGFEGaussianBlurElement::registerAttributes):
(WebCore::SVGFEGaussianBlurElement::parseAttribute):
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
(WebCore::SVGFEMergeNodeElement::parseAttribute):
(WebCore::SVGFEMergeNodeElement::registerAttributes): Deleted.
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
(WebCore::SVGFEMorphologyElement::registerAttributes):
(WebCore::SVGFEMorphologyElement::parseAttribute):
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
(WebCore::SVGFEOffsetElement::parseAttribute):
(WebCore::SVGFEOffsetElement::svgAttributeChanged):
(WebCore::SVGFEOffsetElement::registerAttributes): Deleted.
* svg/SVGFEOffsetElement.h:
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
(WebCore::SVGFESpecularLightingElement::parseAttribute):
(WebCore::SVGFESpecularLightingElement::registerAttributes): Deleted.
* svg/SVGFESpecularLightingElement.h:
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::SVGFETileElement):
(WebCore::SVGFETileElement::parseAttribute):
(WebCore::SVGFETileElement::registerAttributes): Deleted.
* svg/SVGFETileElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
(WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes):
(WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
* svg/SVGFilterPrimitiveStandardAttributes.h:
(WebCore::SVGFilterPrimitiveStandardAttributes::result const):
(WebCore::SVGFilterPrimitiveStandardAttributes::resultAnimated):
* svg/SVGLegacyAttributeAnimationController.cpp:
(WebCore::SVGLegacyAttributeAnimationController::isDiscreteAnimator const):
* svg/SVGLegacyAttributeAnimationController.h:
* svg/SVGMPathElement.h:
* svg/SVGScriptElement.h:
* svg/SVGURIReference.cpp:
(WebCore::SVGURIReference::SVGURIReference):
(WebCore::SVGURIReference::isKnownAttribute):
(WebCore::SVGURIReference::parseAttribute):
(WebCore::SVGURIReference::registerAttributes): Deleted.
(WebCore::SVGURIReference::href const): Deleted.
(WebCore::SVGURIReference::hrefAnimated): Deleted.
* svg/SVGURIReference.h:
(WebCore::SVGURIReference::href const):
(WebCore::SVGURIReference::hrefAnimated):
* svg/properties/SVGAnimatedPropertyAccessorImpl.h:
* svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
* svg/properties/SVGAnimatedPropertyImpl.h:
* svg/properties/SVGAttributeRegistry.h:
* svg/properties/SVGPrimitivePropertyAnimatorImpl.h:
* svg/properties/SVGPropertyAnimatorFactory.h:
(WebCore::SVGPropertyAnimatorFactory::createStringAnimator):
(WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):
* svg/properties/SVGPropertyOwnerRegistry.h:
(WebCore::SVGPropertyOwnerRegistry::registerProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243333 268f45cc-cd09-0410-ab3c-d52691b4dbfc

61 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/svg/SVGAElement.cpp
Source/WebCore/svg/SVGAElement.h
Source/WebCore/svg/SVGAnimateElementBase.cpp
Source/WebCore/svg/SVGAnimateElementBase.h
Source/WebCore/svg/SVGAnimatedString.cpp [deleted file]
Source/WebCore/svg/SVGAnimatedString.h [deleted file]
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGAnimatorFactory.h
Source/WebCore/svg/SVGAttributeAnimationController.cpp
Source/WebCore/svg/SVGAttributeAnimationController.h
Source/WebCore/svg/SVGAttributeAnimationControllerBase.h
Source/WebCore/svg/SVGCursorElement.h
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGExternalResourcesRequired.cpp
Source/WebCore/svg/SVGFEBlendElement.cpp
Source/WebCore/svg/SVGFEBlendElement.h
Source/WebCore/svg/SVGFEColorMatrixElement.cpp
Source/WebCore/svg/SVGFEColorMatrixElement.h
Source/WebCore/svg/SVGFEComponentTransferElement.cpp
Source/WebCore/svg/SVGFEComponentTransferElement.h
Source/WebCore/svg/SVGFECompositeElement.cpp
Source/WebCore/svg/SVGFECompositeElement.h
Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
Source/WebCore/svg/SVGFEConvolveMatrixElement.h
Source/WebCore/svg/SVGFEDiffuseLightingElement.cpp
Source/WebCore/svg/SVGFEDiffuseLightingElement.h
Source/WebCore/svg/SVGFEDisplacementMapElement.cpp
Source/WebCore/svg/SVGFEDisplacementMapElement.h
Source/WebCore/svg/SVGFEDropShadowElement.cpp
Source/WebCore/svg/SVGFEDropShadowElement.h
Source/WebCore/svg/SVGFEGaussianBlurElement.cpp
Source/WebCore/svg/SVGFEGaussianBlurElement.h
Source/WebCore/svg/SVGFEMergeNodeElement.cpp
Source/WebCore/svg/SVGFEMergeNodeElement.h
Source/WebCore/svg/SVGFEMorphologyElement.cpp
Source/WebCore/svg/SVGFEMorphologyElement.h
Source/WebCore/svg/SVGFEOffsetElement.cpp
Source/WebCore/svg/SVGFEOffsetElement.h
Source/WebCore/svg/SVGFESpecularLightingElement.cpp
Source/WebCore/svg/SVGFESpecularLightingElement.h
Source/WebCore/svg/SVGFETileElement.cpp
Source/WebCore/svg/SVGFETileElement.h
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
Source/WebCore/svg/SVGLegacyAttributeAnimationController.cpp
Source/WebCore/svg/SVGLegacyAttributeAnimationController.h
Source/WebCore/svg/SVGMPathElement.h
Source/WebCore/svg/SVGScriptElement.h
Source/WebCore/svg/SVGURIReference.cpp
Source/WebCore/svg/SVGURIReference.h
Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h
Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h
Source/WebCore/svg/properties/SVGAnimatedPropertyImpl.h
Source/WebCore/svg/properties/SVGAttributeRegistry.h
Source/WebCore/svg/properties/SVGPrimitivePropertyAnimatorImpl.h
Source/WebCore/svg/properties/SVGPropertyAnimatorFactory.h
Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h

index b666833..95886b2 100644 (file)
@@ -1,3 +1,171 @@
+2019-03-21  Said Abou-Hallawa  <said@apple.com>
+
+        Remove the SVG property tear off objects for SVGAnimatedString
+        https://bugs.webkit.org/show_bug.cgi?id=196065
+
+        Reviewed by Simon Fraser.
+
+        -- Define SVGAnimatedString to be SVGAnimatedPrimitiveProperty<String>.
+
+        -- Add SVGAnimatedStringAccessor to associate an attribute name with a 
+           pointer to an SVGAnimatedString member of an SVGElement. Given a 
+           pointer to an SVGElement, this accessor will and create an animator
+           for the animated property.
+
+        -- Add SVGAnimatedStringAnimator to animated an SVGAnimatedString.
+
+        -- Add SVGAnimationStringFunction which is a discrete function and is 
+           responsible for progressing an animated String over a period of time.
+
+        -- Define SVGStringAnimator to be SVGPrimitivePropertyAnimator<String,
+           SVGAnimationStringFunction>. SVGStringAnimator is responsible for
+           animating attributes with no reflecting animated properties, e.g.
+           "font-family".
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * svg/SVGAElement.cpp:
+        (WebCore::SVGAElement::SVGAElement):
+        (WebCore::SVGAElement::parseAttribute):
+        (WebCore::SVGAElement::registerAttributes): Deleted.
+        * svg/SVGAElement.h:
+        * svg/SVGAnimateElementBase.cpp:
+        (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
+        (WebCore::SVGAnimateElementBase::isDiscreteAnimator const):
+        * svg/SVGAnimateElementBase.h:
+        * svg/SVGAnimatedString.cpp: Removed.
+        * svg/SVGAnimatedString.h: Removed.
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
+        The animation controller has to tell whether the animator is discrete or
+        not. The properties are now registered either in SVGAttributeRegistry which
+        relies on the tear off objects to know the AnimatedPropertyType of the
+        property. Or it is registered in SVGPropertyOwnerRegistry which creates
+        the animators through the accessors. Each animator knows whether it is
+        discrete or not.
+
+        * svg/SVGAnimatorFactory.h:
+        (WebCore::SVGAnimatorFactory::create):
+        * svg/SVGAttributeAnimationController.cpp:
+        (WebCore::SVGAttributeAnimationController::isDiscreteAnimator const):
+        * svg/SVGAttributeAnimationController.h:
+        * svg/SVGAttributeAnimationControllerBase.h:
+        * svg/SVGCursorElement.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::SVGElement):
+        (WebCore::SVGElement::parseAttribute):
+        (WebCore::SVGElement::registerAttributes): Deleted.
+        * svg/SVGElement.h:
+        (WebCore::SVGElement::isKnownAttribute):
+        (WebCore::SVGElement::className const):
+        (WebCore::SVGElement::classNameAnimated):
+        (WebCore::SVGElement::attributeRegistry): Deleted.
+        * svg/SVGExternalResourcesRequired.cpp:
+        * svg/SVGFEBlendElement.cpp:
+        (WebCore::SVGFEBlendElement::SVGFEBlendElement):
+        (WebCore::SVGFEBlendElement::registerAttributes):
+        (WebCore::SVGFEBlendElement::parseAttribute):
+        * svg/SVGFEBlendElement.h:
+        * svg/SVGFEColorMatrixElement.cpp:
+        (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
+        (WebCore::SVGFEColorMatrixElement::registerAttributes):
+        (WebCore::SVGFEColorMatrixElement::parseAttribute):
+        * svg/SVGFEColorMatrixElement.h:
+        * svg/SVGFEComponentTransferElement.cpp:
+        (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
+        (WebCore::SVGFEComponentTransferElement::parseAttribute):
+        (WebCore::SVGFEComponentTransferElement::registerAttributes): Deleted.
+        * svg/SVGFEComponentTransferElement.h:
+        * svg/SVGFECompositeElement.cpp:
+        (WebCore::SVGFECompositeElement::SVGFECompositeElement):
+        (WebCore::SVGFECompositeElement::registerAttributes):
+        (WebCore::SVGFECompositeElement::parseAttribute):
+        * svg/SVGFECompositeElement.h:
+        * svg/SVGFEConvolveMatrixElement.cpp:
+        (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
+        (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
+        (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
+        * svg/SVGFEConvolveMatrixElement.h:
+        * svg/SVGFEDiffuseLightingElement.cpp:
+        (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
+        (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
+        (WebCore::SVGFEDiffuseLightingElement::registerAttributes): Deleted.
+        * svg/SVGFEDiffuseLightingElement.h:
+        * svg/SVGFEDisplacementMapElement.cpp:
+        (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
+        (WebCore::SVGFEDisplacementMapElement::registerAttributes):
+        (WebCore::SVGFEDisplacementMapElement::parseAttribute):
+        * svg/SVGFEDisplacementMapElement.h:
+        * svg/SVGFEDropShadowElement.cpp:
+        (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
+        (WebCore::SVGFEDropShadowElement::parseAttribute):
+        (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
+        (WebCore::SVGFEDropShadowElement::registerAttributes): Deleted.
+        * svg/SVGFEDropShadowElement.h:
+        * svg/SVGFEGaussianBlurElement.cpp:
+        (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
+        (WebCore::SVGFEGaussianBlurElement::registerAttributes):
+        (WebCore::SVGFEGaussianBlurElement::parseAttribute):
+        * svg/SVGFEGaussianBlurElement.h:
+        * svg/SVGFEMergeNodeElement.cpp:
+        (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
+        (WebCore::SVGFEMergeNodeElement::parseAttribute):
+        (WebCore::SVGFEMergeNodeElement::registerAttributes): Deleted.
+        * svg/SVGFEMergeNodeElement.h:
+        * svg/SVGFEMorphologyElement.cpp:
+        (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
+        (WebCore::SVGFEMorphologyElement::registerAttributes):
+        (WebCore::SVGFEMorphologyElement::parseAttribute):
+        * svg/SVGFEMorphologyElement.h:
+        * svg/SVGFEOffsetElement.cpp:
+        (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
+        (WebCore::SVGFEOffsetElement::parseAttribute):
+        (WebCore::SVGFEOffsetElement::svgAttributeChanged):
+        (WebCore::SVGFEOffsetElement::registerAttributes): Deleted.
+        * svg/SVGFEOffsetElement.h:
+        * svg/SVGFESpecularLightingElement.cpp:
+        (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
+        (WebCore::SVGFESpecularLightingElement::parseAttribute):
+        (WebCore::SVGFESpecularLightingElement::registerAttributes): Deleted.
+        * svg/SVGFESpecularLightingElement.h:
+        * svg/SVGFETileElement.cpp:
+        (WebCore::SVGFETileElement::SVGFETileElement):
+        (WebCore::SVGFETileElement::parseAttribute):
+        (WebCore::SVGFETileElement::registerAttributes): Deleted.
+        * svg/SVGFETileElement.h:
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
+        * svg/SVGFilterPrimitiveStandardAttributes.h:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::result const):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::resultAnimated):
+        * svg/SVGLegacyAttributeAnimationController.cpp:
+        (WebCore::SVGLegacyAttributeAnimationController::isDiscreteAnimator const):
+        * svg/SVGLegacyAttributeAnimationController.h:
+        * svg/SVGMPathElement.h:
+        * svg/SVGScriptElement.h:
+        * svg/SVGURIReference.cpp:
+        (WebCore::SVGURIReference::SVGURIReference):
+        (WebCore::SVGURIReference::isKnownAttribute):
+        (WebCore::SVGURIReference::parseAttribute):
+        (WebCore::SVGURIReference::registerAttributes): Deleted.
+        (WebCore::SVGURIReference::href const): Deleted.
+        (WebCore::SVGURIReference::hrefAnimated): Deleted.
+        * svg/SVGURIReference.h:
+        (WebCore::SVGURIReference::href const):
+        (WebCore::SVGURIReference::hrefAnimated):
+        * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
+        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
+        * svg/properties/SVGAnimatedPropertyImpl.h:
+        * svg/properties/SVGAttributeRegistry.h:
+        * svg/properties/SVGPrimitivePropertyAnimatorImpl.h:
+        * svg/properties/SVGPropertyAnimatorFactory.h:
+        (WebCore::SVGPropertyAnimatorFactory::createStringAnimator):
+        (WebCore::SVGPropertyAnimatorFactory::attributeAnimatorCreator):
+        * svg/properties/SVGPropertyOwnerRegistry.h:
+        (WebCore::SVGPropertyOwnerRegistry::registerProperty):
+
 2019-03-21  Zalan Bujtas  <zalan@apple.com>
 
         Do not insert the first-letter anonymous container until after we've constructed the first-letter renderer.
index 6edc461..4df6abc 100644 (file)
@@ -2276,7 +2276,6 @@ svg/SVGAnimatedLengthList.cpp
 svg/SVGAnimatedNumberList.cpp
 svg/SVGAnimatedPath.cpp
 svg/SVGAnimatedPointList.cpp
-svg/SVGAnimatedString.cpp
 svg/SVGAnimatedTransformList.cpp
 svg/SVGAnimatedTypeAnimator.cpp
 svg/SVGAnimationElement.cpp
index 336b8a7..4a4ff59 100644 (file)
                083DAEA70F01A7FB00342754 /* RenderTextControlMultiLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 083DAEA30F01A7FB00342754 /* RenderTextControlMultiLine.h */; };
                083DAEA90F01A7FB00342754 /* RenderTextControlSingleLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 083DAEA50F01A7FB00342754 /* RenderTextControlSingleLine.h */; };
                0845680812B90DA600960A9F /* FontMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 0845680712B90DA600960A9F /* FontMetrics.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */ = {isa = PBXBuildFile; fileRef = 084DB59A128008CC002A6D64 /* SVGAnimatedString.h */; };
                08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0854B0151255E4E600B9CDD0 /* RenderSVGInline.h in Headers */ = {isa = PBXBuildFile; fileRef = 0854B0031255E4E600B9CDD0 /* RenderSVGInline.h */; };
                0854B0171255E4E600B9CDD0 /* RenderSVGInlineText.h in Headers */ = {isa = PBXBuildFile; fileRef = 0854B0051255E4E600B9CDD0 /* RenderSVGInlineText.h */; };
                083DAEA40F01A7FB00342754 /* RenderTextControlSingleLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControlSingleLine.cpp; sourceTree = "<group>"; };
                083DAEA50F01A7FB00342754 /* RenderTextControlSingleLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTextControlSingleLine.h; sourceTree = "<group>"; };
                0845680712B90DA600960A9F /* FontMetrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontMetrics.h; sourceTree = "<group>"; };
-               084DB59A128008CC002A6D64 /* SVGAnimatedString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedString.h; sourceTree = "<group>"; };
                08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedStaticPropertyTearOff.h; sourceTree = "<group>"; };
                0854B0021255E4E600B9CDD0 /* RenderSVGInline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGInline.cpp; sourceTree = "<group>"; };
                0854B0031255E4E600B9CDD0 /* RenderSVGInline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGInline.h; sourceTree = "<group>"; };
                439D334013A6911C00C20F4F /* SVGAnimatedType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedType.h; sourceTree = "<group>"; };
                439D334113A6911C00C20F4F /* SVGAnimatedTypeAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTypeAnimator.h; sourceTree = "<group>"; };
                439D334213A6911C00C20F4F /* SVGAnimatorFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatorFactory.h; sourceTree = "<group>"; };
-               43A6266613B3D11000AC94B8 /* SVGAnimatedString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedString.cpp; sourceTree = "<group>"; };
                43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoClassAndCompatibilityElementMap.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = makeSelectorPseudoClassAndCompatibilityElementMap.py; sourceTree = "<group>"; };
                43B85ED218CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelectorPseudoClassAndCompatibilityElementMap.cpp; path = DerivedSources/WebCore/SelectorPseudoClassAndCompatibilityElementMap.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
                43B85ED318CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.gperf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = SelectorPseudoClassAndCompatibilityElementMap.gperf; path = DerivedSources/WebCore/SelectorPseudoClassAndCompatibilityElementMap.gperf; sourceTree = BUILT_PRODUCTS_DIR; };
                                43B9336713B261B1004584BF /* SVGAnimatedPointList.h */,
                                B22277F40D00BF1F0071B782 /* SVGAnimatedPreserveAspectRatio.idl */,
                                B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */,
-                               43A6266613B3D11000AC94B8 /* SVGAnimatedString.cpp */,
-                               084DB59A128008CC002A6D64 /* SVGAnimatedString.h */,
                                B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */,
                                7157F061150B6564006EAABD /* SVGAnimatedTransformList.cpp */,
                                08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */,
                                088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */,
                                55FA7FFF21110E6E005AEFE7 /* SVGAnimatedPropertyType.h in Headers */,
                                08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */,
-                               084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */,
                                08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */,
                                085A15931289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h in Headers */,
                                439D334313A6911C00C20F4F /* SVGAnimatedType.h in Headers */,
index ca9cdf0..8e0c5ff 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
  * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
- * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -52,7 +52,11 @@ inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document& document
     , SVGURIReference(this)
 {
     ASSERT(hasTagName(SVGNames::aTag));
-    registerAttributes();
+
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::targetAttr, &SVGAElement::m_target>();
+    });
 }
 
 Ref<SVGAElement> SVGAElement::create(const QualifiedName& tagName, Document& document)
@@ -71,18 +75,10 @@ String SVGAElement::title() const
     return SVGElement::title();
 }
 
-void SVGAElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::targetAttr, &SVGAElement::m_target>();
-}
-
 void SVGAElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::targetAttr) {
-        m_target.setValue(value);
+        m_target->setBaseValInternal(value);
         return;
     }
 
index 057794b..3c9909b 100644 (file)
@@ -33,15 +33,13 @@ class SVGAElement final : public SVGGraphicsElement, public SVGExternalResources
 public:
     static Ref<SVGAElement> create(const QualifiedName&, Document&);
 
-    String target() const final { return m_target.currentValue(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> targetAnimated() { return m_target.animatedProperty(attributeOwnerProxy()); }
+    String target() const final { return m_target->currentValue(); }
+    Ref<SVGAnimatedString>& targetAnimated() { return m_target; }
 
 private:
     SVGAElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGAElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGURIReference>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGAElement, SVGGraphicsElement, SVGExternalResourcesRequired, SVGURIReference>;
@@ -68,7 +66,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_target;
+    Ref<SVGAnimatedString> m_target { SVGAnimatedString::create(this) };
 };
 
 } // namespace WebCore
index 8a34704..04d35a0 100644 (file)
@@ -66,7 +66,7 @@ bool SVGAnimateElementBase::hasValidAttributeType() const
     if (determineAnimatedPropertyType(*targetElement()) != AnimatedUnknown)
         return true;
 
-    return targetElement()->isAnimatedPropertyAttribute(attributeName());
+    return targetElement()->isAnimatedAttribute(attributeName());
 }
 
 AnimatedPropertyType SVGAnimateElementBase::determineAnimatedPropertyType(SVGElement& targetElement) const
@@ -74,6 +74,11 @@ AnimatedPropertyType SVGAnimateElementBase::determineAnimatedPropertyType(SVGEle
     return SVGAttributeAnimationControllerBase::determineAnimatedPropertyType(*this, targetElement, attributeName());
 }
 
+bool SVGAnimateElementBase::isDiscreteAnimator() const
+{
+    return hasValidAttributeType() && attributeAnimationControllerIfExists() && attributeAnimationControllerIfExists()->isDiscreteAnimator();
+}
+
 void SVGAnimateElementBase::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement)
 {
     if (!targetElement())
index 246ca4b..b07cdc3 100644 (file)
@@ -39,6 +39,7 @@ public:
     SVGAttributeAnimationControllerBase* attributeAnimationControllerIfExists() const { return m_attributeAnimationController.get(); }
 
     AnimatedPropertyType determineAnimatedPropertyType(SVGElement&) const;
+    bool isDiscreteAnimator() const;
 
 protected:
     SVGAnimateElementBase(const QualifiedName&, Document&);
diff --git a/Source/WebCore/svg/SVGAnimatedString.cpp b/Source/WebCore/svg/SVGAnimatedString.cpp
deleted file mode 100644 (file)
index 99c0dac..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2011. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "SVGAnimatedString.h"
-
-#include "SVGAnimateElementBase.h"
-
-namespace WebCore {
-
-SVGAnimatedStringAnimator::SVGAnimatedStringAnimator(SVGAnimationElement* animationElement, SVGElement* contextElement)
-    : SVGAnimatedTypeAnimator(AnimatedString, animationElement, contextElement)
-{
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedStringAnimator::constructFromString(const String& string)
-{
-    return SVGAnimatedType::create(SVGPropertyTraits<String>::fromString(string));
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedStringAnimator::startAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    return constructFromBaseValue<SVGAnimatedString>(animatedTypes);
-}
-
-void SVGAnimatedStringAnimator::stopAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    stopAnimValAnimationForType<SVGAnimatedString>(animatedTypes);
-}
-
-void SVGAnimatedStringAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType& type)
-{
-    resetFromBaseValue<SVGAnimatedString>(animatedTypes, type);
-}
-
-void SVGAnimatedStringAnimator::animValWillChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValWillChangeForType<SVGAnimatedString>(animatedTypes);
-}
-
-void SVGAnimatedStringAnimator::animValDidChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValDidChangeForType<SVGAnimatedString>(animatedTypes);
-}
-
-void SVGAnimatedStringAnimator::addAnimatedTypes(SVGAnimatedType*, SVGAnimatedType*)
-{
-    ASSERT_NOT_REACHED();
-}
-
-static String parseStringFromString(SVGAnimationElement*, const String& string)
-{
-    return string;
-}
-
-void SVGAnimatedStringAnimator::calculateAnimatedValue(float percentage, unsigned, SVGAnimatedType* from, SVGAnimatedType* to, SVGAnimatedType*, SVGAnimatedType* animated)
-{
-    ASSERT(m_animationElement);
-    ASSERT(m_contextElement);
-
-    auto fromString = from->as<String>();
-    auto toString = to->as<String>();
-    auto& animatedString = animated->as<String>();
-
-    // Apply CSS inheritance rules.
-    m_animationElement->adjustForInheritance<String>(parseStringFromString, m_animationElement->fromPropertyValueType(), fromString, m_contextElement);
-    m_animationElement->adjustForInheritance<String>(parseStringFromString, m_animationElement->toPropertyValueType(), toString, m_contextElement);
-
-    m_animationElement->animateDiscreteType<String>(percentage, fromString, toString, animatedString);
-}
-
-float SVGAnimatedStringAnimator::calculateDistance(const String&, const String&)
-{
-    // No paced animations for strings.
-    return -1;
-}
-
-}
diff --git a/Source/WebCore/svg/SVGAnimatedString.h b/Source/WebCore/svg/SVGAnimatedString.h
deleted file mode 100644 (file)
index 1098731..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "SVGAnimatedStaticPropertyTearOff.h"
-#include "SVGAnimatedTypeAnimator.h"
-#include "SVGAttributeAccessor.h"
-
-namespace WebCore {
-
-class SVGAnimationElement;
-
-using SVGAnimatedString = SVGAnimatedStaticPropertyTearOff<String>;
-using SVGAnimatedStringAttribute = SVGAnimatedAttribute<SVGAnimatedString>;
-
-template<typename OwnerType>
-using SVGAnimatedStringAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedStringAttribute, AnimatedString>;
-
-class SVGAnimatedStringAnimator final : public SVGAnimatedTypeAnimator {
-public:
-    SVGAnimatedStringAnimator(SVGAnimationElement*, SVGElement*);
-
-    std::unique_ptr<SVGAnimatedType> constructFromString(const String&) override;
-    std::unique_ptr<SVGAnimatedType> startAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void stopAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void resetAnimValToBaseVal(const SVGElementAnimatedPropertyList&, SVGAnimatedType&) override;
-    void animValWillChange(const SVGElementAnimatedPropertyList&) override;
-    void animValDidChange(const SVGElementAnimatedPropertyList&) override;
-
-    void addAnimatedTypes(SVGAnimatedType*, SVGAnimatedType*) override;
-    void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*) override;
-    float calculateDistance(const String& fromString, const String& toString) override;
-};
-
-} // namespace WebCore
index 5b6b56f..2982c43 100644 (file)
@@ -491,8 +491,7 @@ void SVGAnimationElement::currentValuesForValuesAnimation(float percent, float&
     CalcMode calcMode = this->calcMode();
     if (is<SVGAnimateElement>(*this) || is<SVGAnimateColorElement>(*this)) {
         ASSERT(targetElement());
-        AnimatedPropertyType type = downcast<SVGAnimateElementBase>(*this).determineAnimatedPropertyType(*targetElement());
-        if (type == AnimatedBoolean || type == AnimatedEnumeration || type == AnimatedPreserveAspectRatio || type == AnimatedString)
+        if (downcast<SVGAnimateElementBase>(*this).isDiscreteAnimator())
             calcMode = CalcMode::Discrete;
     }
     if (!m_keyPoints.isEmpty() && calcMode != CalcMode::Paced)
index 80e50bd..44664bd 100644 (file)
@@ -26,7 +26,6 @@
 #include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedPath.h"
 #include "SVGAnimatedPointList.h"
-#include "SVGAnimatedString.h"
 #include "SVGAnimatedTransformList.h"
 
 namespace WebCore {
@@ -49,6 +48,7 @@ public:
         case AnimatedNumberOptionalNumber:
         case AnimatedPreserveAspectRatio:
         case AnimatedRect:
+        case AnimatedString:
             return nullptr;
 
         case AnimatedAngle:
@@ -65,8 +65,6 @@ public:
             return std::make_unique<SVGAnimatedPathAnimator>(animationElement, contextElement);
         case AnimatedPoints:
             return std::make_unique<SVGAnimatedPointListAnimator>(animationElement, contextElement);
-        case AnimatedString:
-            return std::make_unique<SVGAnimatedStringAnimator>(animationElement, contextElement);
         case AnimatedTransformList:
             return std::make_unique<SVGAnimatedTransformListAnimator>(animationElement, contextElement);
         case AnimatedUnknown:
index f9ccb67..b2ff032 100644 (file)
@@ -54,7 +54,7 @@ SVGAttributeAnimator* SVGAttributeAnimationController::animator() const
 
 bool SVGAttributeAnimationController::isDiscreteAnimator() const
 {
-    return hasValidAttributeType() && m_animator && m_animator->isDiscrete();
+    return hasValidAttributeType() && animatorIfExists() && animatorIfExists()->isDiscrete();
 }
 
 bool SVGAttributeAnimationController::isAdditive() const
index 1ec02d3..7936f0b 100644 (file)
@@ -57,8 +57,7 @@ private:
     
     bool isAdditive() const override;
     bool hasValidAttributeType() const override;
-
-    bool isDiscreteAnimator() const;
+    bool isDiscreteAnimator() const override;
 
     mutable std::unique_ptr<SVGAttributeAnimator> m_animator;
 };
index 4889148..daa895d 100644 (file)
@@ -43,6 +43,7 @@ public:
 
     virtual bool isAdditive() const = 0;
     virtual bool hasValidAttributeType() const = 0;
+    virtual bool isDiscreteAnimator() const = 0;
     
     virtual void resetAnimatedType() = 0;
     virtual void clearAnimatedType(SVGElement* targetElement) = 0;
index 8d695ca..6451ece 100644 (file)
@@ -22,7 +22,6 @@
 #pragma once
 
 #include "SVGAnimatedLength.h"
-#include "SVGAnimatedString.h"
 #include "SVGElement.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGTests.h"
index 9d35870..2c1f2fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
- * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
  * Copyright (C) 2008 Alp Toker <alp@atoker.com>
  * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
  * Copyright (C) 2013 Samsung Electronics. All rights reserved.
@@ -278,7 +278,10 @@ SVGElement::SVGElement(const QualifiedName& tagName, Document& document)
     , SVGLangSpace(this)
     , m_propertyAnimatorFactory(std::make_unique<SVGPropertyAnimatorFactory>())
 {
-    registerAttributes();
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<HTMLNames::classAttr, &SVGElement::m_className>();
+    });
 }
 
 SVGElement::~SVGElement()
@@ -453,18 +456,10 @@ void SVGElement::setCorrespondingElement(SVGElement* correspondingElement)
         correspondingElement->ensureSVGRareData().instances().add(this);
 }
 
-void SVGElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<HTMLNames::classAttr, &SVGElement::m_className>();
-}
-
 void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == HTMLNames::classAttr) {
-        m_className.setValue(value);
+        m_className->setBaseValInternal(value);
         return;
     }
 
index c8bb1ba..0f75e90 100644 (file)
@@ -136,9 +136,6 @@ public:
 
     // The definition of the owner proxy has to match the class inheritance but we are interested in the SVG objects only.
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGElement, SVGLangSpace>;
-    static auto& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
-    static void registerAttributes();
 
     // A super class will override this function to return its owner proxy. The attributes of the super class will
     // be accessible through the registry of the owner proxy.
@@ -153,6 +150,8 @@ public:
     Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& name) { return attributeOwnerProxy().lookupOrCreateAnimatedProperties(name); }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGElement>;
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return PropertyRegistry::isKnownAttribute(attributeName); }
+
     virtual const SVGPropertyRegistry& propertyRegistry() const { return m_propertyRegistry; }
 
     bool isAnimatedPropertyAttribute(const QualifiedName&) const;
@@ -167,8 +166,8 @@ public:
     void animatorWillBeDeleted(const QualifiedName&);
 
     // These are needed for the RenderTree, animation and DOM.
-    const auto& className() const { return m_className.currentValue(attributeOwnerProxy()); }
-    auto classNameAnimated() { return m_className.animatedProperty(attributeOwnerProxy()); }
+    String className() const { return m_className->currentValue(); }
+    SVGAnimatedString& classNameAnimated() { return m_className; }
 
 protected:
     SVGElement(const QualifiedName&, Document&);
@@ -222,7 +221,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_className;
+    Ref<SVGAnimatedString> m_className { SVGAnimatedString::create(this) };
 };
 
 class SVGElement::InstanceInvalidationGuard {
index af261b6..bef5926 100644 (file)
@@ -22,6 +22,8 @@
 #include "config.h"
 #include "SVGExternalResourcesRequired.h"
 
+#include "RenderSVGResource.h"
+#include "RenderSVGShape.h"
 #include "SVGElement.h"
 #include "SVGNames.h"
 
index fb9e896..4108312 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
  * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -38,6 +38,12 @@ inline SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Docume
 {
     ASSERT(hasTagName(SVGNames::feBlendTag));
     registerAttributes();
+    
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEBlendElement::m_in1>();
+        PropertyRegistry::registerProperty<SVGNames::in2Attr, &SVGFEBlendElement::m_in2>();
+    });
 }
 
 Ref<SVGFEBlendElement> SVGFEBlendElement::create(const QualifiedName& tagName, Document& document)
@@ -50,8 +56,6 @@ void SVGFEBlendElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEBlendElement::m_in1>();
-    registry.registerAttribute<SVGNames::in2Attr, &SVGFEBlendElement::m_in2>();
     registry.registerAttribute<SVGNames::modeAttr, BlendMode, &SVGFEBlendElement::m_mode>();
 }
 
@@ -65,12 +69,12 @@ void SVGFEBlendElement::parseAttribute(const QualifiedName& name, const AtomicSt
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
     if (name == SVGNames::in2Attr) {
-        m_in2.setValue(value);
+        m_in2->setBaseValInternal(value);
         return;
     }
 
index 9fb9064..2bf7f85 100644 (file)
@@ -46,12 +46,12 @@ class SVGFEBlendElement final : public SVGFilterPrimitiveStandardAttributes {
 public:
     static Ref<SVGFEBlendElement> create(const QualifiedName&, Document&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
-    String in2() const { return m_in2.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
+    String in2() const { return m_in2->currentValue(); }
     BlendMode mode() const { return m_mode.currentValue(attributeOwnerProxy()); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> in2Animated() { return m_in2.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
+    SVGAnimatedString& in2Animated() { return m_in2; }
     RefPtr<SVGAnimatedEnumeration> modeAnimated() { return m_mode.animatedProperty(attributeOwnerProxy()); }
 
 private:
@@ -78,8 +78,8 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
-    SVGAnimatedStringAttribute m_in2;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
+    Ref<SVGAnimatedString> m_in2 { SVGAnimatedString::create(this) };
     SVGAnimatedEnumerationAttribute<BlendMode> m_mode { BlendMode::Normal };
 };
 
index 458d63e..e3d07e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -36,6 +36,11 @@ inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tag
 {
     ASSERT(hasTagName(SVGNames::feColorMatrixTag));
     registerAttributes();
+    
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEColorMatrixElement::m_in1>();
+    });
 }
 
 Ref<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const QualifiedName& tagName, Document& document)
@@ -48,7 +53,6 @@ void SVGFEColorMatrixElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEColorMatrixElement::m_in1>();
     registry.registerAttribute<SVGNames::typeAttr, ColorMatrixType, &SVGFEColorMatrixElement::m_type>();
     registry.registerAttribute<SVGNames::valuesAttr, &SVGFEColorMatrixElement::m_values>();
 }
@@ -63,7 +67,7 @@ void SVGFEColorMatrixElement::parseAttribute(const QualifiedName& name, const At
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index a320767..68a268a 100644 (file)
@@ -70,11 +70,11 @@ class SVGFEColorMatrixElement final : public SVGFilterPrimitiveStandardAttribute
 public:
     static Ref<SVGFEColorMatrixElement> create(const QualifiedName&, Document&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     ColorMatrixType type() const { return m_type.currentValue(attributeOwnerProxy()); }
     const SVGNumberListValues& values() const { return m_values.currentValue(attributeOwnerProxy()); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     RefPtr<SVGAnimatedEnumeration> typeAnimated() { return m_type.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedNumberList> valuesAnimated() { return m_values.animatedProperty(attributeOwnerProxy()); }
 
@@ -102,7 +102,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     SVGAnimatedEnumerationAttribute<ColorMatrixType> m_type { FECOLORMATRIX_TYPE_MATRIX };
     SVGAnimatedNumberListAttribute m_values;
 };
index 90635dc..ec515e1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -40,7 +40,11 @@ inline SVGFEComponentTransferElement::SVGFEComponentTransferElement(const Qualif
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feComponentTransferTag));
-    registerAttributes();
+
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEComponentTransferElement::m_in1>();
+    });
 }
 
 Ref<SVGFEComponentTransferElement> SVGFEComponentTransferElement::create(const QualifiedName& tagName, Document& document)
@@ -48,18 +52,10 @@ Ref<SVGFEComponentTransferElement> SVGFEComponentTransferElement::create(const Q
     return adoptRef(*new SVGFEComponentTransferElement(tagName, document));
 }
 
-void SVGFEComponentTransferElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEComponentTransferElement::m_in1>();
-}
-
 void SVGFEComponentTransferElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index 5ffb1e1..c0121ac 100644 (file)
@@ -31,15 +31,13 @@ class SVGFEComponentTransferElement final : public SVGFilterPrimitiveStandardAtt
 public:
     static Ref<SVGFEComponentTransferElement> create(const QualifiedName&, Document&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
 
 private:
     SVGFEComponentTransferElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEComponentTransferElement, SVGFilterPrimitiveStandardAttributes>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEComponentTransferElement, SVGFilterPrimitiveStandardAttributes>;
@@ -52,7 +50,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
 };
 
 } // namespace WebCore
index 2657ae9..4af3900 100644 (file)
@@ -39,6 +39,8 @@ inline SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName
     
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFECompositeElement::m_in1>();
+        PropertyRegistry::registerProperty<SVGNames::in2Attr, &SVGFECompositeElement::m_in2>();
         PropertyRegistry::registerProperty<SVGNames::k1Attr, &SVGFECompositeElement::m_k1>();
         PropertyRegistry::registerProperty<SVGNames::k2Attr, &SVGFECompositeElement::m_k2>();
         PropertyRegistry::registerProperty<SVGNames::k3Attr, &SVGFECompositeElement::m_k3>();
@@ -56,8 +58,6 @@ void SVGFECompositeElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFECompositeElement::m_in1>();
-    registry.registerAttribute<SVGNames::in2Attr, &SVGFECompositeElement::m_in2>();
     registry.registerAttribute<SVGNames::operatorAttr, CompositeOperationType, &SVGFECompositeElement::m_svgOperator>();
 }
 
@@ -71,12 +71,12 @@ void SVGFECompositeElement::parseAttribute(const QualifiedName& name, const Atom
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
     if (name == SVGNames::in2Attr) {
-        m_in2.setValue(value);
+        m_in2->setBaseValInternal(value);
         return;
     }
 
index 03a7dbe..cee8103 100644 (file)
@@ -84,16 +84,16 @@ class SVGFECompositeElement final : public SVGFilterPrimitiveStandardAttributes
 public:
     static Ref<SVGFECompositeElement> create(const QualifiedName&, Document&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
-    String in2() const { return m_in2.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
+    String in2() const { return m_in2->currentValue(); }
     CompositeOperationType svgOperator() const { return m_svgOperator.currentValue(attributeOwnerProxy()); }
     float k1() const { return m_k1->currentValue(); }
     float k2() const { return m_k2->currentValue(); }
     float k3() const { return m_k3->currentValue(); }
     float k4() const { return m_k4->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> in2Animated() { return m_in2.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
+    SVGAnimatedString& in2Animated() { return m_in2; }
     RefPtr<SVGAnimatedEnumeration> svgOperatorAnimated() { return m_svgOperator.animatedProperty(attributeOwnerProxy()); }
     SVGAnimatedNumber& k1Animated() { return m_k1; }
     SVGAnimatedNumber& k2Animated() { return m_k2; }
@@ -124,8 +124,8 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
-    SVGAnimatedStringAttribute m_in2;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
+    Ref<SVGAnimatedString> m_in2 { SVGAnimatedString::create(this) };
     SVGAnimatedEnumerationAttribute<CompositeOperationType> m_svgOperator { FECOMPOSITE_OPERATOR_OVER };
     Ref<SVGAnimatedNumber> m_k1 { SVGAnimatedNumber::create(this) };
     Ref<SVGAnimatedNumber> m_k2 { SVGAnimatedNumber::create(this) };
index e209661..8ce5a03 100644 (file)
@@ -43,6 +43,7 @@ inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedNam
 
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEConvolveMatrixElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::orderAttr, &SVGFEConvolveMatrixElement::m_orderX, &SVGFEConvolveMatrixElement::m_orderY>();
         PropertyRegistry::registerProperty<SVGNames::divisorAttr, &SVGFEConvolveMatrixElement::m_divisor>();
         PropertyRegistry::registerProperty<SVGNames::biasAttr, &SVGFEConvolveMatrixElement::m_bias>();
@@ -63,7 +64,6 @@ void SVGFEConvolveMatrixElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEConvolveMatrixElement::m_in1>();
     registry.registerAttribute<SVGNames::kernelMatrixAttr, &SVGFEConvolveMatrixElement::m_kernelMatrix>();
     registry.registerAttribute<SVGNames::edgeModeAttr, EdgeModeType, &SVGFEConvolveMatrixElement::m_edgeMode>();
 }
@@ -71,7 +71,7 @@ void SVGFEConvolveMatrixElement::registerAttributes()
 void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index 452dc73..f4ce89e 100644 (file)
@@ -67,7 +67,7 @@ public:
     void setOrder(float orderX, float orderY);
     void setKernelUnitLength(float kernelUnitLengthX, float kernelUnitLengthY);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     int orderX() const { return m_orderX->currentValue(); }
     int orderY() const { return m_orderY->currentValue(); }
     const SVGNumberListValues& kernelMatrix() const { return m_kernelMatrix.currentValue(attributeOwnerProxy()); }
@@ -80,7 +80,7 @@ public:
     float kernelUnitLengthY() const { return m_kernelUnitLengthY->currentValue(); }
     bool preserveAlpha() const { return m_preserveAlpha->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     SVGAnimatedInteger& orderXAnimated() { return m_orderX; }
     SVGAnimatedInteger& orderYAnimated() { return m_orderY; }
     RefPtr<SVGAnimatedNumberList> kernelMatrixAnimated() { return m_kernelMatrix.animatedProperty(attributeOwnerProxy()); }
@@ -117,7 +117,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     Ref<SVGAnimatedInteger> m_orderX { SVGAnimatedInteger::create(this) };
     Ref<SVGAnimatedInteger> m_orderY { SVGAnimatedInteger::create(this) };
     SVGAnimatedNumberListAttribute m_kernelMatrix;
index b570c8b..e3df5b8 100644 (file)
@@ -38,10 +38,10 @@ inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedN
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feDiffuseLightingTag));
-    registerAttributes();
 
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEDiffuseLightingElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::diffuseConstantAttr, &SVGFEDiffuseLightingElement::m_diffuseConstant>();
         PropertyRegistry::registerProperty<SVGNames::surfaceScaleAttr, &SVGFEDiffuseLightingElement::m_surfaceScale>();
         PropertyRegistry::registerProperty<SVGNames::kernelUnitLengthAttr, &SVGFEDiffuseLightingElement::m_kernelUnitLengthX, &SVGFEDiffuseLightingElement::m_kernelUnitLengthY>();
@@ -53,18 +53,10 @@ Ref<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(const Quali
     return adoptRef(*new SVGFEDiffuseLightingElement(tagName, document));
 }
 
-void SVGFEDiffuseLightingElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEDiffuseLightingElement::m_in1>();
-}
-
 void SVGFEDiffuseLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index 7614078..f262fc9 100644 (file)
@@ -36,13 +36,13 @@ public:
     static Ref<SVGFEDiffuseLightingElement> create(const QualifiedName&, Document&);
     void lightElementAttributeChanged(const SVGFELightElement*, const QualifiedName&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     float diffuseConstant() const { return m_diffuseConstant->currentValue(); }
     float surfaceScale() const { return m_surfaceScale->currentValue(); }
     float kernelUnitLengthX() const { return m_kernelUnitLengthX->currentValue(); }
     float kernelUnitLengthY() const { return m_kernelUnitLengthY->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     SVGAnimatedNumber& diffuseConstantAnimated() { return m_diffuseConstant; }
     SVGAnimatedNumber& surfaceScaleAnimated() { return m_surfaceScale; }
     SVGAnimatedNumber& kernelUnitLengthXAnimated() { return m_kernelUnitLengthX; }
@@ -52,18 +52,11 @@ private:
     SVGFEDiffuseLightingElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEDiffuseLightingElement, SVGFilterPrimitiveStandardAttributes>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEDiffuseLightingElement, SVGFilterPrimitiveStandardAttributes>;
     const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
     
-    static bool isKnownAttribute(const QualifiedName& attributeName)
-    {
-        return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
-    }
-
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
 
@@ -72,7 +65,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     Ref<SVGAnimatedNumber> m_diffuseConstant { SVGAnimatedNumber::create(this, 1) };
     Ref<SVGAnimatedNumber> m_surfaceScale { SVGAnimatedNumber::create(this, 1) };
     Ref<SVGAnimatedNumber> m_kernelUnitLengthX { SVGAnimatedNumber::create(this) };
index b2a26ac..e7bfc9e 100644 (file)
@@ -38,6 +38,8 @@ inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedN
     
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEDisplacementMapElement::m_in1>();
+        PropertyRegistry::registerProperty<SVGNames::in2Attr, &SVGFEDisplacementMapElement::m_in2>();
         PropertyRegistry::registerProperty<SVGNames::scaleAttr, &SVGFEDisplacementMapElement::m_scale>();
     });
 }
@@ -52,8 +54,6 @@ void SVGFEDisplacementMapElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEDisplacementMapElement::m_in1>();
-    registry.registerAttribute<SVGNames::in2Attr, &SVGFEDisplacementMapElement::m_in2>();
     registry.registerAttribute<SVGNames::xChannelSelectorAttr, ChannelSelectorType, &SVGFEDisplacementMapElement::m_xChannelSelector>();
     registry.registerAttribute<SVGNames::yChannelSelectorAttr, ChannelSelectorType, &SVGFEDisplacementMapElement::m_yChannelSelector>();
 }
@@ -75,12 +75,12 @@ void SVGFEDisplacementMapElement::parseAttribute(const QualifiedName& name, cons
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
     if (name == SVGNames::in2Attr) {
-        m_in2.setValue(value);
+        m_in2->setBaseValInternal(value);
         return;
     }
 
index f49ee0c..754fab1 100644 (file)
@@ -70,14 +70,14 @@ public:
 
     static ChannelSelectorType stringToChannel(const String&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
-    String in2() const { return m_in2.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
+    String in2() const { return m_in2->currentValue(); }
     ChannelSelectorType xChannelSelector() const { return m_xChannelSelector.currentValue(attributeOwnerProxy()); }
     ChannelSelectorType yChannelSelector() const { return m_yChannelSelector.currentValue(attributeOwnerProxy()); }
     float scale() const { return m_scale->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> in2Animated() { return m_in2.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
+    SVGAnimatedString& in2Animated() { return m_in2; }
     RefPtr<SVGAnimatedEnumeration> xChannelSelectorAnimated() { return m_xChannelSelector.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedEnumeration> yChannelSelectorAnimated() { return m_yChannelSelector.animatedProperty(attributeOwnerProxy()); }
     SVGAnimatedNumber& scaleAnimated() { return m_scale; }
@@ -106,8 +106,8 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
-    SVGAnimatedStringAttribute m_in2;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
+    Ref<SVGAnimatedString> m_in2 { SVGAnimatedString::create(this) };
     SVGAnimatedEnumerationAttribute<ChannelSelectorType> m_xChannelSelector { CHANNEL_A };
     SVGAnimatedEnumerationAttribute<ChannelSelectorType> m_yChannelSelector { CHANNEL_A };
     Ref<SVGAnimatedNumber> m_scale { SVGAnimatedNumber::create(this) };
index 4b8502b..f61dc8a 100644 (file)
@@ -36,10 +36,10 @@ inline SVGFEDropShadowElement::SVGFEDropShadowElement(const QualifiedName& tagNa
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feDropShadowTag));
-    registerAttributes();
     
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEDropShadowElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::dxAttr, &SVGFEDropShadowElement::m_dx>();
         PropertyRegistry::registerProperty<SVGNames::dyAttr, &SVGFEDropShadowElement::m_dy>();
         PropertyRegistry::registerProperty<SVGNames::stdDeviationAttr, &SVGFEDropShadowElement::m_stdDeviationX, &SVGFEDropShadowElement::m_stdDeviationY>();
@@ -58,14 +58,6 @@ void SVGFEDropShadowElement::setStdDeviation(float x, float y)
     invalidate();
 }
 
-void SVGFEDropShadowElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEDropShadowElement::m_in1>();
-}
-
 void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::stdDeviationAttr) {
@@ -78,7 +70,7 @@ void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const Ato
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
@@ -97,7 +89,7 @@ void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const Ato
 
 void SVGFEDropShadowElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (isKnownAttribute(attrName)) {
+    if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidate();
         return;
index a0e65c2..5be87b6 100644 (file)
@@ -32,13 +32,13 @@ public:
     
     void setStdDeviation(float stdDeviationX, float stdDeviationY);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     float dx() const { return m_dx->currentValue(); }
     float dy() const { return m_dy->currentValue(); }
     float stdDeviationX() const { return m_stdDeviationX->currentValue(); }
     float stdDeviationY() const { return m_stdDeviationY->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     SVGAnimatedNumber& dxAnimated() { return m_dx; }
     SVGAnimatedNumber& dyAnimated() { return m_dy; }
     SVGAnimatedNumber& stdDeviationXAnimated() { return m_stdDeviationX; }
@@ -48,18 +48,11 @@ private:
     SVGFEDropShadowElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEDropShadowElement, SVGFilterPrimitiveStandardAttributes>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
-    
+
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEDropShadowElement, SVGFilterPrimitiveStandardAttributes>;
     const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
 
-    static bool isKnownAttribute(const QualifiedName& attributeName)
-    {
-        return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
-    }
-
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
 
@@ -67,7 +60,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     Ref<SVGAnimatedNumber> m_dx { SVGAnimatedNumber::create(this, 2) };
     Ref<SVGAnimatedNumber> m_dy { SVGAnimatedNumber::create(this, 2) };
     Ref<SVGAnimatedNumber> m_stdDeviationX { SVGAnimatedNumber::create(this, 2) };
index 0a927fe..6eebaac 100644 (file)
@@ -40,6 +40,7 @@ inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& t
 
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEGaussianBlurElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::stdDeviationAttr, &SVGFEGaussianBlurElement::m_stdDeviationX, &SVGFEGaussianBlurElement::m_stdDeviationY>();
     });
 }
@@ -61,7 +62,6 @@ void SVGFEGaussianBlurElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEGaussianBlurElement::m_in1>();
     registry.registerAttribute<SVGNames::edgeModeAttr, EdgeModeType, &SVGFEGaussianBlurElement::m_edgeMode>();
 }
 
@@ -77,7 +77,7 @@ void SVGFEGaussianBlurElement::parseAttribute(const QualifiedName& name, const A
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index b045028..5d3e6df 100644 (file)
@@ -35,12 +35,12 @@ public:
 
     void setStdDeviation(float stdDeviationX, float stdDeviationY);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     float stdDeviationX() const { return m_stdDeviationX->currentValue(); }
     float stdDeviationY() const { return m_stdDeviationY->currentValue(); }
     EdgeModeType edgeMode() const { return m_edgeMode.currentValue(attributeOwnerProxy()); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     SVGAnimatedNumber& stdDeviationXAnimated() { return m_stdDeviationX; }
     SVGAnimatedNumber& stdDeviationYAnimated() { return m_stdDeviationY; }
     RefPtr<SVGAnimatedEnumeration> edgeModeAnimated() { return m_edgeMode.animatedProperty(attributeOwnerProxy()); }
@@ -68,7 +68,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     Ref<SVGAnimatedNumber> m_stdDeviationX { SVGAnimatedNumber::create(this) };
     Ref<SVGAnimatedNumber> m_stdDeviationY { SVGAnimatedNumber::create(this) };
     SVGAnimatedEnumerationAttribute<EdgeModeType> m_edgeMode { EDGEMODE_NONE };
index 69cdef0..e82bbfc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -36,7 +36,11 @@ inline SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName
     : SVGElement(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feMergeNodeTag));
-    registerAttributes();
+    
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEMergeNodeElement::m_in1>();
+    });
 }
 
 Ref<SVGFEMergeNodeElement> SVGFEMergeNodeElement::create(const QualifiedName& tagName, Document& document)
@@ -44,18 +48,10 @@ Ref<SVGFEMergeNodeElement> SVGFEMergeNodeElement::create(const QualifiedName& ta
     return adoptRef(*new SVGFEMergeNodeElement(tagName, document));
 }
 
-void SVGFEMergeNodeElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEMergeNodeElement::m_in1>();
-}
-
 void SVGFEMergeNodeElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index 726fb62..9bc6144 100644 (file)
@@ -21,7 +21,6 @@
 
 #pragma once
 
-#include "SVGAnimatedString.h"
 #include "SVGElement.h"
 
 namespace WebCore {
@@ -31,25 +30,18 @@ class SVGFEMergeNodeElement final : public SVGElement {
 public:
     static Ref<SVGFEMergeNodeElement> create(const QualifiedName&, Document&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
 
 private:
     SVGFEMergeNodeElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEMergeNodeElement, SVGElement>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEMergeNodeElement, SVGElement>;
     const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
 
-    static bool isKnownAttribute(const QualifiedName& attributeName)
-    {
-        return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
-    }
-
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
 
@@ -57,7 +49,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
 };
 
 } // namespace WebCore
index 62ff24a..9376dd8 100644 (file)
@@ -39,6 +39,7 @@ inline SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagNa
     
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEMorphologyElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::radiusAttr, &SVGFEMorphologyElement::m_radiusX, &SVGFEMorphologyElement::m_radiusY>();
     });
 }
@@ -60,7 +61,6 @@ void SVGFEMorphologyElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEMorphologyElement::m_in1>();
     registry.registerAttribute<SVGNames::operatorAttr, MorphologyOperatorType, &SVGFEMorphologyElement::m_svgOperator>();
 }
 
@@ -74,7 +74,7 @@ void SVGFEMorphologyElement::parseAttribute(const QualifiedName& name, const Ato
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index ee755fd..61f44c5 100644 (file)
@@ -62,12 +62,12 @@ public:
 
     void setRadius(float radiusX, float radiusY);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     MorphologyOperatorType svgOperator() const { return m_svgOperator.currentValue(attributeOwnerProxy()); }
     float radiusX() const { return m_radiusX->currentValue(); }
     float radiusY() const { return m_radiusY->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     RefPtr<SVGAnimatedEnumeration> svgOperatorAnimated() { return m_svgOperator.animatedProperty(attributeOwnerProxy()); }
     SVGAnimatedNumber& radiusXAnimated() { return m_radiusX; }
     SVGAnimatedNumber& radiusYAnimated() { return m_radiusY; }
@@ -96,7 +96,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     SVGAnimatedEnumerationAttribute<MorphologyOperatorType> m_svgOperator { FEMORPHOLOGY_OPERATOR_ERODE };
     Ref<SVGAnimatedNumber> m_radiusX { SVGAnimatedNumber::create(this) };
     Ref<SVGAnimatedNumber> m_radiusY { SVGAnimatedNumber::create(this) };
index 25b81b0..db10de8 100644 (file)
@@ -36,10 +36,10 @@ inline SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Docu
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feOffsetTag));
-    registerAttributes();
     
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEOffsetElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::dxAttr, &SVGFEOffsetElement::m_dx>();
         PropertyRegistry::registerProperty<SVGNames::dyAttr, &SVGFEOffsetElement::m_dy>();
     });
@@ -50,14 +50,6 @@ Ref<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& tagName,
     return adoptRef(*new SVGFEOffsetElement(tagName, document));
 }
 
-void SVGFEOffsetElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFEOffsetElement::m_in1>();
-}
-
 void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::dxAttr) {
@@ -71,7 +63,7 @@ void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicS
     }
 
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
@@ -80,7 +72,7 @@ void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicS
 
 void SVGFEOffsetElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (isKnownAttribute(attrName)) {
+    if (PropertyRegistry::isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidate();
         return;
index e8fb146..0d42103 100644 (file)
@@ -30,11 +30,11 @@ class SVGFEOffsetElement final : public SVGFilterPrimitiveStandardAttributes {
 public:
     static Ref<SVGFEOffsetElement> create(const QualifiedName&, Document&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     float dx() const { return m_dx->currentValue(); }
     float dy() const { return m_dy->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     SVGAnimatedNumber& dxAnimated() { return m_dx; }
     SVGAnimatedNumber& dyAnimated() { return m_dy; }
 
@@ -42,18 +42,11 @@ private:
     SVGFEOffsetElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEOffsetElement, SVGFilterPrimitiveStandardAttributes>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEOffsetElement, SVGFilterPrimitiveStandardAttributes>;
     const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
 
-    static bool isKnownAttribute(const QualifiedName& attributeName)
-    {
-        return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
-    }
-
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
 
@@ -61,7 +54,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     Ref<SVGAnimatedNumber> m_dx { SVGAnimatedNumber::create(this) };
     Ref<SVGAnimatedNumber> m_dy { SVGAnimatedNumber::create(this) };
 };
index 9f1c516..767381e 100644 (file)
@@ -39,10 +39,10 @@ inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(const Qualifie
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feSpecularLightingTag));
-    registerAttributes();
     
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFESpecularLightingElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::specularConstantAttr, &SVGFESpecularLightingElement::m_specularConstant>();
         PropertyRegistry::registerProperty<SVGNames::specularExponentAttr, &SVGFESpecularLightingElement::m_specularExponent>();
         PropertyRegistry::registerProperty<SVGNames::surfaceScaleAttr, &SVGFESpecularLightingElement::m_surfaceScale>();
@@ -55,18 +55,10 @@ Ref<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(const Qua
     return adoptRef(*new SVGFESpecularLightingElement(tagName, document));
 }
 
-void SVGFESpecularLightingElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFESpecularLightingElement::m_in1>();
-}
-
 void SVGFESpecularLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index bf7bd87..c47c0b4 100644 (file)
@@ -34,14 +34,14 @@ public:
     static Ref<SVGFESpecularLightingElement> create(const QualifiedName&, Document&);
     void lightElementAttributeChanged(const SVGFELightElement*, const QualifiedName&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
     float specularConstant() const { return m_specularConstant->currentValue(); }
     float specularExponent() const { return m_specularExponent->currentValue(); }
     float surfaceScale() const { return m_surfaceScale->currentValue(); }
     float kernelUnitLengthX() const { return m_kernelUnitLengthX->currentValue(); }
     float kernelUnitLengthY() const { return m_kernelUnitLengthY->currentValue(); }
 
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
     SVGAnimatedNumber& specularConstantAnimated() { return m_specularConstant; }
     SVGAnimatedNumber& specularExponentAnimated() { return m_specularExponent; }
     SVGAnimatedNumber& surfaceScaleAnimated() { return m_surfaceScale; }
@@ -52,18 +52,11 @@ private:
     SVGFESpecularLightingElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFESpecularLightingElement, SVGFilterPrimitiveStandardAttributes>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFESpecularLightingElement, SVGFilterPrimitiveStandardAttributes>;
     const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
 
-    static bool isKnownAttribute(const QualifiedName& attributeName)
-    {
-        return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
-    }
-
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
 
@@ -72,7 +65,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     Ref<SVGAnimatedNumber> m_specularConstant { SVGAnimatedNumber::create(this, 1) };
     Ref<SVGAnimatedNumber> m_specularExponent { SVGAnimatedNumber::create(this, 1) };
     Ref<SVGAnimatedNumber> m_surfaceScale { SVGAnimatedNumber::create(this, 1) };
index 945d1d0..9887e4a 100644 (file)
@@ -37,7 +37,11 @@ inline SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feTileTag));
-    registerAttributes();
+
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFETileElement::m_in1>();
+    });
 }
 
 Ref<SVGFETileElement> SVGFETileElement::create(const QualifiedName& tagName, Document& document)
@@ -45,18 +49,10 @@ Ref<SVGFETileElement> SVGFETileElement::create(const QualifiedName& tagName, Doc
     return adoptRef(*new SVGFETileElement(tagName, document));
 }
 
-void SVGFETileElement::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::inAttr, &SVGFETileElement::m_in1>();
-}
-
 void SVGFETileElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        m_in1.setValue(value);
+        m_in1->setBaseValInternal(value);
         return;
     }
 
index 8d5dc9b..8aee2be 100644 (file)
@@ -30,15 +30,13 @@ class SVGFETileElement final : public SVGFilterPrimitiveStandardAttributes {
 public:
     static Ref<SVGFETileElement> create(const QualifiedName&, Document&);
 
-    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    String in1() const { return m_in1->currentValue(); }
+    SVGAnimatedString& in1Animated() { return m_in1; }
 
 private:
     SVGFETileElement(const QualifiedName&, Document&);
 
     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFETileElement, SVGFilterPrimitiveStandardAttributes>;
-    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
-    static void registerAttributes();
     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFETileElement, SVGFilterPrimitiveStandardAttributes>;
@@ -56,7 +54,7 @@ private:
 
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
-    SVGAnimatedStringAttribute m_in1;
+    Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
 };
 
 } // namespace WebCore
index 88806fb..75fede3 100644 (file)
@@ -37,6 +37,11 @@ SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes(const
     : SVGElement(tagName, document)
 {
     registerAttributes();
+
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::resultAttr, &SVGFilterPrimitiveStandardAttributes::m_result>();
+    });
 }
 
 void SVGFilterPrimitiveStandardAttributes::registerAttributes()
@@ -48,7 +53,6 @@ void SVGFilterPrimitiveStandardAttributes::registerAttributes()
     registry.registerAttribute<SVGNames::yAttr, &SVGFilterPrimitiveStandardAttributes::m_y>();
     registry.registerAttribute<SVGNames::widthAttr, &SVGFilterPrimitiveStandardAttributes::m_width>();
     registry.registerAttribute<SVGNames::heightAttr, &SVGFilterPrimitiveStandardAttributes::m_height>();
-    registry.registerAttribute<SVGNames::resultAttr, &SVGFilterPrimitiveStandardAttributes::m_result>();
 }
 
 void SVGFilterPrimitiveStandardAttributes::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -64,7 +68,7 @@ void SVGFilterPrimitiveStandardAttributes::parseAttribute(const QualifiedName& n
     else if (name == SVGNames::heightAttr)
         m_height.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError));
     else if (name == SVGNames::resultAttr)
-        m_result.setValue(value);
+        m_result->setBaseValInternal(value);
 
     reportAttributeParsingError(parseError, name, value);
 
index fefebea..a81bb0d 100644 (file)
@@ -24,7 +24,6 @@
 #include "RenderSVGResourceFilter.h"
 #include "RenderSVGResourceFilterPrimitive.h"
 #include "SVGAnimatedLength.h"
-#include "SVGAnimatedString.h"
 #include "SVGElement.h"
 #include "SVGNames.h"
 #include <wtf/RefPtr.h>
@@ -53,13 +52,13 @@ public:
     const SVGLengthValue& y() const { return m_y.currentValue(attributeOwnerProxy()); }
     const SVGLengthValue& width() const { return m_width.currentValue(attributeOwnerProxy()); }
     const SVGLengthValue& height() const { return m_height.currentValue(attributeOwnerProxy()); }
-    const String& result() const { return m_result.currentValue(attributeOwnerProxy()); }
+    String result() const { return m_result->currentValue(); }
 
     RefPtr<SVGAnimatedLength> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedLength> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedLength> widthAnimated() { return m_width.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedLength> heightAnimated() { return m_height.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedString> resultAnimated() { return m_result.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedString& resultAnimated() { return m_result; }
 
 protected:
     SVGFilterPrimitiveStandardAttributes(const QualifiedName&, Document&);
@@ -96,7 +95,7 @@ private:
     SVGAnimatedLengthAttribute m_y { LengthModeHeight, "0%" };
     SVGAnimatedLengthAttribute m_width { LengthModeWidth, "100%" };
     SVGAnimatedLengthAttribute m_height { LengthModeHeight, "100%" };
-    SVGAnimatedStringAttribute m_result;
+    Ref<SVGAnimatedString> m_result { SVGAnimatedString::create(this) };
 };
 
 void invalidateFilterPrimitiveParent(SVGElement*);
index fda2bca..ccb492f 100644 (file)
@@ -88,6 +88,14 @@ bool SVGLegacyAttributeAnimationController::hasValidAttributeType() const
     return m_animatedPropertyType != AnimatedUnknown;
 }
 
+bool SVGLegacyAttributeAnimationController::isDiscreteAnimator() const
+{
+    return m_animatedPropertyType == AnimatedBoolean
+        || m_animatedPropertyType == AnimatedEnumeration
+        || m_animatedPropertyType == AnimatedPreserveAspectRatio
+        || m_animatedPropertyType == AnimatedString;
+}
+
 bool SVGLegacyAttributeAnimationController::calculateFromAndToValues(const String& fromString, const String& toString)
 {
     m_animationElement.determinePropertyValueTypes(fromString, toString);
index bd31b23..cc24d95 100644 (file)
@@ -56,6 +56,7 @@ private:
     
     bool isAdditive() const override;
     bool hasValidAttributeType() const override;
+    bool isDiscreteAnimator() const override;
 
     const AnimatedPropertyType m_animatedPropertyType;
 
index 25977ef..6f7b955 100644 (file)
@@ -20,7 +20,6 @@
 
 #pragma once
 
-#include "SVGAnimatedString.h"
 #include "SVGElement.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGNames.h"
index 6760ccd..96dae29 100644 (file)
@@ -21,7 +21,6 @@
 
 #pragma once
 
-#include "SVGAnimatedString.h"
 #include "SVGElement.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGURIReference.h"
index 998e2f4..1424bbf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -33,17 +33,13 @@ namespace WebCore {
 
 SVGURIReference::SVGURIReference(SVGElement* contextElement)
     : m_attributeOwnerProxy(std::make_unique<AttributeOwnerProxy>(*this, *contextElement))
+    , m_href(SVGAnimatedString::create(contextElement))
 {
-    registerAttributes();
-}
-
-void SVGURIReference::registerAttributes()
-{
-    auto& registry = attributeRegistry();
-    if (!registry.isEmpty())
-        return;
-    registry.registerAttribute<SVGNames::hrefAttr, &SVGURIReference::m_href>();
-    registry.registerAttribute<XLinkNames::hrefAttr, &SVGURIReference::m_href>();
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::hrefAttr, &SVGURIReference::m_href>();
+        PropertyRegistry::registerProperty<XLinkNames::hrefAttr, &SVGURIReference::m_href>();
+    });
 }
 
 SVGURIReference::AttributeRegistry& SVGURIReference::attributeRegistry()
@@ -53,23 +49,13 @@ SVGURIReference::AttributeRegistry& SVGURIReference::attributeRegistry()
 
 bool SVGURIReference::isKnownAttribute(const QualifiedName& attributeName)
 {
-    return AttributeOwnerProxy::isKnownAttribute(attributeName);
+    return PropertyRegistry::isKnownAttribute(attributeName);
 }
 
 void SVGURIReference::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (isKnownAttribute(name))
-        m_href.setValue(value);
-}
-
-const String& SVGURIReference::href() const
-{
-    return m_href.currentValue(*m_attributeOwnerProxy);
-}
-
-RefPtr<SVGAnimatedString> SVGURIReference::hrefAnimated()
-{
-    return m_href.animatedProperty(*m_attributeOwnerProxy);
+        m_href->setBaseValInternal(value);
 }
 
 String SVGURIReference::fragmentIdentifierFromIRIString(const String& url, const Document& document)
index 3172036..f244c7e 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "Document.h"
 #include "QualifiedName.h"
-#include "SVGAnimatedString.h"
 #include "SVGPropertyOwnerRegistry.h"
 
 namespace WebCore {
@@ -69,8 +68,8 @@ public:
 
     using PropertyRegistry = SVGPropertyOwnerRegistry<SVGURIReference>;
 
-    const String& href() const;
-    RefPtr<SVGAnimatedString> hrefAnimated();
+    String href() const { return m_href->currentValue(); }
+    SVGAnimatedString& hrefAnimated() { return m_href; }
 
 protected:
     SVGURIReference(SVGElement* contextElement);
@@ -78,10 +77,8 @@ protected:
     static bool isKnownAttribute(const QualifiedName& attributeName);
 
 private:
-    static void registerAttributes();
-
     std::unique_ptr<AttributeOwnerProxy> m_attributeOwnerProxy;
-    SVGAnimatedStringAttribute m_href;
+    Ref<SVGAnimatedString> m_href;
 };
 
 } // namespace WebCore
index d3049bb..3d331ef 100644 (file)
@@ -142,4 +142,26 @@ private:
     }
 };
 
+template<typename OwnerType>
+class SVGAnimatedStringAccessor final : public SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedString> {
+    using Base = SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedString>;
+    using Base::property;
+
+public:
+    using Base::Base;
+    template<Ref<SVGAnimatedString> OwnerType::*property>
+    constexpr static const SVGMemberAccessor<OwnerType>& singleton() { return Base::template singleton<SVGAnimatedStringAccessor, property>(); }
+
+private:
+    std::unique_ptr<SVGAttributeAnimator> createAnimator(OwnerType& owner, const QualifiedName& attributeName, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive) const final
+    {
+        return SVGAnimatedStringAnimator::create(attributeName, property(owner), animationMode, calcMode, isAccumulated, isAdditive);
+    }
+
+    void appendAnimatedInstance(OwnerType& owner, SVGAttributeAnimator& animator) const final
+    {
+        static_cast<SVGAnimatedStringAnimator&>(animator).appendAnimatedInstance(property(owner));
+    }
+};
+
 }
index 986a9d8..cf53ac1 100644 (file)
@@ -131,4 +131,22 @@ private:
     }
 };
 
+class SVGAnimatedStringAnimator final : public SVGAnimatedPropertyAnimator<SVGAnimatedString, SVGAnimationStringFunction> {
+    using Base = SVGAnimatedPropertyAnimator<SVGAnimatedString, SVGAnimationStringFunction>;
+    using Base::Base;
+
+public:
+    static auto create(const QualifiedName& attributeName, Ref<SVGAnimatedString>& animated, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+    {
+        return std::make_unique<SVGAnimatedStringAnimator>(attributeName, animated, animationMode, calcMode, isAccumulated, isAdditive);
+    }
+
+private:
+    void progress(SVGElement* targetElement, float percentage, unsigned repeatCount) final
+    {
+        String& animated = m_animated->animVal();
+        m_function.progress(targetElement, percentage, repeatCount, animated);
+    }
+};
+
 }
index ea53064..2e45dfc 100644 (file)
@@ -32,7 +32,6 @@
 #include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedPointList.h"
 #include "SVGAnimatedPrimitiveProperty.h"
-#include "SVGAnimatedString.h"
 #include "SVGAnimatedTransformList.h"
 #include "SVGAnimatedValueProperty.h"
 #include "SVGPreserveAspectRatio.h"
@@ -43,6 +42,7 @@ namespace WebCore {
 using SVGAnimatedBoolean = SVGAnimatedPrimitiveProperty<bool>;
 using SVGAnimatedInteger = SVGAnimatedPrimitiveProperty<int>;
 using SVGAnimatedNumber = SVGAnimatedPrimitiveProperty<float>;
+using SVGAnimatedString = SVGAnimatedPrimitiveProperty<String>;
 
 using SVGAnimatedRect = SVGAnimatedValueProperty<SVGRect>;
 using SVGAnimatedPreserveAspectRatio = SVGAnimatedValueProperty<SVGPreserveAspectRatio>;
index a0d25eb..62546df 100644 (file)
@@ -30,7 +30,6 @@
 #include "SVGAnimatedLengthList.h"
 #include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedPointList.h"
-#include "SVGAnimatedString.h"
 #include "SVGAnimatedTransformList.h"
 #include "SVGAttributeAccessor.h"
 #include "SVGLegacyAnimatedProperty.h"
@@ -85,12 +84,6 @@ public:
         registerAttribute(SVGAnimatedPointListAttributeAccessor<OwnerType>::template singleton<attributeName, attribute>());
     }
 
-    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGAnimatedStringAttribute OwnerType::*attribute>
-    void registerAttribute()
-    {
-        registerAttribute(SVGAnimatedStringAttributeAccessor<OwnerType>::template singleton<attributeName, attribute>());
-    }
-
     template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGAnimatedTransformListAttribute OwnerType::*attribute>
     void registerAttribute()
     {
index eb8e33a..e820685 100644 (file)
@@ -32,5 +32,6 @@ namespace WebCore {
 
 using SVGColorAnimator = SVGPrimitivePropertyAnimator<Color, SVGAnimationColorFunction>;
 using SVGNumberAnimator = SVGPrimitivePropertyAnimator<float, SVGAnimationNumberFunction>;
+using SVGStringAnimator = SVGPrimitivePropertyAnimator<String, SVGAnimationStringFunction>;
 
 }
index 7a7a6e5..539d46a 100644 (file)
@@ -84,6 +84,11 @@ private:
     {
         return SVGNumberAnimator::create(attributeName,  WTFMove(property), animationMode, calcMode, isAccumulated, isAdditive);
     }
+    
+    static auto createStringAnimator(const QualifiedName& attributeName, Ref<SVGProperty>&& property, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+    {
+        return SVGStringAnimator::create(attributeName, WTFMove(property), animationMode, calcMode, isAccumulated, isAdditive);
+    }
 
     static const AttributeAnimatorCreator& attributeAnimatorCreator()
     {
@@ -101,6 +106,43 @@ private:
             { SVGNames::stop_opacityAttr->impl(),       std::make_pair(SVGValueProperty<float>::create, SVGPropertyAnimatorFactory::createNumberAnimator) },
             { SVGNames::stroke_miterlimitAttr->impl(),  std::make_pair(SVGValueProperty<float>::create, SVGPropertyAnimatorFactory::createNumberAnimator) },
             { SVGNames::stroke_opacityAttr->impl(),     std::make_pair(SVGValueProperty<float>::create, SVGPropertyAnimatorFactory::createNumberAnimator) },
+            
+            { SVGNames::alignment_baselineAttr->impl(),             std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::baseline_shiftAttr->impl(),                 std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::buffered_renderingAttr->impl(),             std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::clip_pathAttr->impl(),                      std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::clip_ruleAttr->impl(),                      std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::color_interpolationAttr->impl(),            std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::color_interpolation_filtersAttr->impl(),    std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::color_profileAttr->impl(),                  std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::color_renderingAttr->impl(),                std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::cursorAttr->impl(),                         std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::displayAttr->impl(),                        std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::dominant_baselineAttr->impl(),              std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::fill_ruleAttr->impl(),                      std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::filterAttr->impl(),                         std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::font_familyAttr->impl(),                    std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::font_stretchAttr->impl(),                   std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::font_styleAttr->impl(),                     std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::font_variantAttr->impl(),                   std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::font_weightAttr->impl(),                    std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::image_renderingAttr->impl(),                std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::marker_endAttr->impl(),                     std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::marker_midAttr->impl(),                     std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::marker_startAttr->impl(),                   std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::maskAttr->impl(),                           std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::mask_typeAttr->impl(),                      std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::overflowAttr->impl(),                       std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::paint_orderAttr->impl(),                    std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::pointer_eventsAttr->impl(),                 std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::shape_renderingAttr->impl(),                std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::stroke_linecapAttr->impl(),                 std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::stroke_linejoinAttr->impl(),                std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::text_anchorAttr->impl(),                    std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::text_decorationAttr->impl(),                std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::text_renderingAttr->impl(),                 std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::vector_effectAttr->impl(),                  std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) },
+            { SVGNames::visibilityAttr->impl(),                     std::make_pair(SVGValueProperty<String>::create, SVGPropertyAnimatorFactory::createStringAnimator) }
         });
         return map;
     }
index 91bdda4..437d6bd 100644 (file)
@@ -79,6 +79,12 @@ public:
         registerProperty(attributeName, SVGAnimatedRectAccessor<OwnerType>::template singleton<property>());
     }
 
+    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedString> OwnerType::*property>
+    static void registerProperty()
+    {
+        registerProperty(attributeName, SVGAnimatedStringAccessor<OwnerType>::template singleton<property>());
+    }
+    
     template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedInteger> OwnerType::*property1, Ref<SVGAnimatedInteger> OwnerType::*property2>
     static void registerProperty()
     {