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)
commit52a61a9c07242df7eb986a15010ecb56ccc39d22
treed3c34f3f81abeec72974550e996dae33a937a537
parentd68c14105ae08dfda299bfd81dd2497c2e2980e6
Remove the SVG property tear off objects for SVGAnimatedString
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