Remove the SVG elements' attributes macros
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 21:08:53 +0000 (21:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Aug 2018 21:08:53 +0000 (21:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186751

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-08-06
Reviewed by Simon Fraser.

This is how the SVG attributes are implemented after removing the SVG macros:

1) The SVG attribute is defined as a super class of SVGAttribute. The super
   classes of SVGAttribute are template classes. The type of these template
   are the property type or the TearOff type.

2) To unify accessing attributes of the SVGElements and its super classes
   an SVGAttributeAccessor template class is added. It is inherited by other
   template classes. The types of these templates are the owner and the
   attributes types. The main functions of these classes is to synchronize
   the new property value with the document attributes pool and to create
   and cache the TearOff objects.

3) To make code shorter and more readable, attribute types and attribute
   accessors are defined for every SVG TearOff type, e.g.
   -- SVGLength:
        SVGAnimatedLengthAttribute and SVGAnimatedLengthAttributeAccessor
   -- SVGAnimatedNumber:
        SVGAnimatedNumberAttribute and SVGAnimatedNumberAttributeAccessor

4) A special accessor is defined for animated pair and optional attributes:
   SVGAnimatedPairAttributeAccessor, e.g.
   -- SVGMarkerElement:
        orient attribute: "angle" or "type"
   -- SVGFEGaussianBlurElement:
        stdDeviation attribute: "x" and "y"

5) The SVG attributes have to be registered into an singleton SVGAttributeRegistry.
   The SVGAttributeRegistry is a template class. The types of this template
   class are the the type of the owner and the base classes of this owner.
   This registry holds a map from "attribute name" to  "attribute accessor".

6) To make the code easier to read, the SVGAttributeRegistry implements
   registerAttribute() for different attribute types. The owner needs only
   to provide the attribute name and a pointer to the class member of this
   attribute to the same function "registerAttribute()". The compiler will
   pick the right function to call based on the type of the attribute.

7) Given a reference to the owner element, SVGAttributeRegistry can loop
   through the attributes of this owner and through the attributes of its
   base classes as well to do operations like synchronizing all the attributes
   or creating the TearOff object of a certain attribute.

8) To make the base class SVGElement have the ability to access the attributes
   of any of its super classes, SVGAttributeOwnerProxy will be used.
   SVGAttributeOwnerProxy is a base class which have all the functions that
   SVGElement needs as pure virtual functions.

9) SVGAttributeOwnerProxyImpl is a template class which implements
   SVGAttributeOwnerProxy and whose types are the owner and its base classes.
   SVGAttributeOwnerProxyImpl keeps a reference to the owner and the context
   SVGElement.

10) All the SVG attribute owners have to implement the virtual function
    attributeOwnerProxy() which returns a reference to SVGAttributeOwnerProxy.
    The local attributeOwnerProxy() returns a reference to a local
    SVGAttributeOwnerProxyImpl. Its type and base types are the class
    hierarchy of this element.

All the attributes of the non-SVGElement-based classes are moved as members
of these classes instead of adding them to all the super classes. These
classes are:
   -- SVGExternalResourcesRequired
   -- SVGURIReference
   -- SVGFitToViewBox
   -- SVGZoomAndPan
   -- SVGLangSpace

The svgAttributeChanged() of all the SVGElement-based classes are now
simplified by distributing the responsibilities of changing an attribute
to the base classes. One exception is the SVGURIReference since the action
to be taken when changing the "href" is different for every super class.

Other work will be done in separate patches.
   -- Shrinking the memory of the SVGElements.
   -- Making all the attributes RefCounted objects.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::draw):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::SVGAElement):
(WebCore::SVGAElement::registerAttributes):
(WebCore::SVGAElement::parseAttribute):
(WebCore::SVGAElement::svgAttributeChanged):
* svg/SVGAElement.h:
* svg/SVGAElement.idl:
* svg/SVGAltGlyphElement.cpp:
(WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
* svg/SVGAltGlyphElement.h:
* svg/SVGAnimatedAngle.h:
* svg/SVGAnimatedBoolean.h:
* svg/SVGAnimatedEnumeration.h:
* svg/SVGAnimatedInteger.h:
* svg/SVGAnimatedLength.h:
* svg/SVGAnimatedLengthList.h:
* svg/SVGAnimatedNumber.h:
* svg/SVGAnimatedNumberList.h:
* svg/SVGAnimatedPath.h:
* svg/SVGAnimatedPointList.h:
* svg/SVGAnimatedPreserveAspectRatio.h:
* svg/SVGAnimatedRect.h:
* svg/SVGAnimatedString.h:
* svg/SVGAnimatedTransformList.h:
* svg/SVGAnimatedTypeAnimator.cpp:
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::SVGAnimationElement):
(WebCore::SVGAnimationElement::requiredFeatures): Deleted.
(WebCore::SVGAnimationElement::requiredExtensions): Deleted.
(WebCore::SVGAnimationElement::systemLanguage): Deleted.
* svg/SVGAnimationElement.h:
(WebCore::SVGAnimationElement::attributeRegistry):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::SVGCircleElement):
(WebCore::SVGCircleElement::registerAttributes):
(WebCore::SVGCircleElement::parseAttribute):
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::SVGClipPathElement):
(WebCore::SVGClipPathElement::registerAttributes):
(WebCore::SVGClipPathElement::parseAttribute):
(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::isSupportedAttribute): Deleted.
* svg/SVGClipPathElement.h:
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
(WebCore::SVGComponentTransferFunctionElement::registerAttributes):
(WebCore::SVGComponentTransferFunctionElement::parseAttribute):
(WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
(WebCore::SVGComponentTransferFunctionElement::transferFunction const):
(WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute): Deleted.
* svg/SVGComponentTransferFunctionElement.h:
(WebCore::SVGComponentTransferFunctionElement::type const):
(WebCore::SVGComponentTransferFunctionElement::tableValues const):
(WebCore::SVGComponentTransferFunctionElement::slope const):
(WebCore::SVGComponentTransferFunctionElement::intercept const):
(WebCore::SVGComponentTransferFunctionElement::amplitude const):
(WebCore::SVGComponentTransferFunctionElement::exponent const):
(WebCore::SVGComponentTransferFunctionElement::offset const):
(WebCore::SVGComponentTransferFunctionElement::typeAnimated):
(WebCore::SVGComponentTransferFunctionElement::tableValuesAnimated):
(WebCore::SVGComponentTransferFunctionElement::slopeAnimated):
(WebCore::SVGComponentTransferFunctionElement::interceptAnimated):
(WebCore::SVGComponentTransferFunctionElement::amplitudeAnimated):
(WebCore::SVGComponentTransferFunctionElement::exponentAnimated):
(WebCore::SVGComponentTransferFunctionElement::offsetAnimated):
(WebCore::SVGComponentTransferFunctionElement::attributeRegistry):
(WebCore::SVGComponentTransferFunctionElement::isKnownAttribute):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::SVGCursorElement):
(WebCore::SVGCursorElement::registerAttributes):
(WebCore::SVGCursorElement::parseAttribute):
(WebCore::SVGCursorElement::svgAttributeChanged):
(WebCore::SVGCursorElement::isSupportedAttribute): Deleted.
(WebCore::SVGCursorElement::requiredFeatures): Deleted.
(WebCore::SVGCursorElement::requiredExtensions): Deleted.
(WebCore::SVGCursorElement::systemLanguage): Deleted.
* svg/SVGCursorElement.h:
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::SVGDefsElement):
* svg/SVGDefsElement.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::registerAttributes):
(WebCore::SVGElement::parseAttribute):
(WebCore::SVGElement::animatedPropertyTypesForAttribute):
(WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
(WebCore::SVGElement::synchronizeAnimatedSVGAttribute const):
(WebCore::SVGElement::isPresentationAttributeWithSVGDOM):
(WebCore::SVGElement::svgAttributeChanged):
(WebCore::SVGElement::synchronizeRequiredFeatures): Deleted.
(WebCore::SVGElement::synchronizeRequiredExtensions): Deleted.
(WebCore::SVGElement::synchronizeSystemLanguage): Deleted.
(WebCore::SVGElement::isKnownAttribute): Deleted.
* svg/SVGElement.h:
(WebCore::SVGElement::attributeRegistry):
(WebCore::SVGElement::isKnownAttribute):
(WebCore::SVGElement::attributeOwnerProxy const):
(WebCore::SVGElement::synchronizeAttribute):
(WebCore::SVGElement::synchronizeAttributes):
(WebCore::SVGElement::animatedTypes const):
(WebCore::SVGElement::lookupAnimatedProperty const):
(WebCore::SVGElement::lookupOrCreateAnimatedProperty):
(WebCore::SVGElement::lookupOrCreateAnimatedProperties):
(WebCore::SVGElement::className const):
(WebCore::SVGElement::classNameAnimated):
(WebCore::SVGElement::synchronizeRequiredFeatures): Deleted.
(WebCore::SVGElement::synchronizeRequiredExtensions): Deleted.
(WebCore::SVGElement::synchronizeSystemLanguage): Deleted.
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::SVGEllipseElement):
(WebCore::SVGEllipseElement::registerAttributes):
(WebCore::SVGEllipseElement::parseAttribute):
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGEllipseElement.h:
* svg/SVGExternalResourcesRequired.cpp:
(WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
(WebCore::SVGExternalResourcesRequired::registerAttributes):
(WebCore::SVGExternalResourcesRequired::parseAttribute):
(WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
(WebCore::SVGExternalResourcesRequired::addSupportedAttributes):
(WebCore::SVGExternalResourcesRequired::dispatchLoadEvent):
(WebCore::SVGExternalResourcesRequired::insertedIntoDocument):
(WebCore::SVGExternalResourcesRequired::finishParsingChildren):
(WebCore::SVGExternalResourcesRequired::haveLoadedRequiredResources const):
(WebCore::SVGExternalResourcesRequired::isKnownAttribute): Deleted.
(WebCore::SVGExternalResourcesRequired::handleAttributeChange): Deleted.
* svg/SVGExternalResourcesRequired.h:
(WebCore::SVGExternalResourcesRequired::attributeRegistry):
(WebCore::SVGExternalResourcesRequired::externalResourcesRequiredAnimated):
(WebCore::SVGExternalResourcesRequired::externalResourcesRequired const):
(WebCore::SVGExternalResourcesRequired::setExternalResourcesRequired):
(WebCore::SVGExternalResourcesRequired::isKnownAttribute):
(WebCore::SVGExternalResourcesRequired::attributeOwnerProxy):
* 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::registerAttributes):
(WebCore::SVGFEComponentTransferElement::parseAttribute):
* 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):
(WebCore::SVGFEConvolveMatrixElement::setFilterEffectAttribute):
(WebCore::SVGFEConvolveMatrixElement::setOrder):
(WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
* svg/SVGFEConvolveMatrixElement.h:
(WebCore::SVGPropertyTraits<EdgeModeType>::initialValue):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
(WebCore::SVGFEDiffuseLightingElement::registerAttributes):
(WebCore::SVGFEDiffuseLightingElement::parseAttribute):
* 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::setStdDeviation):
(WebCore::SVGFEDropShadowElement::registerAttributes):
(WebCore::SVGFEDropShadowElement::parseAttribute):
(WebCore::SVGFEDropShadowElement::svgAttributeChanged):
* svg/SVGFEDropShadowElement.h:
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
(WebCore::SVGFEGaussianBlurElement::setStdDeviation):
(WebCore::SVGFEGaussianBlurElement::registerAttributes):
(WebCore::SVGFEGaussianBlurElement::parseAttribute):
(WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
* svg/SVGFEGaussianBlurElement.h:
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::SVGFEImageElement):
(WebCore::SVGFEImageElement::registerAttributes):
(WebCore::SVGFEImageElement::parseAttribute):
* svg/SVGFEImageElement.h:
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::SVGFELightElement):
(WebCore::SVGFELightElement::registerAttributes):
(WebCore::SVGFELightElement::parseAttribute):
(WebCore::SVGFELightElement::svgAttributeChanged):
* svg/SVGFELightElement.h:
(WebCore::SVGFELightElement::azimuth const):
(WebCore::SVGFELightElement::elevation const):
(WebCore::SVGFELightElement::x const):
(WebCore::SVGFELightElement::y const):
(WebCore::SVGFELightElement::z const):
(WebCore::SVGFELightElement::pointsAtX const):
(WebCore::SVGFELightElement::pointsAtY const):
(WebCore::SVGFELightElement::pointsAtZ const):
(WebCore::SVGFELightElement::specularExponent const):
(WebCore::SVGFELightElement::limitingConeAngle const):
(WebCore::SVGFELightElement::azimuthAnimated):
(WebCore::SVGFELightElement::elevationAnimated):
(WebCore::SVGFELightElement::xAnimated):
(WebCore::SVGFELightElement::yAnimated):
(WebCore::SVGFELightElement::zAnimated):
(WebCore::SVGFELightElement::pointsAtXAnimated):
(WebCore::SVGFELightElement::pointsAtYAnimated):
(WebCore::SVGFELightElement::pointsAtZAnimated):
(WebCore::SVGFELightElement::specularExponentAnimated):
(WebCore::SVGFELightElement::limitingConeAngleAnimated):
(WebCore::SVGFELightElement::attributeRegistry):
(WebCore::SVGFELightElement::isKnownAttribute):
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
(WebCore::SVGFEMergeNodeElement::registerAttributes):
(WebCore::SVGFEMergeNodeElement::parseAttribute):
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
(WebCore::SVGFEMorphologyElement::setRadius):
(WebCore::SVGFEMorphologyElement::registerAttributes):
(WebCore::SVGFEMorphologyElement::parseAttribute):
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
(WebCore::SVGFEOffsetElement::registerAttributes):
(WebCore::SVGFEOffsetElement::parseAttribute):
(WebCore::SVGFEOffsetElement::svgAttributeChanged):
* svg/SVGFEOffsetElement.h:
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
(WebCore::SVGFESpecularLightingElement::registerAttributes):
(WebCore::SVGFESpecularLightingElement::parseAttribute):
* svg/SVGFESpecularLightingElement.h:
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::SVGFETileElement):
(WebCore::SVGFETileElement::registerAttributes):
(WebCore::SVGFETileElement::parseAttribute):
* svg/SVGFETileElement.h:
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
(WebCore::SVGFETurbulenceElement::registerAttributes):
(WebCore::SVGFETurbulenceElement::parseAttribute):
(WebCore::SVGFETurbulenceElement::setFilterEffectAttribute):
(WebCore::SVGFETurbulenceElement::svgAttributeChanged):
* svg/SVGFETurbulenceElement.h:
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::SVGFilterElement):
(WebCore::SVGFilterElement::setFilterRes):
(WebCore::SVGFilterElement::registerAttributes):
(WebCore::SVGFilterElement::parseAttribute):
(WebCore::SVGFilterElement::svgAttributeChanged):
(WebCore::SVGFilterElement::isSupportedAttribute): Deleted.
* svg/SVGFilterElement.h:
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
(WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes):
(WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
(WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
(WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute): Deleted.
* svg/SVGFilterPrimitiveStandardAttributes.h:
(WebCore::SVGFilterPrimitiveStandardAttributes::attributeRegistry):
(WebCore::SVGFilterPrimitiveStandardAttributes::x const):
(WebCore::SVGFilterPrimitiveStandardAttributes::y const):
(WebCore::SVGFilterPrimitiveStandardAttributes::width const):
(WebCore::SVGFilterPrimitiveStandardAttributes::height const):
(WebCore::SVGFilterPrimitiveStandardAttributes::result const):
(WebCore::SVGFilterPrimitiveStandardAttributes::xAnimated):
(WebCore::SVGFilterPrimitiveStandardAttributes::yAnimated):
(WebCore::SVGFilterPrimitiveStandardAttributes::widthAnimated):
(WebCore::SVGFilterPrimitiveStandardAttributes::heightAnimated):
(WebCore::SVGFilterPrimitiveStandardAttributes::resultAnimated):
(WebCore::SVGFilterPrimitiveStandardAttributes::isKnownAttribute):
* svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::SVGFitToViewBox):
(WebCore::SVGFitToViewBox::registerAttributes):
(WebCore::SVGFitToViewBox::setViewBox):
(WebCore::SVGFitToViewBox::resetViewBox):
(WebCore::SVGFitToViewBox::reset):
(WebCore::SVGFitToViewBox::parseAttribute):
(WebCore::SVGFitToViewBox::parseViewBox):
(WebCore::SVGFitToViewBox::isKnownAttribute): Deleted.
(WebCore::SVGFitToViewBox::addSupportedAttributes): Deleted.
* svg/SVGFitToViewBox.h:
(WebCore::SVGFitToViewBox::attributeRegistry):
(WebCore::SVGFitToViewBox::viewBox const):
(WebCore::SVGFitToViewBox::preserveAspectRatio const):
(WebCore::SVGFitToViewBox::viewBoxAnimated):
(WebCore::SVGFitToViewBox::preserveAspectRatioAnimated):
(WebCore::SVGFitToViewBox::setPreserveAspectRatio):
(WebCore::SVGFitToViewBox::resetPreserveAspectRatio):
(WebCore::SVGFitToViewBox::viewBoxString const):
(WebCore::SVGFitToViewBox::preserveAspectRatioString const):
(WebCore::SVGFitToViewBox::hasValidViewBox const):
(WebCore::SVGFitToViewBox::hasEmptyViewBox const):
(WebCore::SVGFitToViewBox::isKnownAttribute):
(WebCore::SVGFitToViewBox::parseAttribute): Deleted.
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement):
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
(WebCore::SVGForeignObjectElement::registerAttributes):
(WebCore::SVGForeignObjectElement::parseAttribute):
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
(WebCore::SVGForeignObjectElement::isSupportedAttribute): Deleted.
* svg/SVGForeignObjectElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::SVGGElement):
(WebCore::SVGGElement::svgAttributeChanged):
(WebCore::SVGGElement::isSupportedAttribute): Deleted.
* svg/SVGGElement.h:
* svg/SVGGeometryElement.cpp:
(WebCore::SVGGeometryElement::SVGGeometryElement):
(WebCore::SVGGeometryElement::registerAttributes):
(WebCore::SVGGeometryElement::parseAttribute):
(WebCore::SVGGeometryElement::svgAttributeChanged):
(WebCore::SVGGeometryElement::isSupportedAttribute): Deleted.
* svg/SVGGeometryElement.h:
(WebCore::SVGGeometryElement::attributeRegistry):
(WebCore::SVGGeometryElement::pathLengthAnimated):
(WebCore::SVGGeometryElement::isKnownAttribute):
* svg/SVGGlyphRefElement.cpp:
(WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
* svg/SVGGlyphRefElement.h:
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::SVGGradientElement):
(WebCore::SVGGradientElement::registerAttributes):
(WebCore::SVGGradientElement::parseAttribute):
(WebCore::SVGGradientElement::svgAttributeChanged):
(WebCore::SVGGradientElement::isSupportedAttribute): Deleted.
* svg/SVGGradientElement.h:
(WebCore::SVGGradientElement::attributeRegistry):
(WebCore::SVGGradientElement::spreadMethod const):
(WebCore::SVGGradientElement::gradientUnits const):
(WebCore::SVGGradientElement::gradientTransform const):
(WebCore::SVGGradientElement::spreadMethodAnimated):
(WebCore::SVGGradientElement::gradientUnitsAnimated):
(WebCore::SVGGradientElement::gradientTransformAnimated):
(WebCore::SVGGradientElement::isKnownAttribute):
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::registerAttributes):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
(WebCore::SVGGraphicsElement::isSupportedAttribute): Deleted.
(WebCore::SVGGraphicsElement::requiredFeatures): Deleted.
(WebCore::SVGGraphicsElement::requiredExtensions): Deleted.
(WebCore::SVGGraphicsElement::systemLanguage): Deleted.
* svg/SVGGraphicsElement.h:
(WebCore::SVGGraphicsElement::attributeRegistry):
(WebCore::SVGGraphicsElement::transform const):
(WebCore::SVGGraphicsElement::transformAnimated):
(WebCore::SVGGraphicsElement::isKnownAttribute):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
(WebCore::SVGImageElement::registerAttributes):
(WebCore::SVGImageElement::parseAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::haveLoadedRequiredResources):
(WebCore::SVGImageElement::isSupportedAttribute): Deleted.
* svg/SVGImageElement.h:
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::dispatchLoadEvent):
* svg/SVGLangSpace.cpp:
(WebCore::SVGLangSpace::SVGLangSpace):
(WebCore::SVGLangSpace::registerAttributes):
(WebCore::SVGLangSpace::xmlspace const):
(WebCore::SVGLangSpace::svgAttributeChanged):
(WebCore::SVGLangSpace::setXmllang): Deleted.
(WebCore::SVGLangSpace::setXmlspace): Deleted.
(WebCore::SVGLangSpace::isKnownAttribute): Deleted.
(WebCore::addWithAndWithoutXMLPrefix): Deleted.
(WebCore::SVGLangSpace::addSupportedAttributes): Deleted.
* svg/SVGLangSpace.h:
(WebCore::SVGLangSpace::xmllang const):
(WebCore::SVGLangSpace::setXmllang):
(WebCore::SVGLangSpace::setXmlspace):
(WebCore::SVGLangSpace::attributeRegistry):
(WebCore::SVGLangSpace::isKnownAttribute):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::SVGLineElement):
(WebCore::SVGLineElement::registerAttributes):
(WebCore::SVGLineElement::parseAttribute):
(WebCore::SVGLineElement::svgAttributeChanged):
(WebCore::SVGLineElement::isSupportedAttribute): Deleted.
* svg/SVGLineElement.h:
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
(WebCore::SVGLinearGradientElement::registerAttributes):
(WebCore::SVGLinearGradientElement::parseAttribute):
(WebCore::SVGLinearGradientElement::svgAttributeChanged):
(WebCore::SVGLinearGradientElement::isSupportedAttribute): Deleted.
* svg/SVGLinearGradientElement.h:
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::SVGMPathElement):
(WebCore::SVGMPathElement::svgAttributeChanged):
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::SVGMarkerElement):
(WebCore::SVGMarkerElement::registerAttributes):
(WebCore::SVGMarkerElement::parseAttribute):
(WebCore::SVGMarkerElement::svgAttributeChanged):
(WebCore::SVGMarkerElement::setOrient):
(WebCore::SVGMarkerElement::orientTypePropertyInfo): Deleted.
(WebCore::SVGMarkerElement::isSupportedAttribute): Deleted.
(WebCore::SVGMarkerElement::synchronizeOrientType): Deleted.
(WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper): Deleted.
(WebCore::SVGMarkerElement::orientType const): Deleted.
(WebCore::SVGMarkerElement::orientTypeAnimated): Deleted.
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::SVGMaskElement):
(WebCore::SVGMaskElement::registerAttributes):
(WebCore::SVGMaskElement::parseAttribute):
(WebCore::SVGMaskElement::svgAttributeChanged):
(WebCore::SVGMaskElement::isSupportedAttribute): Deleted.
(WebCore::SVGMaskElement::requiredFeatures): Deleted.
(WebCore::SVGMaskElement::requiredExtensions): Deleted.
(WebCore::SVGMaskElement::systemLanguage): Deleted.
* svg/SVGMaskElement.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
(WebCore::SVGPathElement::registerAttributes):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::pathByteStream const):
(WebCore::SVGPathElement::lookupOrCreateDWrapper):
(WebCore::SVGPathElement::animatedPropertyWillBeDeleted):
(WebCore::SVGPathElement::pathSegList):
(WebCore::SVGPathElement::animatedPathSegList):
(WebCore::SVGPathElement::pathSegListChanged):
(WebCore::SVGPathElement::dPropertyInfo): Deleted.
(WebCore::SVGPathElement::isSupportedAttribute): Deleted.
(WebCore::SVGPathElement::synchronizeD): Deleted.
* svg/SVGPathElement.h:
* svg/SVGPathSegListValues.h:
(WebCore::SVGPropertyTraits<SVGPathSegListValues>::toString):
* svg/SVGPathSegWithContext.h:
(WebCore::SVGPathSegWithContext::animatedProperty const):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::SVGPatternElement):
(WebCore::SVGPatternElement::registerAttributes):
(WebCore::SVGPatternElement::parseAttribute):
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::collectPatternAttributes const):
(WebCore::SVGPatternElement::isSupportedAttribute): Deleted.
(WebCore::SVGPatternElement::requiredFeatures): Deleted.
(WebCore::SVGPatternElement::requiredExtensions): Deleted.
(WebCore::SVGPatternElement::systemLanguage): Deleted.
* svg/SVGPatternElement.h:
* svg/SVGPointListValues.h:
(WebCore::SVGPropertyTraits<SVGPointListValues>::toString):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::SVGPolyElement):
(WebCore::SVGPolyElement::registerAttributes):
(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::animatedPoints):
(WebCore::SVGPolyElement::pointsPropertyInfo): Deleted.
(WebCore::SVGPolyElement::synchronizePoints): Deleted.
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper): Deleted.
* svg/SVGPolyElement.h:
(WebCore::SVGPolyElement::pointList const):
(WebCore::SVGPolyElement::attributeRegistry):
(WebCore::SVGPolyElement::isKnownAttribute):
* svg/SVGPreserveAspectRatioValue.cpp:
(WebCore::SVGPreserveAspectRatioValue::transformRect const):
(WebCore::SVGPreserveAspectRatioValue::transformRect): Deleted.
* svg/SVGPreserveAspectRatioValue.h:
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
(WebCore::SVGRadialGradientElement::registerAttributes):
(WebCore::SVGRadialGradientElement::parseAttribute):
(WebCore::SVGRadialGradientElement::svgAttributeChanged):
(WebCore::SVGRadialGradientElement::isSupportedAttribute): Deleted.
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::SVGRectElement):
(WebCore::SVGRectElement::registerAttributes):
(WebCore::SVGRectElement::parseAttribute):
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGRectElement.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::registerAttributes):
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::svgAttributeChanged):
(WebCore::SVGSVGElement::viewBoxToViewTransform const):
(WebCore::SVGSVGElement::resetScrollAnchor):
(WebCore::SVGSVGElement::inheritViewAttributes):
* svg/SVGSVGElement.h:
(WebCore::SVGSVGElement::useCurrentView const): Deleted.
(WebCore::SVGSVGElement::currentTranslateValue): Deleted.
(WebCore::SVGSVGElement::zoomAndPan const): Deleted.
(WebCore::SVGSVGElement::setZoomAndPan): Deleted.
(WebCore::SVGSVGElement::timeContainer): Deleted.
(WebCore::SVGSVGElement::hasEmptyViewBox const): Deleted.
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
(WebCore::SVGScriptElement::svgAttributeChanged):
(WebCore::SVGScriptElement::insertedIntoAncestor):
(WebCore::SVGScriptElement::addSubresourceAttributeURLs const):
(WebCore::SVGScriptElement::isURLAttribute const): Deleted.
(WebCore::SVGScriptElement::sourceAttributeValue const): Deleted.
(WebCore::SVGScriptElement::charsetAttributeValue const): Deleted.
(WebCore::SVGScriptElement::typeAttributeValue const): Deleted.
(WebCore::SVGScriptElement::languageAttributeValue const): Deleted.
(WebCore::SVGScriptElement::forAttributeValue const): Deleted.
(WebCore::SVGScriptElement::eventAttributeValue const): Deleted.
(WebCore::SVGScriptElement::hasAsyncAttribute const): Deleted.
(WebCore::SVGScriptElement::hasDeferAttribute const): Deleted.
(WebCore::SVGScriptElement::hasNoModuleAttribute const): Deleted.
(WebCore::SVGScriptElement::hasSourceAttribute const): Deleted.
(WebCore::SVGScriptElement::filterOutAnimatableAttribute const): Deleted.
* svg/SVGScriptElement.h:
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::SVGStopElement):
(WebCore::SVGStopElement::registerAttributes):
(WebCore::SVGStopElement::parseAttribute):
* svg/SVGStopElement.h:
* svg/SVGStringListValues.h:
(WebCore::SVGPropertyTraits<SVGStringListValues>::toString):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::SVGSwitchElement):
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::SVGSymbolElement):
(WebCore::SVGSymbolElement::parseAttribute):
(WebCore::SVGSymbolElement::svgAttributeChanged):
* svg/SVGSymbolElement.h:
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::SVGTRefElement):
* svg/SVGTRefElement.h:
* svg/SVGTests.cpp:
(WebCore::SVGTests::SVGTests):
(WebCore::SVGTests::registerAttributes):
(WebCore::SVGTests::attributeRegistry):
(WebCore::SVGTests::isKnownAttribute):
(WebCore::SVGTests::isValid const):
(WebCore::SVGTests::parseAttribute):
(WebCore::SVGTests::svgAttributeChanged):
(WebCore::SVGTests::requiredFeatures):
(WebCore::SVGTests::requiredExtensions):
(WebCore::SVGTests::systemLanguage):
(WebCore::createSVGTestPropertyInfo): Deleted.
(WebCore::createSVGTextAttributeToPropertyMap): Deleted.
(WebCore::SVGTests::attributeToPropertyMap): Deleted.
(WebCore::SVGTests::handleAttributeChange): Deleted.
(WebCore::SVGTests::synchronizeAttribute): Deleted.
(WebCore::SVGTests::synchronizeRequiredFeatures): Deleted.
(WebCore::SVGTests::synchronizeRequiredExtensions): Deleted.
(WebCore::SVGTests::synchronizeSystemLanguage): Deleted.
* svg/SVGTests.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::SVGTextContentElement):
(WebCore::SVGTextContentElement::registerAttributes):
(WebCore::SVGTextContentElement::parseAttribute):
(WebCore::SVGTextContentElement::svgAttributeChanged):
(WebCore::SVGTextContentElement::textLengthPropertyInfo): Deleted.
(WebCore::SVGTextContentElement::synchronizeTextLength): Deleted.
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper): Deleted.
(WebCore::SVGTextContentElement::textLengthAnimated): Deleted.
(WebCore::SVGTextContentElement::isSupportedAttribute): Deleted.
* svg/SVGTextContentElement.h:
(WebCore::SVGTextContentElement::specifiedTextLength):
(WebCore::SVGTextContentElement::attributeRegistry):
(WebCore::SVGTextContentElement::textLength const):
(WebCore::SVGTextContentElement::lengthAdjust const):
(WebCore::SVGTextContentElement::textLengthAnimated):
(WebCore::SVGTextContentElement::lengthAdjustAnimated):
(WebCore::SVGTextContentElement::isKnownAttribute):
(WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::SVGAnimatedCustomLengthAttribute):
(WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::synchronize):
(WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::animatedProperty):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::SVGTextPathElement):
(WebCore::SVGTextPathElement::registerAttributes):
(WebCore::SVGTextPathElement::parseAttribute):
(WebCore::SVGTextPathElement::svgAttributeChanged):
(WebCore::SVGTextPathElement::isSupportedAttribute): Deleted.
* svg/SVGTextPathElement.h:
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
(WebCore::SVGTextPositioningElement::registerAttributes):
(WebCore::SVGTextPositioningElement::parseAttribute):
(WebCore::SVGTextPositioningElement::svgAttributeChanged):
* svg/SVGTextPositioningElement.h:
(WebCore::SVGTextPositioningElement::attributeRegistry):
(WebCore::SVGTextPositioningElement::x const):
(WebCore::SVGTextPositioningElement::y const):
(WebCore::SVGTextPositioningElement::dx const):
(WebCore::SVGTextPositioningElement::dy const):
(WebCore::SVGTextPositioningElement::rotate const):
(WebCore::SVGTextPositioningElement::xAnimated):
(WebCore::SVGTextPositioningElement::yAnimated):
(WebCore::SVGTextPositioningElement::dxAnimated):
(WebCore::SVGTextPositioningElement::dyAnimated):
(WebCore::SVGTextPositioningElement::rotateAnimated):
(WebCore::SVGTextPositioningElement::isKnownAttribute):
* svg/SVGURIReference.cpp:
(WebCore::SVGURIReference::SVGURIReference):
(WebCore::SVGURIReference::registerAttributes):
(WebCore::SVGURIReference::attributeRegistry):
(WebCore::SVGURIReference::isKnownAttribute):
(WebCore::SVGURIReference::parseAttribute):
(WebCore::SVGURIReference::href const):
(WebCore::SVGURIReference::hrefAnimated):
(WebCore::SVGURIReference::addSupportedAttributes): Deleted.
* svg/SVGURIReference.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):
(WebCore::SVGUseElement::registerAttributes):
(WebCore::SVGUseElement::parseAttribute):
(WebCore::SVGUseElement::insertedIntoAncestor):
(WebCore::SVGUseElement::transferSizeAttributesToTargetClone const):
(WebCore::SVGUseElement::svgAttributeChanged):
(WebCore::SVGUseElement::notifyFinished):
* svg/SVGUseElement.h:
* svg/SVGValue.h:
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::SVGViewElement):
(WebCore::SVGViewElement::parseAttribute):
* svg/SVGViewElement.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::SVGViewSpec):
(WebCore::SVGViewSpec::registerAttributes):
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::reset):
(WebCore::SVGViewSpec::parseViewSpec):
(WebCore::SVGViewSpec::viewBoxPropertyInfo): Deleted.
(WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo): Deleted.
(WebCore::SVGViewSpec::transformPropertyInfo): Deleted.
(WebCore::SVGViewSpec::viewBoxIdentifier): Deleted.
(WebCore::SVGViewSpec::preserveAspectRatioIdentifier): Deleted.
(WebCore::SVGViewSpec::transformIdentifier): Deleted.
(WebCore::SVGViewSpec::setZoomAndPan): Deleted.
(WebCore::SVGViewSpec::transformString const): Deleted.
(WebCore::SVGViewSpec::viewBoxString const): Deleted.
(WebCore::SVGViewSpec::preserveAspectRatioString const): Deleted.
(WebCore::SVGViewSpec::viewBoxAnimated): Deleted.
(WebCore::SVGViewSpec::preserveAspectRatioAnimated): Deleted.
(WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): Deleted.
(WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): Deleted.
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): Deleted.
* svg/SVGViewSpec.h:
* svg/SVGViewSpec.idl:
* svg/SVGZoomAndPan.cpp:
(WebCore::SVGZoomAndPan::SVGZoomAndPan):
(WebCore::SVGZoomAndPan::registerAttributes):
(WebCore::SVGZoomAndPan::parseZoomAndPan):
(WebCore::SVGZoomAndPan::parseAttribute):
(WebCore::SVGZoomAndPan::parse): Deleted.
(WebCore::SVGZoomAndPan::parseAttributeValue): Deleted.
* svg/SVGZoomAndPan.h:
(WebCore::SVGZoomAndPan::zoomAndPan const):
(WebCore::SVGZoomAndPan::setZoomAndPan):
(WebCore::SVGZoomAndPan::reset):
(WebCore::SVGZoomAndPan::attributeRegistry):
(WebCore::SVGZoomAndPan::isKnownAttribute):
(WebCore::SVGZoomAndPan::parseFromNumber): Deleted.
(WebCore::SVGZoomAndPan::parseAttribute): Deleted.
* svg/SVGZoomAndPanType.h: Copied from Source/WebCore/svg/SVGValue.h.
(WebCore::SVGPropertyTraits<SVGZoomAndPanType>::initialValue):
(WebCore::SVGPropertyTraits<SVGZoomAndPanType>::toString):
(WebCore::SVGPropertyTraits<SVGZoomAndPanType>::fromString):
* svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp: Copied from Source/WebCore/svg/SVGValue.h.
(WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
(WebCore::SVGAnimatedPathSegListPropertyTearOff::~SVGAnimatedPathSegListPropertyTearOff):
(WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
* svg/properties/SVGAnimatedProperty.cpp:
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::animatedPropertyCache): Deleted.
* svg/properties/SVGAnimatedProperty.h:
(WebCore::SVGAnimatedProperty::isAnimating const):
(WebCore::SVGAnimatedProperty::isAnimatedListTearOff const):
(WebCore::SVGAnimatedProperty::lookupOrCreateAnimatedProperty):
(WebCore::SVGAnimatedProperty::lookupAnimatedProperty):
(WebCore::SVGAnimatedProperty::animatedPropertyCache):
(WebCore::SVGAnimatedProperty::lookupOrCreateWrapper): Deleted.
(WebCore::SVGAnimatedProperty::lookupWrapper): Deleted.
* svg/properties/SVGAnimatedPropertyMacros.h: Removed.
* svg/properties/SVGAnimatedPropertyType.h: Copied from Source/WebCore/svg/SVGAElement.idl.
* svg/properties/SVGAttribute.h: Added.
(WebCore::SVGPropertyAttribute::SVGPropertyAttribute):
(WebCore::SVGPropertyAttribute::value):
(WebCore::SVGPropertyAttribute::value const):
(WebCore::SVGPropertyAttribute::setValue):
(WebCore::SVGPropertyAttribute::resetValue):
(WebCore::SVGPropertyAttribute::toString const):
(WebCore::SVGPropertyAttribute::setShouldSynchronize):
(WebCore::SVGPropertyAttribute::shouldSynchronize const):
(WebCore::SVGPropertyAttribute::synchronize):
(WebCore::SVGAnimatedAttribute::SVGAnimatedAttribute):
(WebCore::SVGAnimatedAttribute::currentValue const):
(WebCore::SVGAnimatedAttribute::animatedProperty):
(WebCore::SVGAnimatedAttributeList::SVGAnimatedAttributeList):
(WebCore::SVGAnimatedAttributeList::detachAnimatedListWrappers):
* svg/properties/SVGAttributeAccessor.h: Added.
(WebCore::SVGAttributeAccessor::SVGAttributeAccessor):
(WebCore::SVGAttributeAccessor::attributeName const):
(WebCore::SVGAttributeAccessor::isAnimatedLengthAttribute const):
(WebCore::SVGAttributeAccessor::animatedType const):
(WebCore::SVGAttributeAccessor::animatedTypes const):
(WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperty const):
(WebCore::SVGAttributeAccessor::lookupAnimatedProperty const):
(WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperties const):
(WebCore::SVGPropertyAttributeAccessor::singleton):
(WebCore::SVGPropertyAttributeAccessor::SVGPropertyAttributeAccessor):
(WebCore::SVGPropertyAttributeAccessor::attribute const):
(WebCore::SVGAnimatedAttributeAccessor::singleton):
(WebCore::SVGAnimatedAttributeAccessor::SVGAnimatedAttributeAccessor):
(WebCore::SVGAnimatedAttributeAccessor::lookupOrCreateAnimatedProperty):
(WebCore::SVGAnimatedAttributeAccessor::lookupAnimatedProperty):
(WebCore::SVGAnimatedPairAttributeAccessor::SVGAnimatedPairAttributeAccessor):
(WebCore::SVGAnimatedPairAttributeAccessor::secondAttribute const):
* svg/properties/SVGAttributeOwnerProxy.h: Copied from Source/WebCore/svg/SVGValue.h.
(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy):
(WebCore::SVGAttributeOwnerProxy::element const):
* svg/properties/SVGAttributeOwnerProxyImpl.h: Added.
(WebCore::SVGAttributeOwnerProxyImpl::SVGAttributeOwnerProxyImpl):
(WebCore::SVGAttributeOwnerProxyImpl::attributeRegistry):
(WebCore::SVGAttributeOwnerProxyImpl::isKnownAttribute):
(WebCore::SVGAttributeOwnerProxyImpl::isAnimatedLengthAttribute):
* svg/properties/SVGAttributeRegistry.h: Added.
(WebCore::SVGAttributeRegistry::registerAttribute):
(WebCore::SVGAttributeRegistry::isEmpty const):
(WebCore::SVGAttributeRegistry::isKnownAttribute const):
(WebCore::SVGAttributeRegistry::isAnimatedLengthAttribute const):
(WebCore::SVGAttributeRegistry::animatedTypes const):
(WebCore::SVGAttributeRegistry::synchronizeAttributes const):
(WebCore::SVGAttributeRegistry::synchronizeAttribute const):
(WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperty const):
(WebCore::SVGAttributeRegistry::lookupAnimatedProperty const):
(WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperties const):
(WebCore::SVGAttributeRegistry::animatedTypesBaseTypes):
(WebCore::SVGAttributeRegistry::synchronizeAttributesBaseTypes):
(WebCore::SVGAttributeRegistry::synchronizeAttributeBaseTypes):
(WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertyBaseTypes):
(WebCore::SVGAttributeRegistry::lookupAnimatedPropertyBaseTypes):
(WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertiesBaseTypes):
(WebCore::SVGAttributeRegistry::findAttributeAccessor const):
* svg/properties/SVGAttributeToPropertyMap.cpp: Removed.
* svg/properties/SVGAttributeToPropertyMap.h: Removed.
* svg/properties/SVGPropertyInfo.cpp: Removed.
* svg/properties/SVGPropertyInfo.h: Removed.

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

176 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/svg/RenderSVGResourceMarker.cpp
Source/WebCore/svg/SVGAElement.cpp
Source/WebCore/svg/SVGAElement.h
Source/WebCore/svg/SVGAElement.idl
Source/WebCore/svg/SVGAltGlyphElement.cpp
Source/WebCore/svg/SVGAltGlyphElement.h
Source/WebCore/svg/SVGAnimatedAngle.h
Source/WebCore/svg/SVGAnimatedBoolean.h
Source/WebCore/svg/SVGAnimatedEnumeration.h
Source/WebCore/svg/SVGAnimatedInteger.h
Source/WebCore/svg/SVGAnimatedLength.h
Source/WebCore/svg/SVGAnimatedLengthList.h
Source/WebCore/svg/SVGAnimatedNumber.h
Source/WebCore/svg/SVGAnimatedNumberList.h
Source/WebCore/svg/SVGAnimatedPath.h
Source/WebCore/svg/SVGAnimatedPointList.h
Source/WebCore/svg/SVGAnimatedPreserveAspectRatio.h
Source/WebCore/svg/SVGAnimatedRect.h
Source/WebCore/svg/SVGAnimatedString.h
Source/WebCore/svg/SVGAnimatedTransformList.h
Source/WebCore/svg/SVGAnimatedTypeAnimator.cpp
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGAnimationElement.h
Source/WebCore/svg/SVGCircleElement.cpp
Source/WebCore/svg/SVGCircleElement.h
Source/WebCore/svg/SVGClipPathElement.cpp
Source/WebCore/svg/SVGClipPathElement.h
Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp
Source/WebCore/svg/SVGComponentTransferFunctionElement.h
Source/WebCore/svg/SVGCursorElement.cpp
Source/WebCore/svg/SVGCursorElement.h
Source/WebCore/svg/SVGDefsElement.cpp
Source/WebCore/svg/SVGDefsElement.h
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGEllipseElement.cpp
Source/WebCore/svg/SVGEllipseElement.h
Source/WebCore/svg/SVGExternalResourcesRequired.cpp
Source/WebCore/svg/SVGExternalResourcesRequired.h
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/SVGFEImageElement.cpp
Source/WebCore/svg/SVGFEImageElement.h
Source/WebCore/svg/SVGFELightElement.cpp
Source/WebCore/svg/SVGFELightElement.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/SVGFETurbulenceElement.cpp
Source/WebCore/svg/SVGFETurbulenceElement.h
Source/WebCore/svg/SVGFilterElement.cpp
Source/WebCore/svg/SVGFilterElement.h
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.cpp
Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
Source/WebCore/svg/SVGFitToViewBox.cpp
Source/WebCore/svg/SVGFitToViewBox.h
Source/WebCore/svg/SVGFontElement.cpp
Source/WebCore/svg/SVGFontElement.h
Source/WebCore/svg/SVGForeignObjectElement.cpp
Source/WebCore/svg/SVGForeignObjectElement.h
Source/WebCore/svg/SVGGElement.cpp
Source/WebCore/svg/SVGGElement.h
Source/WebCore/svg/SVGGeometryElement.cpp
Source/WebCore/svg/SVGGeometryElement.h
Source/WebCore/svg/SVGGlyphRefElement.cpp
Source/WebCore/svg/SVGGlyphRefElement.h
Source/WebCore/svg/SVGGradientElement.cpp
Source/WebCore/svg/SVGGradientElement.h
Source/WebCore/svg/SVGGraphicsElement.cpp
Source/WebCore/svg/SVGGraphicsElement.h
Source/WebCore/svg/SVGImageElement.cpp
Source/WebCore/svg/SVGImageElement.h
Source/WebCore/svg/SVGImageLoader.cpp
Source/WebCore/svg/SVGLangSpace.cpp
Source/WebCore/svg/SVGLangSpace.h
Source/WebCore/svg/SVGLineElement.cpp
Source/WebCore/svg/SVGLineElement.h
Source/WebCore/svg/SVGLinearGradientElement.cpp
Source/WebCore/svg/SVGLinearGradientElement.h
Source/WebCore/svg/SVGMPathElement.cpp
Source/WebCore/svg/SVGMPathElement.h
Source/WebCore/svg/SVGMarkerElement.cpp
Source/WebCore/svg/SVGMarkerElement.h
Source/WebCore/svg/SVGMaskElement.cpp
Source/WebCore/svg/SVGMaskElement.h
Source/WebCore/svg/SVGPathElement.cpp
Source/WebCore/svg/SVGPathElement.h
Source/WebCore/svg/SVGPathSegListValues.h
Source/WebCore/svg/SVGPathSegWithContext.h
Source/WebCore/svg/SVGPatternElement.cpp
Source/WebCore/svg/SVGPatternElement.h
Source/WebCore/svg/SVGPointListValues.h
Source/WebCore/svg/SVGPolyElement.cpp
Source/WebCore/svg/SVGPolyElement.h
Source/WebCore/svg/SVGPreserveAspectRatioValue.cpp
Source/WebCore/svg/SVGPreserveAspectRatioValue.h
Source/WebCore/svg/SVGRadialGradientElement.cpp
Source/WebCore/svg/SVGRadialGradientElement.h
Source/WebCore/svg/SVGRectElement.cpp
Source/WebCore/svg/SVGRectElement.h
Source/WebCore/svg/SVGSVGElement.cpp
Source/WebCore/svg/SVGSVGElement.h
Source/WebCore/svg/SVGScriptElement.cpp
Source/WebCore/svg/SVGScriptElement.h
Source/WebCore/svg/SVGStopElement.cpp
Source/WebCore/svg/SVGStopElement.h
Source/WebCore/svg/SVGStringListValues.h
Source/WebCore/svg/SVGSwitchElement.cpp
Source/WebCore/svg/SVGSwitchElement.h
Source/WebCore/svg/SVGSymbolElement.cpp
Source/WebCore/svg/SVGSymbolElement.h
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/svg/SVGTRefElement.h
Source/WebCore/svg/SVGTests.cpp
Source/WebCore/svg/SVGTests.h
Source/WebCore/svg/SVGTextContentElement.cpp
Source/WebCore/svg/SVGTextContentElement.h
Source/WebCore/svg/SVGTextPathElement.cpp
Source/WebCore/svg/SVGTextPathElement.h
Source/WebCore/svg/SVGTextPositioningElement.cpp
Source/WebCore/svg/SVGTextPositioningElement.h
Source/WebCore/svg/SVGURIReference.cpp
Source/WebCore/svg/SVGURIReference.h
Source/WebCore/svg/SVGUseElement.cpp
Source/WebCore/svg/SVGUseElement.h
Source/WebCore/svg/SVGValue.h
Source/WebCore/svg/SVGViewElement.cpp
Source/WebCore/svg/SVGViewElement.h
Source/WebCore/svg/SVGViewSpec.cpp
Source/WebCore/svg/SVGViewSpec.h
Source/WebCore/svg/SVGViewSpec.idl
Source/WebCore/svg/SVGZoomAndPan.cpp
Source/WebCore/svg/SVGZoomAndPan.h
Source/WebCore/svg/SVGZoomAndPanType.h [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAnimatedEnumerationPropertyTearOff.h
Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAnimatedPathSegListPropertyTearOff.h
Source/WebCore/svg/properties/SVGAnimatedProperty.cpp
Source/WebCore/svg/properties/SVGAnimatedProperty.h
Source/WebCore/svg/properties/SVGAnimatedPropertyMacros.h [deleted file]
Source/WebCore/svg/properties/SVGAnimatedPropertyType.h [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAttribute.h [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAttributeAccessor.h [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAttributeOwnerProxyImpl.h [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAttributeRegistry.h [new file with mode: 0644]
Source/WebCore/svg/properties/SVGAttributeToPropertyMap.cpp [deleted file]
Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h [deleted file]
Source/WebCore/svg/properties/SVGPropertyInfo.cpp [deleted file]
Source/WebCore/svg/properties/SVGPropertyInfo.h [deleted file]

index fd8a1a5..dd29f46 100644 (file)
@@ -1,3 +1,852 @@
+2018-08-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        Remove the SVG elements' attributes macros
+        https://bugs.webkit.org/show_bug.cgi?id=186751
+
+        Reviewed by Simon Fraser.
+
+        This is how the SVG attributes are implemented after removing the SVG macros:
+
+        1) The SVG attribute is defined as a super class of SVGAttribute. The super
+           classes of SVGAttribute are template classes. The type of these template
+           are the property type or the TearOff type.
+
+        2) To unify accessing attributes of the SVGElements and its super classes
+           an SVGAttributeAccessor template class is added. It is inherited by other
+           template classes. The types of these templates are the owner and the
+           attributes types. The main functions of these classes is to synchronize 
+           the new property value with the document attributes pool and to create
+           and cache the TearOff objects.
+
+        3) To make code shorter and more readable, attribute types and attribute
+           accessors are defined for every SVG TearOff type, e.g. 
+           -- SVGLength: 
+                SVGAnimatedLengthAttribute and SVGAnimatedLengthAttributeAccessor
+           -- SVGAnimatedNumber: 
+                SVGAnimatedNumberAttribute and SVGAnimatedNumberAttributeAccessor
+
+        4) A special accessor is defined for animated pair and optional attributes:
+           SVGAnimatedPairAttributeAccessor, e.g.
+           -- SVGMarkerElement:
+                orient attribute: "angle" or "type"
+           -- SVGFEGaussianBlurElement:
+                stdDeviation attribute: "x" and "y"
+
+        5) The SVG attributes have to be registered into an singleton SVGAttributeRegistry.
+           The SVGAttributeRegistry is a template class. The types of this template
+           class are the the type of the owner and the base classes of this owner.
+           This registry holds a map from "attribute name" to  "attribute accessor".
+
+        6) To make the code easier to read, the SVGAttributeRegistry implements
+           registerAttribute() for different attribute types. The owner needs only
+           to provide the attribute name and a pointer to the class member of this
+           attribute to the same function "registerAttribute()". The compiler will
+           pick the right function to call based on the type of the attribute.
+
+        7) Given a reference to the owner element, SVGAttributeRegistry can loop
+           through the attributes of this owner and through the attributes of its
+           base classes as well to do operations like synchronizing all the attributes
+           or creating the TearOff object of a certain attribute.
+
+        8) To make the base class SVGElement have the ability to access the attributes
+           of any of its super classes, SVGAttributeOwnerProxy will be used.
+           SVGAttributeOwnerProxy is a base class which have all the functions that
+           SVGElement needs as pure virtual functions.
+
+        9) SVGAttributeOwnerProxyImpl is a template class which implements 
+           SVGAttributeOwnerProxy and whose types are the owner and its base classes.
+           SVGAttributeOwnerProxyImpl keeps a reference to the owner and the context
+           SVGElement.
+
+        10) All the SVG attribute owners have to implement the virtual function
+            attributeOwnerProxy() which returns a reference to SVGAttributeOwnerProxy.
+            The local attributeOwnerProxy() returns a reference to a local
+            SVGAttributeOwnerProxyImpl. Its type and base types are the class
+            hierarchy of this element.
+
+        All the attributes of the non-SVGElement-based classes are moved as members
+        of these classes instead of adding them to all the super classes. These
+        classes are:
+           -- SVGExternalResourcesRequired
+           -- SVGURIReference
+           -- SVGFitToViewBox
+           -- SVGZoomAndPan
+           -- SVGLangSpace
+
+        The svgAttributeChanged() of all the SVGElement-based classes are now 
+        simplified by distributing the responsibilities of changing an attribute
+        to the base classes. One exception is the SVGURIReference since the action
+        to be taken when changing the "href" is different for every super class.
+
+        Other work will be done in separate patches.
+           -- Shrinking the memory of the SVGElements.
+           -- Making all the attributes RefCounted objects.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/svg/RenderSVGResourceMarker.cpp:
+        (WebCore::RenderSVGResourceMarker::draw):
+        * svg/SVGAElement.cpp:
+        (WebCore::SVGAElement::SVGAElement):
+        (WebCore::SVGAElement::registerAttributes):
+        (WebCore::SVGAElement::parseAttribute):
+        (WebCore::SVGAElement::svgAttributeChanged):
+        * svg/SVGAElement.h:
+        * svg/SVGAElement.idl:
+        * svg/SVGAltGlyphElement.cpp:
+        (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
+        * svg/SVGAltGlyphElement.h:
+        * svg/SVGAnimatedAngle.h:
+        * svg/SVGAnimatedBoolean.h:
+        * svg/SVGAnimatedEnumeration.h:
+        * svg/SVGAnimatedInteger.h:
+        * svg/SVGAnimatedLength.h:
+        * svg/SVGAnimatedLengthList.h:
+        * svg/SVGAnimatedNumber.h:
+        * svg/SVGAnimatedNumberList.h:
+        * svg/SVGAnimatedPath.h:
+        * svg/SVGAnimatedPointList.h:
+        * svg/SVGAnimatedPreserveAspectRatio.h:
+        * svg/SVGAnimatedRect.h:
+        * svg/SVGAnimatedString.h:
+        * svg/SVGAnimatedTransformList.h:
+        * svg/SVGAnimatedTypeAnimator.cpp:
+        (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::SVGAnimationElement):
+        (WebCore::SVGAnimationElement::requiredFeatures): Deleted.
+        (WebCore::SVGAnimationElement::requiredExtensions): Deleted.
+        (WebCore::SVGAnimationElement::systemLanguage): Deleted.
+        * svg/SVGAnimationElement.h:
+        (WebCore::SVGAnimationElement::attributeRegistry):
+        * svg/SVGCircleElement.cpp:
+        (WebCore::SVGCircleElement::SVGCircleElement):
+        (WebCore::SVGCircleElement::registerAttributes):
+        (WebCore::SVGCircleElement::parseAttribute):
+        (WebCore::SVGCircleElement::svgAttributeChanged):
+        * svg/SVGCircleElement.h:
+        * svg/SVGClipPathElement.cpp:
+        (WebCore::SVGClipPathElement::SVGClipPathElement):
+        (WebCore::SVGClipPathElement::registerAttributes):
+        (WebCore::SVGClipPathElement::parseAttribute):
+        (WebCore::SVGClipPathElement::svgAttributeChanged):
+        (WebCore::SVGClipPathElement::isSupportedAttribute): Deleted.
+        * svg/SVGClipPathElement.h:
+        * svg/SVGComponentTransferFunctionElement.cpp:
+        (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
+        (WebCore::SVGComponentTransferFunctionElement::registerAttributes):
+        (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
+        (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
+        (WebCore::SVGComponentTransferFunctionElement::transferFunction const):
+        (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute): Deleted.
+        * svg/SVGComponentTransferFunctionElement.h:
+        (WebCore::SVGComponentTransferFunctionElement::type const):
+        (WebCore::SVGComponentTransferFunctionElement::tableValues const):
+        (WebCore::SVGComponentTransferFunctionElement::slope const):
+        (WebCore::SVGComponentTransferFunctionElement::intercept const):
+        (WebCore::SVGComponentTransferFunctionElement::amplitude const):
+        (WebCore::SVGComponentTransferFunctionElement::exponent const):
+        (WebCore::SVGComponentTransferFunctionElement::offset const):
+        (WebCore::SVGComponentTransferFunctionElement::typeAnimated):
+        (WebCore::SVGComponentTransferFunctionElement::tableValuesAnimated):
+        (WebCore::SVGComponentTransferFunctionElement::slopeAnimated):
+        (WebCore::SVGComponentTransferFunctionElement::interceptAnimated):
+        (WebCore::SVGComponentTransferFunctionElement::amplitudeAnimated):
+        (WebCore::SVGComponentTransferFunctionElement::exponentAnimated):
+        (WebCore::SVGComponentTransferFunctionElement::offsetAnimated):
+        (WebCore::SVGComponentTransferFunctionElement::attributeRegistry):
+        (WebCore::SVGComponentTransferFunctionElement::isKnownAttribute):
+        * svg/SVGCursorElement.cpp:
+        (WebCore::SVGCursorElement::SVGCursorElement):
+        (WebCore::SVGCursorElement::registerAttributes):
+        (WebCore::SVGCursorElement::parseAttribute):
+        (WebCore::SVGCursorElement::svgAttributeChanged):
+        (WebCore::SVGCursorElement::isSupportedAttribute): Deleted.
+        (WebCore::SVGCursorElement::requiredFeatures): Deleted.
+        (WebCore::SVGCursorElement::requiredExtensions): Deleted.
+        (WebCore::SVGCursorElement::systemLanguage): Deleted.
+        * svg/SVGCursorElement.h:
+        * svg/SVGDefsElement.cpp:
+        (WebCore::SVGDefsElement::SVGDefsElement):
+        * svg/SVGDefsElement.h:
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::SVGElement):
+        (WebCore::SVGElement::registerAttributes):
+        (WebCore::SVGElement::parseAttribute):
+        (WebCore::SVGElement::animatedPropertyTypesForAttribute):
+        (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
+        (WebCore::SVGElement::synchronizeAnimatedSVGAttribute const):
+        (WebCore::SVGElement::isPresentationAttributeWithSVGDOM):
+        (WebCore::SVGElement::svgAttributeChanged):
+        (WebCore::SVGElement::synchronizeRequiredFeatures): Deleted.
+        (WebCore::SVGElement::synchronizeRequiredExtensions): Deleted.
+        (WebCore::SVGElement::synchronizeSystemLanguage): Deleted.
+        (WebCore::SVGElement::isKnownAttribute): Deleted.
+        * svg/SVGElement.h:
+        (WebCore::SVGElement::attributeRegistry):
+        (WebCore::SVGElement::isKnownAttribute):
+        (WebCore::SVGElement::attributeOwnerProxy const):
+        (WebCore::SVGElement::synchronizeAttribute):
+        (WebCore::SVGElement::synchronizeAttributes):
+        (WebCore::SVGElement::animatedTypes const):
+        (WebCore::SVGElement::lookupAnimatedProperty const):
+        (WebCore::SVGElement::lookupOrCreateAnimatedProperty):
+        (WebCore::SVGElement::lookupOrCreateAnimatedProperties):
+        (WebCore::SVGElement::className const):
+        (WebCore::SVGElement::classNameAnimated):
+        (WebCore::SVGElement::synchronizeRequiredFeatures): Deleted.
+        (WebCore::SVGElement::synchronizeRequiredExtensions): Deleted.
+        (WebCore::SVGElement::synchronizeSystemLanguage): Deleted.
+        * svg/SVGEllipseElement.cpp:
+        (WebCore::SVGEllipseElement::SVGEllipseElement):
+        (WebCore::SVGEllipseElement::registerAttributes):
+        (WebCore::SVGEllipseElement::parseAttribute):
+        (WebCore::SVGEllipseElement::svgAttributeChanged):
+        * svg/SVGEllipseElement.h:
+        * svg/SVGExternalResourcesRequired.cpp:
+        (WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
+        (WebCore::SVGExternalResourcesRequired::registerAttributes):
+        (WebCore::SVGExternalResourcesRequired::parseAttribute):
+        (WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
+        (WebCore::SVGExternalResourcesRequired::addSupportedAttributes):
+        (WebCore::SVGExternalResourcesRequired::dispatchLoadEvent):
+        (WebCore::SVGExternalResourcesRequired::insertedIntoDocument):
+        (WebCore::SVGExternalResourcesRequired::finishParsingChildren):
+        (WebCore::SVGExternalResourcesRequired::haveLoadedRequiredResources const):
+        (WebCore::SVGExternalResourcesRequired::isKnownAttribute): Deleted.
+        (WebCore::SVGExternalResourcesRequired::handleAttributeChange): Deleted.
+        * svg/SVGExternalResourcesRequired.h:
+        (WebCore::SVGExternalResourcesRequired::attributeRegistry):
+        (WebCore::SVGExternalResourcesRequired::externalResourcesRequiredAnimated):
+        (WebCore::SVGExternalResourcesRequired::externalResourcesRequired const):
+        (WebCore::SVGExternalResourcesRequired::setExternalResourcesRequired):
+        (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
+        (WebCore::SVGExternalResourcesRequired::attributeOwnerProxy):
+        * 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::registerAttributes):
+        (WebCore::SVGFEComponentTransferElement::parseAttribute):
+        * 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):
+        (WebCore::SVGFEConvolveMatrixElement::setFilterEffectAttribute):
+        (WebCore::SVGFEConvolveMatrixElement::setOrder):
+        (WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
+        * svg/SVGFEConvolveMatrixElement.h:
+        (WebCore::SVGPropertyTraits<EdgeModeType>::initialValue):
+        * svg/SVGFEDiffuseLightingElement.cpp:
+        (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
+        (WebCore::SVGFEDiffuseLightingElement::registerAttributes):
+        (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
+        * 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::setStdDeviation):
+        (WebCore::SVGFEDropShadowElement::registerAttributes):
+        (WebCore::SVGFEDropShadowElement::parseAttribute):
+        (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
+        * svg/SVGFEDropShadowElement.h:
+        * svg/SVGFEGaussianBlurElement.cpp:
+        (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
+        (WebCore::SVGFEGaussianBlurElement::setStdDeviation):
+        (WebCore::SVGFEGaussianBlurElement::registerAttributes):
+        (WebCore::SVGFEGaussianBlurElement::parseAttribute):
+        (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
+        * svg/SVGFEGaussianBlurElement.h:
+        * svg/SVGFEImageElement.cpp:
+        (WebCore::SVGFEImageElement::SVGFEImageElement):
+        (WebCore::SVGFEImageElement::registerAttributes):
+        (WebCore::SVGFEImageElement::parseAttribute):
+        * svg/SVGFEImageElement.h:
+        * svg/SVGFELightElement.cpp:
+        (WebCore::SVGFELightElement::SVGFELightElement):
+        (WebCore::SVGFELightElement::registerAttributes):
+        (WebCore::SVGFELightElement::parseAttribute):
+        (WebCore::SVGFELightElement::svgAttributeChanged):
+        * svg/SVGFELightElement.h:
+        (WebCore::SVGFELightElement::azimuth const):
+        (WebCore::SVGFELightElement::elevation const):
+        (WebCore::SVGFELightElement::x const):
+        (WebCore::SVGFELightElement::y const):
+        (WebCore::SVGFELightElement::z const):
+        (WebCore::SVGFELightElement::pointsAtX const):
+        (WebCore::SVGFELightElement::pointsAtY const):
+        (WebCore::SVGFELightElement::pointsAtZ const):
+        (WebCore::SVGFELightElement::specularExponent const):
+        (WebCore::SVGFELightElement::limitingConeAngle const):
+        (WebCore::SVGFELightElement::azimuthAnimated):
+        (WebCore::SVGFELightElement::elevationAnimated):
+        (WebCore::SVGFELightElement::xAnimated):
+        (WebCore::SVGFELightElement::yAnimated):
+        (WebCore::SVGFELightElement::zAnimated):
+        (WebCore::SVGFELightElement::pointsAtXAnimated):
+        (WebCore::SVGFELightElement::pointsAtYAnimated):
+        (WebCore::SVGFELightElement::pointsAtZAnimated):
+        (WebCore::SVGFELightElement::specularExponentAnimated):
+        (WebCore::SVGFELightElement::limitingConeAngleAnimated):
+        (WebCore::SVGFELightElement::attributeRegistry):
+        (WebCore::SVGFELightElement::isKnownAttribute):
+        * svg/SVGFEMergeNodeElement.cpp:
+        (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
+        (WebCore::SVGFEMergeNodeElement::registerAttributes):
+        (WebCore::SVGFEMergeNodeElement::parseAttribute):
+        * svg/SVGFEMergeNodeElement.h:
+        * svg/SVGFEMorphologyElement.cpp:
+        (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
+        (WebCore::SVGFEMorphologyElement::setRadius):
+        (WebCore::SVGFEMorphologyElement::registerAttributes):
+        (WebCore::SVGFEMorphologyElement::parseAttribute):
+        * svg/SVGFEMorphologyElement.h:
+        * svg/SVGFEOffsetElement.cpp:
+        (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
+        (WebCore::SVGFEOffsetElement::registerAttributes):
+        (WebCore::SVGFEOffsetElement::parseAttribute):
+        (WebCore::SVGFEOffsetElement::svgAttributeChanged):
+        * svg/SVGFEOffsetElement.h:
+        * svg/SVGFESpecularLightingElement.cpp:
+        (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
+        (WebCore::SVGFESpecularLightingElement::registerAttributes):
+        (WebCore::SVGFESpecularLightingElement::parseAttribute):
+        * svg/SVGFESpecularLightingElement.h:
+        * svg/SVGFETileElement.cpp:
+        (WebCore::SVGFETileElement::SVGFETileElement):
+        (WebCore::SVGFETileElement::registerAttributes):
+        (WebCore::SVGFETileElement::parseAttribute):
+        * svg/SVGFETileElement.h:
+        * svg/SVGFETurbulenceElement.cpp:
+        (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
+        (WebCore::SVGFETurbulenceElement::registerAttributes):
+        (WebCore::SVGFETurbulenceElement::parseAttribute):
+        (WebCore::SVGFETurbulenceElement::setFilterEffectAttribute):
+        (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
+        * svg/SVGFETurbulenceElement.h:
+        * svg/SVGFilterElement.cpp:
+        (WebCore::SVGFilterElement::SVGFilterElement):
+        (WebCore::SVGFilterElement::setFilterRes):
+        (WebCore::SVGFilterElement::registerAttributes):
+        (WebCore::SVGFilterElement::parseAttribute):
+        (WebCore::SVGFilterElement::svgAttributeChanged):
+        (WebCore::SVGFilterElement::isSupportedAttribute): Deleted.
+        * svg/SVGFilterElement.h:
+        * svg/SVGFilterPrimitiveStandardAttributes.cpp:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute): Deleted.
+        * svg/SVGFilterPrimitiveStandardAttributes.h:
+        (WebCore::SVGFilterPrimitiveStandardAttributes::attributeRegistry):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::x const):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::y const):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::width const):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::height const):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::result const):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::xAnimated):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::yAnimated):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::widthAnimated):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::heightAnimated):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::resultAnimated):
+        (WebCore::SVGFilterPrimitiveStandardAttributes::isKnownAttribute):
+        * svg/SVGFitToViewBox.cpp:
+        (WebCore::SVGFitToViewBox::SVGFitToViewBox):
+        (WebCore::SVGFitToViewBox::registerAttributes):
+        (WebCore::SVGFitToViewBox::setViewBox):
+        (WebCore::SVGFitToViewBox::resetViewBox):
+        (WebCore::SVGFitToViewBox::reset):
+        (WebCore::SVGFitToViewBox::parseAttribute):
+        (WebCore::SVGFitToViewBox::parseViewBox):
+        (WebCore::SVGFitToViewBox::isKnownAttribute): Deleted.
+        (WebCore::SVGFitToViewBox::addSupportedAttributes): Deleted.
+        * svg/SVGFitToViewBox.h:
+        (WebCore::SVGFitToViewBox::attributeRegistry):
+        (WebCore::SVGFitToViewBox::viewBox const):
+        (WebCore::SVGFitToViewBox::preserveAspectRatio const):
+        (WebCore::SVGFitToViewBox::viewBoxAnimated):
+        (WebCore::SVGFitToViewBox::preserveAspectRatioAnimated):
+        (WebCore::SVGFitToViewBox::setPreserveAspectRatio):
+        (WebCore::SVGFitToViewBox::resetPreserveAspectRatio):
+        (WebCore::SVGFitToViewBox::viewBoxString const):
+        (WebCore::SVGFitToViewBox::preserveAspectRatioString const):
+        (WebCore::SVGFitToViewBox::hasValidViewBox const):
+        (WebCore::SVGFitToViewBox::hasEmptyViewBox const):
+        (WebCore::SVGFitToViewBox::isKnownAttribute):
+        (WebCore::SVGFitToViewBox::parseAttribute): Deleted.
+        * svg/SVGFontElement.cpp:
+        (WebCore::SVGFontElement::SVGFontElement):
+        * svg/SVGFontElement.h:
+        * svg/SVGForeignObjectElement.cpp:
+        (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
+        (WebCore::SVGForeignObjectElement::registerAttributes):
+        (WebCore::SVGForeignObjectElement::parseAttribute):
+        (WebCore::SVGForeignObjectElement::svgAttributeChanged):
+        (WebCore::SVGForeignObjectElement::isSupportedAttribute): Deleted.
+        * svg/SVGForeignObjectElement.h:
+        * svg/SVGGElement.cpp:
+        (WebCore::SVGGElement::SVGGElement):
+        (WebCore::SVGGElement::svgAttributeChanged):
+        (WebCore::SVGGElement::isSupportedAttribute): Deleted.
+        * svg/SVGGElement.h:
+        * svg/SVGGeometryElement.cpp:
+        (WebCore::SVGGeometryElement::SVGGeometryElement):
+        (WebCore::SVGGeometryElement::registerAttributes):
+        (WebCore::SVGGeometryElement::parseAttribute):
+        (WebCore::SVGGeometryElement::svgAttributeChanged):
+        (WebCore::SVGGeometryElement::isSupportedAttribute): Deleted.
+        * svg/SVGGeometryElement.h:
+        (WebCore::SVGGeometryElement::attributeRegistry):
+        (WebCore::SVGGeometryElement::pathLengthAnimated):
+        (WebCore::SVGGeometryElement::isKnownAttribute):
+        * svg/SVGGlyphRefElement.cpp:
+        (WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
+        * svg/SVGGlyphRefElement.h:
+        * svg/SVGGradientElement.cpp:
+        (WebCore::SVGGradientElement::SVGGradientElement):
+        (WebCore::SVGGradientElement::registerAttributes):
+        (WebCore::SVGGradientElement::parseAttribute):
+        (WebCore::SVGGradientElement::svgAttributeChanged):
+        (WebCore::SVGGradientElement::isSupportedAttribute): Deleted.
+        * svg/SVGGradientElement.h:
+        (WebCore::SVGGradientElement::attributeRegistry):
+        (WebCore::SVGGradientElement::spreadMethod const):
+        (WebCore::SVGGradientElement::gradientUnits const):
+        (WebCore::SVGGradientElement::gradientTransform const):
+        (WebCore::SVGGradientElement::spreadMethodAnimated):
+        (WebCore::SVGGradientElement::gradientUnitsAnimated):
+        (WebCore::SVGGradientElement::gradientTransformAnimated):
+        (WebCore::SVGGradientElement::isKnownAttribute):
+        * svg/SVGGraphicsElement.cpp:
+        (WebCore::SVGGraphicsElement::SVGGraphicsElement):
+        (WebCore::SVGGraphicsElement::registerAttributes):
+        (WebCore::SVGGraphicsElement::parseAttribute):
+        (WebCore::SVGGraphicsElement::svgAttributeChanged):
+        (WebCore::SVGGraphicsElement::isSupportedAttribute): Deleted.
+        (WebCore::SVGGraphicsElement::requiredFeatures): Deleted.
+        (WebCore::SVGGraphicsElement::requiredExtensions): Deleted.
+        (WebCore::SVGGraphicsElement::systemLanguage): Deleted.
+        * svg/SVGGraphicsElement.h:
+        (WebCore::SVGGraphicsElement::attributeRegistry):
+        (WebCore::SVGGraphicsElement::transform const):
+        (WebCore::SVGGraphicsElement::transformAnimated):
+        (WebCore::SVGGraphicsElement::isKnownAttribute):
+        * svg/SVGImageElement.cpp:
+        (WebCore::SVGImageElement::SVGImageElement):
+        (WebCore::SVGImageElement::registerAttributes):
+        (WebCore::SVGImageElement::parseAttribute):
+        (WebCore::SVGImageElement::svgAttributeChanged):
+        (WebCore::SVGImageElement::haveLoadedRequiredResources):
+        (WebCore::SVGImageElement::isSupportedAttribute): Deleted.
+        * svg/SVGImageElement.h:
+        * svg/SVGImageLoader.cpp:
+        (WebCore::SVGImageLoader::dispatchLoadEvent):
+        * svg/SVGLangSpace.cpp:
+        (WebCore::SVGLangSpace::SVGLangSpace):
+        (WebCore::SVGLangSpace::registerAttributes):
+        (WebCore::SVGLangSpace::xmlspace const):
+        (WebCore::SVGLangSpace::svgAttributeChanged):
+        (WebCore::SVGLangSpace::setXmllang): Deleted.
+        (WebCore::SVGLangSpace::setXmlspace): Deleted.
+        (WebCore::SVGLangSpace::isKnownAttribute): Deleted.
+        (WebCore::addWithAndWithoutXMLPrefix): Deleted.
+        (WebCore::SVGLangSpace::addSupportedAttributes): Deleted.
+        * svg/SVGLangSpace.h:
+        (WebCore::SVGLangSpace::xmllang const):
+        (WebCore::SVGLangSpace::setXmllang):
+        (WebCore::SVGLangSpace::setXmlspace):
+        (WebCore::SVGLangSpace::attributeRegistry):
+        (WebCore::SVGLangSpace::isKnownAttribute):
+        * svg/SVGLineElement.cpp:
+        (WebCore::SVGLineElement::SVGLineElement):
+        (WebCore::SVGLineElement::registerAttributes):
+        (WebCore::SVGLineElement::parseAttribute):
+        (WebCore::SVGLineElement::svgAttributeChanged):
+        (WebCore::SVGLineElement::isSupportedAttribute): Deleted.
+        * svg/SVGLineElement.h:
+        * svg/SVGLinearGradientElement.cpp:
+        (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
+        (WebCore::SVGLinearGradientElement::registerAttributes):
+        (WebCore::SVGLinearGradientElement::parseAttribute):
+        (WebCore::SVGLinearGradientElement::svgAttributeChanged):
+        (WebCore::SVGLinearGradientElement::isSupportedAttribute): Deleted.
+        * svg/SVGLinearGradientElement.h:
+        * svg/SVGMPathElement.cpp:
+        (WebCore::SVGMPathElement::SVGMPathElement):
+        (WebCore::SVGMPathElement::svgAttributeChanged):
+        * svg/SVGMPathElement.h:
+        * svg/SVGMarkerElement.cpp:
+        (WebCore::SVGMarkerElement::SVGMarkerElement):
+        (WebCore::SVGMarkerElement::registerAttributes):
+        (WebCore::SVGMarkerElement::parseAttribute):
+        (WebCore::SVGMarkerElement::svgAttributeChanged):
+        (WebCore::SVGMarkerElement::setOrient):
+        (WebCore::SVGMarkerElement::orientTypePropertyInfo): Deleted.
+        (WebCore::SVGMarkerElement::isSupportedAttribute): Deleted.
+        (WebCore::SVGMarkerElement::synchronizeOrientType): Deleted.
+        (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper): Deleted.
+        (WebCore::SVGMarkerElement::orientType const): Deleted.
+        (WebCore::SVGMarkerElement::orientTypeAnimated): Deleted.
+        * svg/SVGMarkerElement.h:
+        * svg/SVGMaskElement.cpp:
+        (WebCore::SVGMaskElement::SVGMaskElement):
+        (WebCore::SVGMaskElement::registerAttributes):
+        (WebCore::SVGMaskElement::parseAttribute):
+        (WebCore::SVGMaskElement::svgAttributeChanged):
+        (WebCore::SVGMaskElement::isSupportedAttribute): Deleted.
+        (WebCore::SVGMaskElement::requiredFeatures): Deleted.
+        (WebCore::SVGMaskElement::requiredExtensions): Deleted.
+        (WebCore::SVGMaskElement::systemLanguage): Deleted.
+        * svg/SVGMaskElement.h:
+        * svg/SVGPathElement.cpp:
+        (WebCore::SVGPathElement::SVGPathElement):
+        (WebCore::SVGPathElement::registerAttributes):
+        (WebCore::SVGPathElement::parseAttribute):
+        (WebCore::SVGPathElement::svgAttributeChanged):
+        (WebCore::SVGPathElement::pathByteStream const):
+        (WebCore::SVGPathElement::lookupOrCreateDWrapper):
+        (WebCore::SVGPathElement::animatedPropertyWillBeDeleted):
+        (WebCore::SVGPathElement::pathSegList):
+        (WebCore::SVGPathElement::animatedPathSegList):
+        (WebCore::SVGPathElement::pathSegListChanged):
+        (WebCore::SVGPathElement::dPropertyInfo): Deleted.
+        (WebCore::SVGPathElement::isSupportedAttribute): Deleted.
+        (WebCore::SVGPathElement::synchronizeD): Deleted.
+        * svg/SVGPathElement.h:
+        * svg/SVGPathSegListValues.h:
+        (WebCore::SVGPropertyTraits<SVGPathSegListValues>::toString):
+        * svg/SVGPathSegWithContext.h:
+        (WebCore::SVGPathSegWithContext::animatedProperty const):
+        * svg/SVGPatternElement.cpp:
+        (WebCore::SVGPatternElement::SVGPatternElement):
+        (WebCore::SVGPatternElement::registerAttributes):
+        (WebCore::SVGPatternElement::parseAttribute):
+        (WebCore::SVGPatternElement::svgAttributeChanged):
+        (WebCore::SVGPatternElement::collectPatternAttributes const):
+        (WebCore::SVGPatternElement::isSupportedAttribute): Deleted.
+        (WebCore::SVGPatternElement::requiredFeatures): Deleted.
+        (WebCore::SVGPatternElement::requiredExtensions): Deleted.
+        (WebCore::SVGPatternElement::systemLanguage): Deleted.
+        * svg/SVGPatternElement.h:
+        * svg/SVGPointListValues.h:
+        (WebCore::SVGPropertyTraits<SVGPointListValues>::toString):
+        * svg/SVGPolyElement.cpp:
+        (WebCore::SVGPolyElement::SVGPolyElement):
+        (WebCore::SVGPolyElement::registerAttributes):
+        (WebCore::SVGPolyElement::parseAttribute):
+        (WebCore::SVGPolyElement::svgAttributeChanged):
+        (WebCore::SVGPolyElement::points):
+        (WebCore::SVGPolyElement::animatedPoints):
+        (WebCore::SVGPolyElement::pointsPropertyInfo): Deleted.
+        (WebCore::SVGPolyElement::synchronizePoints): Deleted.
+        (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper): Deleted.
+        * svg/SVGPolyElement.h:
+        (WebCore::SVGPolyElement::pointList const):
+        (WebCore::SVGPolyElement::attributeRegistry):
+        (WebCore::SVGPolyElement::isKnownAttribute):
+        * svg/SVGPreserveAspectRatioValue.cpp:
+        (WebCore::SVGPreserveAspectRatioValue::transformRect const):
+        (WebCore::SVGPreserveAspectRatioValue::transformRect): Deleted.
+        * svg/SVGPreserveAspectRatioValue.h:
+        * svg/SVGRadialGradientElement.cpp:
+        (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
+        (WebCore::SVGRadialGradientElement::registerAttributes):
+        (WebCore::SVGRadialGradientElement::parseAttribute):
+        (WebCore::SVGRadialGradientElement::svgAttributeChanged):
+        (WebCore::SVGRadialGradientElement::isSupportedAttribute): Deleted.
+        * svg/SVGRadialGradientElement.h:
+        * svg/SVGRectElement.cpp:
+        (WebCore::SVGRectElement::SVGRectElement):
+        (WebCore::SVGRectElement::registerAttributes):
+        (WebCore::SVGRectElement::parseAttribute):
+        (WebCore::SVGRectElement::svgAttributeChanged):
+        * svg/SVGRectElement.h:
+        * svg/SVGSVGElement.cpp:
+        (WebCore::SVGSVGElement::SVGSVGElement):
+        (WebCore::SVGSVGElement::registerAttributes):
+        (WebCore::SVGSVGElement::parseAttribute):
+        (WebCore::SVGSVGElement::svgAttributeChanged):
+        (WebCore::SVGSVGElement::viewBoxToViewTransform const):
+        (WebCore::SVGSVGElement::resetScrollAnchor):
+        (WebCore::SVGSVGElement::inheritViewAttributes):
+        * svg/SVGSVGElement.h:
+        (WebCore::SVGSVGElement::useCurrentView const): Deleted.
+        (WebCore::SVGSVGElement::currentTranslateValue): Deleted.
+        (WebCore::SVGSVGElement::zoomAndPan const): Deleted.
+        (WebCore::SVGSVGElement::setZoomAndPan): Deleted.
+        (WebCore::SVGSVGElement::timeContainer): Deleted.
+        (WebCore::SVGSVGElement::hasEmptyViewBox const): Deleted.
+        * svg/SVGScriptElement.cpp:
+        (WebCore::SVGScriptElement::SVGScriptElement):
+        (WebCore::SVGScriptElement::svgAttributeChanged):
+        (WebCore::SVGScriptElement::insertedIntoAncestor):
+        (WebCore::SVGScriptElement::addSubresourceAttributeURLs const):
+        (WebCore::SVGScriptElement::isURLAttribute const): Deleted.
+        (WebCore::SVGScriptElement::sourceAttributeValue const): Deleted.
+        (WebCore::SVGScriptElement::charsetAttributeValue const): Deleted.
+        (WebCore::SVGScriptElement::typeAttributeValue const): Deleted.
+        (WebCore::SVGScriptElement::languageAttributeValue const): Deleted.
+        (WebCore::SVGScriptElement::forAttributeValue const): Deleted.
+        (WebCore::SVGScriptElement::eventAttributeValue const): Deleted.
+        (WebCore::SVGScriptElement::hasAsyncAttribute const): Deleted.
+        (WebCore::SVGScriptElement::hasDeferAttribute const): Deleted.
+        (WebCore::SVGScriptElement::hasNoModuleAttribute const): Deleted.
+        (WebCore::SVGScriptElement::hasSourceAttribute const): Deleted.
+        (WebCore::SVGScriptElement::filterOutAnimatableAttribute const): Deleted.
+        * svg/SVGScriptElement.h:
+        * svg/SVGStopElement.cpp:
+        (WebCore::SVGStopElement::SVGStopElement):
+        (WebCore::SVGStopElement::registerAttributes):
+        (WebCore::SVGStopElement::parseAttribute):
+        * svg/SVGStopElement.h:
+        * svg/SVGStringListValues.h:
+        (WebCore::SVGPropertyTraits<SVGStringListValues>::toString):
+        * svg/SVGSwitchElement.cpp:
+        (WebCore::SVGSwitchElement::SVGSwitchElement):
+        * svg/SVGSwitchElement.h:
+        * svg/SVGSymbolElement.cpp:
+        (WebCore::SVGSymbolElement::SVGSymbolElement):
+        (WebCore::SVGSymbolElement::parseAttribute):
+        (WebCore::SVGSymbolElement::svgAttributeChanged):
+        * svg/SVGSymbolElement.h:
+        * svg/SVGTRefElement.cpp:
+        (WebCore::SVGTRefElement::SVGTRefElement):
+        * svg/SVGTRefElement.h:
+        * svg/SVGTests.cpp:
+        (WebCore::SVGTests::SVGTests):
+        (WebCore::SVGTests::registerAttributes):
+        (WebCore::SVGTests::attributeRegistry):
+        (WebCore::SVGTests::isKnownAttribute):
+        (WebCore::SVGTests::isValid const):
+        (WebCore::SVGTests::parseAttribute):
+        (WebCore::SVGTests::svgAttributeChanged):
+        (WebCore::SVGTests::requiredFeatures):
+        (WebCore::SVGTests::requiredExtensions):
+        (WebCore::SVGTests::systemLanguage):
+        (WebCore::createSVGTestPropertyInfo): Deleted.
+        (WebCore::createSVGTextAttributeToPropertyMap): Deleted.
+        (WebCore::SVGTests::attributeToPropertyMap): Deleted.
+        (WebCore::SVGTests::handleAttributeChange): Deleted.
+        (WebCore::SVGTests::synchronizeAttribute): Deleted.
+        (WebCore::SVGTests::synchronizeRequiredFeatures): Deleted.
+        (WebCore::SVGTests::synchronizeRequiredExtensions): Deleted.
+        (WebCore::SVGTests::synchronizeSystemLanguage): Deleted.
+        * svg/SVGTests.h:
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::SVGTextContentElement):
+        (WebCore::SVGTextContentElement::registerAttributes):
+        (WebCore::SVGTextContentElement::parseAttribute):
+        (WebCore::SVGTextContentElement::svgAttributeChanged):
+        (WebCore::SVGTextContentElement::textLengthPropertyInfo): Deleted.
+        (WebCore::SVGTextContentElement::synchronizeTextLength): Deleted.
+        (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper): Deleted.
+        (WebCore::SVGTextContentElement::textLengthAnimated): Deleted.
+        (WebCore::SVGTextContentElement::isSupportedAttribute): Deleted.
+        * svg/SVGTextContentElement.h:
+        (WebCore::SVGTextContentElement::specifiedTextLength):
+        (WebCore::SVGTextContentElement::attributeRegistry):
+        (WebCore::SVGTextContentElement::textLength const):
+        (WebCore::SVGTextContentElement::lengthAdjust const):
+        (WebCore::SVGTextContentElement::textLengthAnimated):
+        (WebCore::SVGTextContentElement::lengthAdjustAnimated):
+        (WebCore::SVGTextContentElement::isKnownAttribute):
+        (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::SVGAnimatedCustomLengthAttribute):
+        (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::synchronize):
+        (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::animatedProperty):
+        * svg/SVGTextPathElement.cpp:
+        (WebCore::SVGTextPathElement::SVGTextPathElement):
+        (WebCore::SVGTextPathElement::registerAttributes):
+        (WebCore::SVGTextPathElement::parseAttribute):
+        (WebCore::SVGTextPathElement::svgAttributeChanged):
+        (WebCore::SVGTextPathElement::isSupportedAttribute): Deleted.
+        * svg/SVGTextPathElement.h:
+        * svg/SVGTextPositioningElement.cpp:
+        (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
+        (WebCore::SVGTextPositioningElement::registerAttributes):
+        (WebCore::SVGTextPositioningElement::parseAttribute):
+        (WebCore::SVGTextPositioningElement::svgAttributeChanged):
+        * svg/SVGTextPositioningElement.h:
+        (WebCore::SVGTextPositioningElement::attributeRegistry):
+        (WebCore::SVGTextPositioningElement::x const):
+        (WebCore::SVGTextPositioningElement::y const):
+        (WebCore::SVGTextPositioningElement::dx const):
+        (WebCore::SVGTextPositioningElement::dy const):
+        (WebCore::SVGTextPositioningElement::rotate const):
+        (WebCore::SVGTextPositioningElement::xAnimated):
+        (WebCore::SVGTextPositioningElement::yAnimated):
+        (WebCore::SVGTextPositioningElement::dxAnimated):
+        (WebCore::SVGTextPositioningElement::dyAnimated):
+        (WebCore::SVGTextPositioningElement::rotateAnimated):
+        (WebCore::SVGTextPositioningElement::isKnownAttribute):
+        * svg/SVGURIReference.cpp:
+        (WebCore::SVGURIReference::SVGURIReference):
+        (WebCore::SVGURIReference::registerAttributes):
+        (WebCore::SVGURIReference::attributeRegistry):
+        (WebCore::SVGURIReference::isKnownAttribute):
+        (WebCore::SVGURIReference::parseAttribute):
+        (WebCore::SVGURIReference::href const):
+        (WebCore::SVGURIReference::hrefAnimated):
+        (WebCore::SVGURIReference::addSupportedAttributes): Deleted.
+        * svg/SVGURIReference.h:
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::SVGUseElement):
+        (WebCore::SVGUseElement::registerAttributes):
+        (WebCore::SVGUseElement::parseAttribute):
+        (WebCore::SVGUseElement::insertedIntoAncestor):
+        (WebCore::SVGUseElement::transferSizeAttributesToTargetClone const):
+        (WebCore::SVGUseElement::svgAttributeChanged):
+        (WebCore::SVGUseElement::notifyFinished):
+        * svg/SVGUseElement.h:
+        * svg/SVGValue.h:
+        * svg/SVGViewElement.cpp:
+        (WebCore::SVGViewElement::SVGViewElement):
+        (WebCore::SVGViewElement::parseAttribute):
+        * svg/SVGViewElement.h:
+        * svg/SVGViewSpec.cpp:
+        (WebCore::SVGViewSpec::SVGViewSpec):
+        (WebCore::SVGViewSpec::registerAttributes):
+        (WebCore::SVGViewSpec::transform):
+        (WebCore::SVGViewSpec::reset):
+        (WebCore::SVGViewSpec::parseViewSpec):
+        (WebCore::SVGViewSpec::viewBoxPropertyInfo): Deleted.
+        (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo): Deleted.
+        (WebCore::SVGViewSpec::transformPropertyInfo): Deleted.
+        (WebCore::SVGViewSpec::viewBoxIdentifier): Deleted.
+        (WebCore::SVGViewSpec::preserveAspectRatioIdentifier): Deleted.
+        (WebCore::SVGViewSpec::transformIdentifier): Deleted.
+        (WebCore::SVGViewSpec::setZoomAndPan): Deleted.
+        (WebCore::SVGViewSpec::transformString const): Deleted.
+        (WebCore::SVGViewSpec::viewBoxString const): Deleted.
+        (WebCore::SVGViewSpec::preserveAspectRatioString const): Deleted.
+        (WebCore::SVGViewSpec::viewBoxAnimated): Deleted.
+        (WebCore::SVGViewSpec::preserveAspectRatioAnimated): Deleted.
+        (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): Deleted.
+        (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): Deleted.
+        (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): Deleted.
+        * svg/SVGViewSpec.h:
+        * svg/SVGViewSpec.idl:
+        * svg/SVGZoomAndPan.cpp:
+        (WebCore::SVGZoomAndPan::SVGZoomAndPan):
+        (WebCore::SVGZoomAndPan::registerAttributes):
+        (WebCore::SVGZoomAndPan::parseZoomAndPan):
+        (WebCore::SVGZoomAndPan::parseAttribute):
+        (WebCore::SVGZoomAndPan::parse): Deleted.
+        (WebCore::SVGZoomAndPan::parseAttributeValue): Deleted.
+        * svg/SVGZoomAndPan.h:
+        (WebCore::SVGZoomAndPan::zoomAndPan const):
+        (WebCore::SVGZoomAndPan::setZoomAndPan):
+        (WebCore::SVGZoomAndPan::reset):
+        (WebCore::SVGZoomAndPan::attributeRegistry):
+        (WebCore::SVGZoomAndPan::isKnownAttribute):
+        (WebCore::SVGZoomAndPan::parseFromNumber): Deleted.
+        (WebCore::SVGZoomAndPan::parseAttribute): Deleted.
+        * svg/SVGZoomAndPanType.h: Copied from Source/WebCore/svg/SVGValue.h.
+        (WebCore::SVGPropertyTraits<SVGZoomAndPanType>::initialValue):
+        (WebCore::SVGPropertyTraits<SVGZoomAndPanType>::toString):
+        (WebCore::SVGPropertyTraits<SVGZoomAndPanType>::fromString):
+        * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
+        * svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp: Copied from Source/WebCore/svg/SVGValue.h.
+        (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
+        (WebCore::SVGAnimatedPathSegListPropertyTearOff::~SVGAnimatedPathSegListPropertyTearOff):
+        (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
+        * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
+        * svg/properties/SVGAnimatedProperty.cpp:
+        (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
+        (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
+        (WebCore::SVGAnimatedProperty::animatedPropertyCache): Deleted.
+        * svg/properties/SVGAnimatedProperty.h:
+        (WebCore::SVGAnimatedProperty::isAnimating const):
+        (WebCore::SVGAnimatedProperty::isAnimatedListTearOff const):
+        (WebCore::SVGAnimatedProperty::lookupOrCreateAnimatedProperty):
+        (WebCore::SVGAnimatedProperty::lookupAnimatedProperty):
+        (WebCore::SVGAnimatedProperty::animatedPropertyCache):
+        (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper): Deleted.
+        (WebCore::SVGAnimatedProperty::lookupWrapper): Deleted.
+        * svg/properties/SVGAnimatedPropertyMacros.h: Removed.
+        * svg/properties/SVGAnimatedPropertyType.h: Copied from Source/WebCore/svg/SVGAElement.idl.
+        * svg/properties/SVGAttribute.h: Added.
+        (WebCore::SVGPropertyAttribute::SVGPropertyAttribute):
+        (WebCore::SVGPropertyAttribute::value):
+        (WebCore::SVGPropertyAttribute::value const):
+        (WebCore::SVGPropertyAttribute::setValue):
+        (WebCore::SVGPropertyAttribute::resetValue):
+        (WebCore::SVGPropertyAttribute::toString const):
+        (WebCore::SVGPropertyAttribute::setShouldSynchronize):
+        (WebCore::SVGPropertyAttribute::shouldSynchronize const):
+        (WebCore::SVGPropertyAttribute::synchronize):
+        (WebCore::SVGAnimatedAttribute::SVGAnimatedAttribute):
+        (WebCore::SVGAnimatedAttribute::currentValue const):
+        (WebCore::SVGAnimatedAttribute::animatedProperty):
+        (WebCore::SVGAnimatedAttributeList::SVGAnimatedAttributeList):
+        (WebCore::SVGAnimatedAttributeList::detachAnimatedListWrappers):
+        * svg/properties/SVGAttributeAccessor.h: Added.
+        (WebCore::SVGAttributeAccessor::SVGAttributeAccessor):
+        (WebCore::SVGAttributeAccessor::attributeName const):
+        (WebCore::SVGAttributeAccessor::isAnimatedLengthAttribute const):
+        (WebCore::SVGAttributeAccessor::animatedType const):
+        (WebCore::SVGAttributeAccessor::animatedTypes const):
+        (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperty const):
+        (WebCore::SVGAttributeAccessor::lookupAnimatedProperty const):
+        (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperties const):
+        (WebCore::SVGPropertyAttributeAccessor::singleton):
+        (WebCore::SVGPropertyAttributeAccessor::SVGPropertyAttributeAccessor):
+        (WebCore::SVGPropertyAttributeAccessor::attribute const):
+        (WebCore::SVGAnimatedAttributeAccessor::singleton):
+        (WebCore::SVGAnimatedAttributeAccessor::SVGAnimatedAttributeAccessor):
+        (WebCore::SVGAnimatedAttributeAccessor::lookupOrCreateAnimatedProperty):
+        (WebCore::SVGAnimatedAttributeAccessor::lookupAnimatedProperty):
+        (WebCore::SVGAnimatedPairAttributeAccessor::SVGAnimatedPairAttributeAccessor):
+        (WebCore::SVGAnimatedPairAttributeAccessor::secondAttribute const):
+        * svg/properties/SVGAttributeOwnerProxy.h: Copied from Source/WebCore/svg/SVGValue.h.
+        (WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy):
+        (WebCore::SVGAttributeOwnerProxy::element const):
+        * svg/properties/SVGAttributeOwnerProxyImpl.h: Added.
+        (WebCore::SVGAttributeOwnerProxyImpl::SVGAttributeOwnerProxyImpl):
+        (WebCore::SVGAttributeOwnerProxyImpl::attributeRegistry):
+        (WebCore::SVGAttributeOwnerProxyImpl::isKnownAttribute):
+        (WebCore::SVGAttributeOwnerProxyImpl::isAnimatedLengthAttribute):
+        * svg/properties/SVGAttributeRegistry.h: Added.
+        (WebCore::SVGAttributeRegistry::registerAttribute):
+        (WebCore::SVGAttributeRegistry::isEmpty const):
+        (WebCore::SVGAttributeRegistry::isKnownAttribute const):
+        (WebCore::SVGAttributeRegistry::isAnimatedLengthAttribute const):
+        (WebCore::SVGAttributeRegistry::animatedTypes const):
+        (WebCore::SVGAttributeRegistry::synchronizeAttributes const):
+        (WebCore::SVGAttributeRegistry::synchronizeAttribute const):
+        (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperty const):
+        (WebCore::SVGAttributeRegistry::lookupAnimatedProperty const):
+        (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperties const):
+        (WebCore::SVGAttributeRegistry::animatedTypesBaseTypes):
+        (WebCore::SVGAttributeRegistry::synchronizeAttributesBaseTypes):
+        (WebCore::SVGAttributeRegistry::synchronizeAttributeBaseTypes):
+        (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertyBaseTypes):
+        (WebCore::SVGAttributeRegistry::lookupAnimatedPropertyBaseTypes):
+        (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertiesBaseTypes):
+        (WebCore::SVGAttributeRegistry::findAttributeAccessor const):
+        * svg/properties/SVGAttributeToPropertyMap.cpp: Removed.
+        * svg/properties/SVGAttributeToPropertyMap.h: Removed.
+        * svg/properties/SVGPropertyInfo.cpp: Removed.
+        * svg/properties/SVGPropertyInfo.h: Removed.
+
 2018-08-06  Alex Christensen  <achristensen@webkit.org>
 
         Use enum classes and OptionSets for PaintPhase and PaintBehavior
index 4fd9b68..dfd1b52 100644 (file)
@@ -2274,9 +2274,8 @@ svg/graphics/filters/SVGFEImage.cpp
 svg/graphics/filters/SVGFilter.cpp
 svg/graphics/filters/SVGFilterBuilder.cpp
 
+svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp
 svg/properties/SVGAnimatedProperty.cpp
-svg/properties/SVGAttributeToPropertyMap.cpp
-svg/properties/SVGPropertyInfo.cpp
 
 workers/AbstractWorker.cpp
 workers/DedicatedWorkerGlobalScope.cpp
index 004dca1..4563968 100644 (file)
                081668D4125603BF006F25DE /* SVGTextChunkBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081668D2125603BF006F25DE /* SVGTextChunkBuilder.h */; };
                081668DA125603D5006F25DE /* SVGTextLayoutEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 081668D8125603D5006F25DE /* SVGTextLayoutEngine.h */; };
                081AA8DA1111237E002AB06E /* SVGElementRareData.h in Headers */ = {isa = PBXBuildFile; fileRef = 081AA8D91111237E002AB06E /* SVGElementRareData.h */; };
-               081DD49C13BA1A6000DC7627 /* SVGPropertyInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 081DD49B13BA1A6000DC7627 /* SVGPropertyInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
                081EBF3B0FD34F4100DA7559 /* SVGFilterBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081EBF390FD34F4100DA7559 /* SVGFilterBuilder.h */; };
                0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */; };
                08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */ = {isa = PBXBuildFile; fileRef = 08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */; };
                0885067F11DA045B00182B98 /* PaintInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0885067D11DA045B00182B98 /* PaintInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0885068011DA045B00182B98 /* PaintPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0885067E11DA045B00182B98 /* PaintPhase.h */; settings = {ATTRIBUTES = (Private, ); }; };
                088A0E04126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFB126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h */; };
-               088A0E05126EF1DB00978F7A /* SVGAnimatedProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFC126EF1DB00978F7A /* SVGAnimatedProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
                088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFD126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               088A0E07126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFE126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h */; settings = {ATTRIBUTES = (Private, ); }; };
                088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */; };
                088A0E09126EF1DB00978F7A /* SVGListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */; };
                088A0E0A126EF1DB00978F7A /* SVGProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0E01126EF1DB00978F7A /* SVGProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08F2F00A1213E61700DCEC48 /* RenderImageResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F2F0081213E61700DCEC48 /* RenderImageResource.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08F859D51463F9CD0067D933 /* SVGImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F859D31463F9CD0067D933 /* SVGImageCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08F859D51463F9CD0067D934 /* SVGImageForContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F859D31463F9CD0067D934 /* SVGImageForContainer.h */; };
-               08FB3F8413BC754C0099FC18 /* SVGAttributeToPropertyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 08FB3F8313BC754C0099FC18 /* SVGAttributeToPropertyMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08FE0BC5127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h in Headers */ = {isa = PBXBuildFile; fileRef = 08FE0BC4127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h */; };
                0AFDAC3D10F5448C00E1F3D2 /* PluginViewBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
                53ED3FDE167A88E7006762E6 /* JSInternalSettingsGenerated.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 53ED3FDC167A88E7006762E6 /* JSInternalSettingsGenerated.cpp */; };
                53ED3FDF167A88E7006762E6 /* JSInternalSettingsGenerated.h in Headers */ = {isa = PBXBuildFile; fileRef = 53ED3FDD167A88E7006762E6 /* JSInternalSettingsGenerated.h */; };
                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               55346AF121150FAF0059BCDD /* SVGAttributeOwnerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 55346AF021150FAF0059BCDD /* SVGAttributeOwnerProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5546757B1FD212A9003B10B0 /* ImageSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 554675781FD1FC1A003B10B0 /* ImageSource.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5550CB421E955E3C00111AA0 /* ImageTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 5550CB411E955E3C00111AA0 /* ImageTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
                555130011E7CCCCB00A69E38 /* DecodingOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 555130001E7CCCCA00A69E38 /* DecodingOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                55A336F91D821E3C0022C4C7 /* ImageBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
                55AF14E61EAAC59B0026EEAA /* UTIRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 55AF14E41EAAC59B0026EEAA /* UTIRegistry.h */; settings = {ATTRIBUTES = (Private, ); }; };
                55EC9599206AA7A0007DD0A9 /* PaintFrequencyTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 55EC95972069C92D007DD0A9 /* PaintFrequencyTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               55FA7FF0210FA386005AEFE7 /* SVGAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FEF210FA386005AEFE7 /* SVGAttribute.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               55FA7FF5210FB6B1005AEFE7 /* SVGAttributeAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FF4210FB688005AEFE7 /* SVGAttributeAccessor.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               55FA7FF7210FBE3E005AEFE7 /* SVGAttributeRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FF6210FBE3E005AEFE7 /* SVGAttributeRegistry.h */; };
+               55FA7FFB2110ECD7005AEFE7 /* SVGZoomAndPanType.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FFA2110ECD7005AEFE7 /* SVGZoomAndPanType.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               55FA7FFF21110E6E005AEFE7 /* SVGAnimatedPropertyType.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FA7FFE21110E6E005AEFE7 /* SVGAnimatedPropertyType.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               55FA8001211113EE005AEFE7 /* SVGAnimatedProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 088A0DFC126EF1DB00978F7A /* SVGAnimatedProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5704405A1E53936200356601 /* JSAesCbcCfbParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 570440591E53936200356601 /* JSAesCbcCfbParams.h */; };
                5706A6961DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6951DDE5C9500A03B14 /* CryptoAlgorithmRsaOaepParams.h */; };
                5706A6981DDE5E4600A03B14 /* JSRsaOaepParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 5706A6971DDE5E4600A03B14 /* JSRsaOaepParams.h */; };
                081668D7125603D5006F25DE /* SVGTextLayoutEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextLayoutEngine.cpp; sourceTree = "<group>"; };
                081668D8125603D5006F25DE /* SVGTextLayoutEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextLayoutEngine.h; sourceTree = "<group>"; };
                081AA8D91111237E002AB06E /* SVGElementRareData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementRareData.h; sourceTree = "<group>"; };
-               081DD49B13BA1A6000DC7627 /* SVGPropertyInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPropertyInfo.h; sourceTree = "<group>"; };
                081EBF380FD34F4100DA7559 /* SVGFilterBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFilterBuilder.cpp; sourceTree = "<group>"; };
                081EBF390FD34F4100DA7559 /* SVGFilterBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFilterBuilder.h; sourceTree = "<group>"; };
                0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedInteger.h; sourceTree = "<group>"; };
                088A0DFB126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedListPropertyTearOff.h; sourceTree = "<group>"; };
                088A0DFC126EF1DB00978F7A /* SVGAnimatedProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedProperty.h; sourceTree = "<group>"; };
                088A0DFD126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyDescription.h; sourceTree = "<group>"; };
-               088A0DFE126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyMacros.h; sourceTree = "<group>"; };
                088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyTearOff.h; sourceTree = "<group>"; };
                088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGListPropertyTearOff.h; sourceTree = "<group>"; };
                088A0E01126EF1DB00978F7A /* SVGProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGProperty.h; sourceTree = "<group>"; };
                08F859D21463F9CD0067D934 /* SVGImageForContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGImageForContainer.cpp; sourceTree = "<group>"; };
                08F859D31463F9CD0067D933 /* SVGImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageCache.h; sourceTree = "<group>"; };
                08F859D31463F9CD0067D934 /* SVGImageForContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageForContainer.h; sourceTree = "<group>"; };
-               08FB17C013BC7E9100040086 /* SVGAttributeToPropertyMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAttributeToPropertyMap.cpp; sourceTree = "<group>"; };
-               08FB3F8313BC754C0099FC18 /* SVGAttributeToPropertyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAttributeToPropertyMap.h; sourceTree = "<group>"; };
                08FE0BC4127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPreserveAspectRatio.h; sourceTree = "<group>"; };
                0AFDAC3C10F5448C00E1F3D2 /* PluginViewBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginViewBase.h; sourceTree = "<group>"; };
                0B8C56D30F28627F000502E1 /* HTTPHeaderMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderMap.cpp; sourceTree = "<group>"; };
                550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                55137B2C20379E550001004B /* SVGMarkerTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMarkerTypes.h; sourceTree = "<group>"; };
                55137B34203CEB710001004B /* SVGValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGValue.h; sourceTree = "<group>"; };
+               55346AF021150FAF0059BCDD /* SVGAttributeOwnerProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeOwnerProxy.h; sourceTree = "<group>"; };
+               55346AFA2117FFAF0059BCDD /* SVGAttributeOwnerProxyImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeOwnerProxyImpl.h; sourceTree = "<group>"; };
                554675771FD1FC1A003B10B0 /* ImageSource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ImageSource.cpp; sourceTree = "<group>"; };
                554675781FD1FC1A003B10B0 /* ImageSource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageSource.h; sourceTree = "<group>"; };
                5550CB411E955E3C00111AA0 /* ImageTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageTypes.h; sourceTree = "<group>"; };
                55AF14E41EAAC59B0026EEAA /* UTIRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UTIRegistry.h; sourceTree = "<group>"; };
                55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = "<group>"; };
                55EC95972069C92D007DD0A9 /* PaintFrequencyTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaintFrequencyTracker.h; sourceTree = "<group>"; };
+               55FA7FEF210FA386005AEFE7 /* SVGAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttribute.h; sourceTree = "<group>"; };
+               55FA7FF4210FB688005AEFE7 /* SVGAttributeAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAccessor.h; sourceTree = "<group>"; };
+               55FA7FF6210FBE3E005AEFE7 /* SVGAttributeRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeRegistry.h; sourceTree = "<group>"; };
+               55FA7FFA2110ECD7005AEFE7 /* SVGZoomAndPanType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGZoomAndPanType.h; sourceTree = "<group>"; };
+               55FA7FFC2110F813005AEFE7 /* SVGAnimatedPathSegListPropertyTearOff.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedPathSegListPropertyTearOff.cpp; sourceTree = "<group>"; };
+               55FA7FFE21110E6E005AEFE7 /* SVGAnimatedPropertyType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyType.h; sourceTree = "<group>"; };
                570440571E53851600356601 /* CryptoAlgorithmAES_CFBMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmAES_CFBMac.cpp; sourceTree = "<group>"; };
                570440591E53936200356601 /* JSAesCbcCfbParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAesCbcCfbParams.h; sourceTree = "<group>"; };
                5704405B1E53937900356601 /* JSAesCbcCfbParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAesCbcCfbParams.cpp; sourceTree = "<group>"; };
                B51A2F4017D7D5DA0072517A /* ImageQualityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageQualityController.cpp; sourceTree = "<group>"; };
                B5320D69122A24E9002D1440 /* FontPlatformData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontPlatformData.h; sourceTree = "<group>"; };
                B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FontPlatformDataCocoa.mm; sourceTree = "<group>"; };
-               B543B85617EB758F003BE93A /* SVGPropertyInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPropertyInfo.cpp; sourceTree = "<group>"; };
                B562DB5E17D3CD560010AF96 /* HTMLElementTypeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLElementTypeHelpers.h; sourceTree = "<group>"; };
                B562DB5F17D3CD560010AF96 /* SVGElementTypeHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGElementTypeHelpers.h; sourceTree = "<group>"; };
                B56576E417DA599F00A56BDC /* JSExecStateInstrumentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExecStateInstrumentation.h; sourceTree = "<group>"; };
                        children = (
                                71FB967A1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h */,
                                088A0DFB126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h */,
+                               55FA7FFC2110F813005AEFE7 /* SVGAnimatedPathSegListPropertyTearOff.cpp */,
                                089A8E06128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h */,
                                836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */,
                                088A0DFC126EF1DB00978F7A /* SVGAnimatedProperty.h */,
                                088A0DFD126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h */,
-                               088A0DFE126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h */,
                                088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */,
+                               55FA7FFE21110E6E005AEFE7 /* SVGAnimatedPropertyType.h */,
                                08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */,
                                085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */,
-                               08FB17C013BC7E9100040086 /* SVGAttributeToPropertyMap.cpp */,
-                               08FB3F8313BC754C0099FC18 /* SVGAttributeToPropertyMap.h */,
+                               55FA7FEF210FA386005AEFE7 /* SVGAttribute.h */,
+                               55FA7FF4210FB688005AEFE7 /* SVGAttributeAccessor.h */,
+                               55346AF021150FAF0059BCDD /* SVGAttributeOwnerProxy.h */,
+                               55346AFA2117FFAF0059BCDD /* SVGAttributeOwnerProxyImpl.h */,
+                               55FA7FF6210FBE3E005AEFE7 /* SVGAttributeRegistry.h */,
                                0810764312828556007C63BA /* SVGListProperty.h */,
                                088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
                                08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */,
                                088A0E01126EF1DB00978F7A /* SVGProperty.h */,
-                               B543B85617EB758F003BE93A /* SVGPropertyInfo.cpp */,
-                               081DD49B13BA1A6000DC7627 /* SVGPropertyInfo.h */,
                                088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */,
                                088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */,
                                0880F70D1282B46D00948505 /* SVGStaticListPropertyTearOff.h */,
                                B222795F0D00BF210071B782 /* SVGZoomAndPan.cpp */,
                                B22279600D00BF210071B782 /* SVGZoomAndPan.h */,
                                B22279610D00BF210071B782 /* SVGZoomAndPan.idl */,
+                               55FA7FFA2110ECD7005AEFE7 /* SVGZoomAndPanType.h */,
                                B2E4EC940D00C22B00432643 /* SVGZoomEvent.cpp */,
                                B2E4EC950D00C22B00432643 /* SVGZoomEvent.h */,
                                B2E4EC960D00C22B00432643 /* SVGZoomEvent.idl */,
                                089A8E07128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h in Headers */,
                                43B9336913B261B1004584BF /* SVGAnimatedPointList.h in Headers */,
                                08FE0BC5127E2AC1000C4FB5 /* SVGAnimatedPreserveAspectRatio.h in Headers */,
-                               088A0E05126EF1DB00978F7A /* SVGAnimatedProperty.h in Headers */,
+                               55FA8001211113EE005AEFE7 /* SVGAnimatedProperty.h in Headers */,
                                088A0E06126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h in Headers */,
-                               088A0E07126EF1DB00978F7A /* SVGAnimatedPropertyMacros.h in Headers */,
                                088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */,
+                               55FA7FFF21110E6E005AEFE7 /* SVGAnimatedPropertyType.h in Headers */,
                                08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */,
                                08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */,
                                084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */,
                                B22279950D00BF220071B782 /* SVGAnimateTransformElement.h in Headers */,
                                B22279980D00BF220071B782 /* SVGAnimationElement.h in Headers */,
                                439D334513A6911C00C20F4F /* SVGAnimatorFactory.h in Headers */,
-                               08FB3F8413BC754C0099FC18 /* SVGAttributeToPropertyMap.h in Headers */,
+                               55FA7FF0210FA386005AEFE7 /* SVGAttribute.h in Headers */,
+                               55FA7FF5210FB6B1005AEFE7 /* SVGAttributeAccessor.h in Headers */,
+                               55346AF121150FAF0059BCDD /* SVGAttributeOwnerProxy.h in Headers */,
+                               55FA7FF7210FBE3E005AEFE7 /* SVGAttributeRegistry.h in Headers */,
                                B222799C0D00BF220071B782 /* SVGCircleElement.h in Headers */,
                                B222799F0D00BF220071B782 /* SVGClipPathElement.h in Headers */,
                                B22279A50D00BF220071B782 /* SVGComponentTransferFunctionElement.h in Headers */,
                                B2227A940D00BF220071B782 /* SVGPolylineElement.h in Headers */,
                                B2227A970D00BF220071B782 /* SVGPreserveAspectRatio.h in Headers */,
                                088A0E0A126EF1DB00978F7A /* SVGProperty.h in Headers */,
-                               081DD49C13BA1A6000DC7627 /* SVGPropertyInfo.h in Headers */,
                                088A0E0B126EF1DB00978F7A /* SVGPropertyTearOff.h in Headers */,
                                088A0E0C126EF1DB00978F7A /* SVGPropertyTraits.h in Headers */,
                                B2227A9A0D00BF220071B782 /* SVGRadialGradientElement.h in Headers */,
                                B2227AF30D00BF220071B782 /* SVGViewSpec.h in Headers */,
                                8485228B1190173C006EDC7F /* SVGVKernElement.h in Headers */,
                                B2227AF60D00BF220071B782 /* SVGZoomAndPan.h in Headers */,
+                               55FA7FFB2110ECD7005AEFE7 /* SVGZoomAndPanType.h in Headers */,
                                B2E4EC980D00C22B00432643 /* SVGZoomEvent.h in Headers */,
                                46ECB6381FD0A3C80088E5AD /* SWClientConnection.h in Headers */,
                                46658DC91FA24B8700F7DD54 /* SWContextManager.h in Headers */,
index 5948119..0acf818 100644 (file)
@@ -115,7 +115,7 @@ AffineTransform RenderSVGResourceMarker::markerTransformation(const FloatPoint&
 void RenderSVGResourceMarker::draw(PaintInfo& paintInfo, const AffineTransform& transform)
 {
     // An empty viewBox disables rendering.
-    if (markerElement().hasAttribute(SVGNames::viewBoxAttr) && markerElement().viewBoxIsValid() && markerElement().viewBox().isEmpty())
+    if (markerElement().hasAttribute(SVGNames::viewBoxAttr) && markerElement().hasEmptyViewBox())
         return;
 
     PaintInfo info(paintInfo);
index 92f2104..cc3c09f 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 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-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
@@ -46,23 +46,13 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGAElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGAElement, SVGNames::targetAttr, SVGTarget, svgTarget)
-DEFINE_ANIMATED_STRING(SVGAElement, XLinkNames::hrefAttr, Href, href)
-DEFINE_ANIMATED_BOOLEAN(SVGAElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(svgTarget)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(href)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGAElement::SVGAElement(const QualifiedName& tagName, Document& document)
     : SVGGraphicsElement(tagName, document)
+    , SVGExternalResourcesRequired(this)
+    , SVGURIReference(this)
 {
     ASSERT(hasTagName(SVGNames::aTag));
-    registerAnimatedPropertiesForSVGAElement();
+    registerAttributes();
 }
 
 Ref<SVGAElement> SVGAElement::create(const QualifiedName& tagName, Document& document)
@@ -81,10 +71,18 @@ 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) {
-        setSVGTargetBaseValue(value);
+        m_target.setValue(value);
         return;
     }
 
@@ -102,9 +100,11 @@ void SVGAElement::svgAttributeChanged(const QualifiedName& attrName)
             InstanceInvalidationGuard guard(*this);
             invalidateStyleForSubtree();
         }
+        return;
     }
 
     SVGGraphicsElement::svgAttributeChanged(attrName);
+    SVGExternalResourcesRequired::svgAttributeChanged(attrName);
 }
 
 RenderPtr<RenderElement> SVGAElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
index 254212e..d41ad0b 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
  * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
+ * 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
 
 #pragma once
 
-#include "SVGAnimatedBoolean.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGGraphicsElement.h"
 #include "SVGURIReference.h"
 
 namespace WebCore {
 
-class SVGAElement final : public SVGGraphicsElement, public SVGURIReference, public SVGExternalResourcesRequired {
+class SVGAElement final : public SVGGraphicsElement, public SVGExternalResourcesRequired, public SVGURIReference {
     WTF_MAKE_ISO_ALLOCATED(SVGAElement);
 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()); }
+
 private:
     SVGAElement(const QualifiedName&, Document&);
 
-    bool isValid() const final { return SVGTests::isValid(); }
-    
-    String title() const final;
-    String target() const final { return svgTarget(); }
+    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; }
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
 
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
     bool childShouldCreateRenderer(const Node&) const final;
 
+    bool isValid() const final { return SVGTests::isValid(); }
+    String title() const final;
     void defaultEventHandler(Event&) final;
     
     bool supportsFocus() const final;
@@ -58,13 +63,8 @@ private:
 
     bool willRespondToMouseClickEvents() final;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGAElement)
-        // This declaration used to define a non-virtual "String& target() const" method, that clashes with "virtual String Element::target() const".
-        // That's why it has been renamed to "svgTarget", the CodeGenerators take care of calling svgTargetAnimated() instead of targetAnimated(), see CodeGenerator.pm.
-        DECLARE_ANIMATED_STRING(SVGTarget, svgTarget)
-        DECLARE_ANIMATED_STRING_OVERRIDE(Href, href)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_target;
 };
 
 } // namespace WebCore
index 3ede6dc..28795aa 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 interface SVGAElement : SVGGraphicsElement {
-    [ImplementedAs=svgTarget] readonly attribute SVGAnimatedString target;
+    readonly attribute SVGAnimatedString target;
 };
 
 SVGAElement implements SVGExternalResourcesRequired;
index 8ea4763..782b245 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) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2018 Apple Inc. All rights reserved.
  * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
@@ -37,19 +37,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGAltGlyphElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGAltGlyphElement, XLinkNames::hrefAttr, Href, href)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAltGlyphElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(href)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTextPositioningElement)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGAltGlyphElement::SVGAltGlyphElement(const QualifiedName& tagName, Document& document)
     : SVGTextPositioningElement(tagName, document)
+    , SVGURIReference(this)
 {
     ASSERT(hasTagName(SVGNames::altGlyphTag));
-    registerAnimatedPropertiesForSVGAltGlyphElement();
 }
 
 Ref<SVGAltGlyphElement> SVGAltGlyphElement::create(const QualifiedName& tagName, Document& document)
index 4cd32e4..3b4e861 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) 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-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
@@ -45,12 +45,13 @@ public:
 private:
     SVGAltGlyphElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGAltGlyphElement, SVGTextPositioningElement, SVGURIReference>;
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
+
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
     bool childShouldCreateRenderer(const Node&) const override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGAltGlyphElement)
-        DECLARE_ANIMATED_STRING_OVERRIDE(Href, href)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
 };
 
 } // namespace WebCore
index 521178b..d491568 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 #include "SVGAngle.h"
 #include "SVGAnimatedPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttribute.h"
 
 namespace WebCore {
 
-using SVGAnimatedAngle = SVGAnimatedPropertyTearOff<SVGAngle>;
-
-// Helper macros to declare/define a SVGAnimatedAngle object. SVGAnimatedAngle is only used in the SVG DOM for SVGMarkerElement.
-#define DECLARE_ANIMATED_ANGLE(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedAngle, SVGAngleValue, UpperProperty, LowerProperty, )
-
-// Only used for SVGMarkerElements orientAttr, which maps to SVGAnimatedAngle orientAngle and SVGAnimatedEnumeration orientType.
-#define DEFINE_ANIMATED_ANGLE_AND_ENUMERATION(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedAngle, OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty)
-
 class SVGAnimationElement;
 
+using SVGAnimatedAngle = SVGAnimatedPropertyTearOff<SVGAngle>;
+using SVGAnimatedAngleAttribute = SVGAnimatedAttribute<SVGAnimatedAngle>;
+
 class SVGAnimatedAngleAnimator final : public SVGAnimatedTypeAnimator {
 public:
     SVGAnimatedAngleAnimator(SVGAnimationElement*, SVGElement*);
index eddd1e7..875909f 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #include "SVGAnimatedStaticPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 
 namespace WebCore {
 
-typedef SVGAnimatedStaticPropertyTearOff<bool> SVGAnimatedBoolean;
-
-// Helper macros to declare/define a SVGAnimatedBoolean object
-#define DECLARE_ANIMATED_BOOLEAN(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedBoolean, bool, UpperProperty, LowerProperty, )
-
-#define DECLARE_ANIMATED_BOOLEAN_OVERRIDE(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedBoolean, bool, UpperProperty, LowerProperty, override)
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_BOOLEAN(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedBoolean, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedBoolean = SVGAnimatedStaticPropertyTearOff<bool>;
+using SVGAnimatedBooleanAttribute = SVGAnimatedAttribute<SVGAnimatedBoolean>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedBooleanAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedBooleanAttribute, AnimatedBoolean>;
 
 class SVGAnimatedBooleanAnimator final : public SVGAnimatedTypeAnimator {
 public:
index 59cd19d..488ab89 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) Research In Motion Limited 2010, 2012. 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
 #pragma once
 
 #include "SVGAnimatedEnumerationPropertyTearOff.h"
-#include "SVGAnimatedPropertyMacros.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 
 namespace WebCore {
 
-typedef SVGAnimatedStaticPropertyTearOff<unsigned> SVGAnimatedEnumeration;
+class SVGAnimationElement;
 
-// Helper macros to declare/define a SVGAnimatedEnumeration object
-#define DECLARE_ANIMATED_ENUMERATION(UpperProperty, LowerProperty, EnumType) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedEnumerationPropertyTearOff<EnumType>, EnumType, UpperProperty, LowerProperty, )
+using SVGAnimatedEnumeration = SVGAnimatedStaticPropertyTearOff<unsigned>;
 
-#define DEFINE_ANIMATED_ENUMERATION(OwnerType, DOMAttribute, UpperProperty, LowerProperty, EnumType) \
-DEFINE_ANIMATED_PROPERTY(AnimatedEnumeration, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+template<typename EnumType>
+using SVGAnimatedEnumerationAttribute = SVGAnimatedAttribute<SVGAnimatedEnumerationPropertyTearOff<EnumType>>;
+
+template<typename OwnerType, typename EnumType>
+using SVGAnimatedEnumerationAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedEnumerationAttribute<EnumType>, AnimatedEnumeration>;
 
 class SVGAnimatedEnumerationAnimator final : public SVGAnimatedTypeAnimator {
 public:
index da5f441..1c23487 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #pragma once
 
-#include "SVGAnimatedPropertyMacros.h"
 #include "SVGAnimatedStaticPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 
 namespace WebCore {
 
-typedef SVGAnimatedStaticPropertyTearOff<int> SVGAnimatedInteger;
-
-// Helper macros to declare/define a SVGAnimatedInteger object
-#define DECLARE_ANIMATED_INTEGER(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedInteger, int, UpperProperty, LowerProperty, )
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_INTEGER(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedInteger, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedInteger = SVGAnimatedStaticPropertyTearOff<int>;
+using SVGAnimatedIntegerAttribute = SVGAnimatedAttribute<SVGAnimatedInteger>;
 
-#define DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedIntegerOptionalInteger, OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty)
+template<typename OwnerType>
+using SVGAnimatedIntegerAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedIntegerAttribute, AnimatedInteger>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedOptionalIntegerAttributeAccessor = SVGAnimatedOptionalAttributeAccessor<OwnerType, SVGAnimatedIntegerAttribute, AnimatedIntegerOptionalInteger>;
 
 class SVGAnimatedIntegerAnimator final : public SVGAnimatedTypeAnimator {
 public:
index fa4ca6e..1004ec5 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #include "SVGAnimatedPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 #include "SVGLength.h"
 
 namespace WebCore {
 
-using SVGAnimatedLength = SVGAnimatedPropertyTearOff<SVGLength>;
-
-// Helper macros to declare/define a SVGAnimatedLength object
-#define DECLARE_ANIMATED_LENGTH(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedLength, SVGLengthValue, UpperProperty, LowerProperty, )
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_LENGTH(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedLength, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedLength = SVGAnimatedPropertyTearOff<SVGLength>;
+using SVGAnimatedLengthAttribute = SVGAnimatedAttribute<SVGAnimatedLength>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedLengthAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedLengthAttribute, AnimatedLength>;
 
 class SVGAnimatedLengthAnimator final : public SVGAnimatedTypeAnimator {
 public:
index 5ecf542..165bc48 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #include "SVGAnimatedListPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 #include "SVGLength.h"
 #include "SVGLengthList.h"
 
 namespace WebCore {
 
-using SVGAnimatedLengthList = SVGAnimatedListPropertyTearOff<SVGLengthListValues>;
-
-// Helper macros to declare/define a SVGAnimatedLengthList object
-#define DECLARE_ANIMATED_LENGTH_LIST(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedLengthList, SVGLengthListValues, UpperProperty, LowerProperty)
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_LENGTH_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedLengthList, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedLengthList = SVGAnimatedListPropertyTearOff<SVGLengthListValues>;
+using SVGAnimatedLengthListAttribute = SVGAnimatedAttributeList<SVGAnimatedLengthList>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedLengthListAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedLengthListAttribute, AnimatedLengthList>;
 
 class SVGAnimatedLengthListAnimator final : public SVGAnimatedTypeAnimator {
 public:
index 0e19d4d..da3d96b 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #pragma once
 
-#include "SVGAnimatedPropertyMacros.h"
 #include "SVGAnimatedStaticPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 
 namespace WebCore {
 
-typedef SVGAnimatedStaticPropertyTearOff<float> SVGAnimatedNumber;
-
-// Helper macros to declare/define a SVGAnimatedNumber object
-#define DECLARE_ANIMATED_NUMBER(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedNumber, float, UpperProperty, LowerProperty, )
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_NUMBER(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedNumber, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedNumber = SVGAnimatedStaticPropertyTearOff<float>;
+using SVGAnimatedNumberAttribute = SVGAnimatedAttribute<SVGAnimatedNumber>;
 
-#define DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedNumberOptionalNumber, OwnerType, DOMAttribute, SVGDOMAttributeIdentifier, UpperProperty, LowerProperty)
+template<typename OwnerType>
+using SVGAnimatedNumberAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedNumberAttribute, AnimatedNumber>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedOptionalNumberAttributeAccessor = SVGAnimatedOptionalAttributeAccessor<OwnerType, SVGAnimatedNumberAttribute, AnimatedNumberOptionalNumber>;
 
 class SVGAnimatedNumberAnimator final : public SVGAnimatedTypeAnimator {
 public:
index 58025ea..bf7c1fe 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #include "SVGAnimatedListPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 #include "SVGNumber.h"
 #include "SVGNumberList.h"
 
 namespace WebCore {
 
-using SVGAnimatedNumberList = SVGAnimatedListPropertyTearOff<SVGNumberListValues>;
-
-// Helper macros to declare/define a SVGAnimatedNumberList object
-#define DECLARE_ANIMATED_NUMBER_LIST(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedNumberList, SVGNumberListValues, UpperProperty, LowerProperty)
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_NUMBER_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedNumberList, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedNumberList = SVGAnimatedListPropertyTearOff<SVGNumberListValues>;
+using SVGAnimatedNumberListAttribute = SVGAnimatedAttributeList<SVGAnimatedNumberList>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedNumberListAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedNumberListAttribute, AnimatedNumberList>;
 
 class SVGAnimatedNumberListAnimator final : public SVGAnimatedTypeAnimator {
 public:
index 7feb70f..b864ed3 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) Research In Motion Limited 2011, 2012. 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
 
 #pragma once
 
+#include "SVGAnimatedPathSegListPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 
 namespace WebCore {
 
 class SVGAnimationElement;
 
+using SVGAnimatedPathSegList = SVGAnimatedPathSegListPropertyTearOff;
+using SVGAnimatedPathSegListAttribute = SVGAnimatedAttributeList<SVGAnimatedPathSegList>;
+
 class SVGAnimatedPathAnimator final : public SVGAnimatedTypeAnimator {
 public:
     SVGAnimatedPathAnimator(SVGAnimationElement*, SVGElement*);
index 2090e82..1e773e1 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) Research In Motion Limited 2011. 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
 
 namespace WebCore {
 
+class SVGAnimationElement;
+
 using SVGAnimatedPointList = SVGAnimatedListPropertyTearOff<SVGPointListValues>;
+using SVGAnimatedPointListAttribute = SVGAnimatedAttributeList<SVGAnimatedPointList>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedPointListAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedPointListAttribute, AnimatedPoints>;
 
 class SVGAnimatedPointListAnimator final : public SVGAnimatedTypeAnimator {
 public:
index fa66feb..2699d9d 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #include "SVGAnimatedPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 #include "SVGPreserveAspectRatio.h"
 
 namespace WebCore {
 
-template<typename T> 
-class SVGPropertyTearOff;
+class SVGAnimationElement;
 
 using SVGAnimatedPreserveAspectRatio = SVGAnimatedPropertyTearOff<SVGPreserveAspectRatio>;
+using SVGAnimatedPreserveAspectRatioAttribute = SVGAnimatedAttribute<SVGAnimatedPreserveAspectRatio>;
 
-// Helper macros to declare/define a SVGAnimatedPreserveAspectRatio object
-#define DECLARE_ANIMATED_PRESERVEASPECTRATIO(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedPreserveAspectRatio, SVGPreserveAspectRatioValue, UpperProperty, LowerProperty, )
-
-#define DEFINE_ANIMATED_PRESERVEASPECTRATIO(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedPreserveAspectRatio, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
-
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedPreserveAspectRatioAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedPreserveAspectRatioAttribute, AnimatedPreserveAspectRatio>;
 
 class SVGAnimatedPreserveAspectRatioAnimator final : public SVGAnimatedTypeAnimator {
 public:
index 95e7386..8b26dce 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #pragma once
 
-#include "SVGAnimatedPropertyMacros.h"
 #include "SVGAnimatedPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 #include "SVGRect.h"
 
 namespace WebCore {
 
+class SVGAnimationElement;
 class SVGRect;
 
 using SVGAnimatedRect = SVGAnimatedPropertyTearOff<SVGRect>;
+using SVGAnimatedRectAttribute = SVGAnimatedAttribute<SVGAnimatedRect>;
 
-// Helper macros to declare/define a SVGAnimatedRect object
-#define DECLARE_ANIMATED_RECT(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedRect, FloatRect, UpperProperty, LowerProperty, )
-
-#define DEFINE_ANIMATED_RECT(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedRect, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
-
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedRectAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedRectAttribute, AnimatedRect>;
 
 class SVGAnimatedRectAnimator final : public SVGAnimatedTypeAnimator {
 public:
index 86d0422..1098731 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #pragma once
 
-#include "SVGAnimatedPropertyMacros.h"
 #include "SVGAnimatedStaticPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 
 namespace WebCore {
 
-typedef SVGAnimatedStaticPropertyTearOff<String> SVGAnimatedString;
-
-// Helper macros to declare/define a SVGAnimatedString object
-#define DECLARE_ANIMATED_STRING(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedString, String, UpperProperty, LowerProperty, )
-
-#define DECLARE_ANIMATED_STRING_OVERRIDE(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_PROPERTY(SVGAnimatedString, String, UpperProperty, LowerProperty, override)
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_STRING(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedString, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedString = SVGAnimatedStaticPropertyTearOff<String>;
+using SVGAnimatedStringAttribute = SVGAnimatedAttribute<SVGAnimatedString>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedStringAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedStringAttribute, AnimatedString>;
 
 class SVGAnimatedStringAnimator final : public SVGAnimatedTypeAnimator {
 public:
index e3a3a0f..0b169f5 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
 
 #include "SVGAnimatedTransformListPropertyTearOff.h"
 #include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAccessor.h"
 #include "SVGTransformList.h"
 
 namespace WebCore {
 
-using SVGAnimatedTransformList = SVGAnimatedTransformListPropertyTearOff;
-
-// Helper macros to declare/define a SVGAnimatedTransformList object
-#define DECLARE_ANIMATED_TRANSFORM_LIST(UpperProperty, LowerProperty) \
-DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedTransformList, SVGTransformListValues, UpperProperty, LowerProperty)
+class SVGAnimationElement;
 
-#define DEFINE_ANIMATED_TRANSFORM_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \
-DEFINE_ANIMATED_PROPERTY(AnimatedTransformList, OwnerType, DOMAttribute, DOMAttribute->localName(), UpperProperty, LowerProperty)
+using SVGAnimatedTransformList = SVGAnimatedTransformListPropertyTearOff;
+using SVGAnimatedTransformListAttribute = SVGAnimatedAttributeList<SVGAnimatedTransformList>;
 
-class SVGAnimationElement;
+template<typename OwnerType>
+using SVGAnimatedTransformListAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedTransformListAttribute, AnimatedTransformList>;
 
 class SVGAnimatedTransformListAnimator final : public SVGAnimatedTypeAnimator {
 public:
index cddb191..dcf9c44 100644 (file)
@@ -22,7 +22,6 @@
 #include "config.h"
 #include "SVGAnimatedTypeAnimator.h"
 
-#include "SVGAttributeToPropertyMap.h"
 #include "SVGElement.h"
 
 namespace WebCore {
@@ -56,16 +55,14 @@ SVGElementAnimatedPropertyList SVGAnimatedTypeAnimator::findAnimatedPropertiesFo
     if (!SVGAnimatedType::supportsAnimVal(m_type))
         return result;
 
-    auto& propertyMap = targetElement.localAttributeToPropertyMap();
-    auto targetProperties = propertyMap.properties(targetElement, attributeName);
-
+    auto targetProperties = targetElement.lookupOrCreateAnimatedProperties(attributeName);
     if (targetProperties.isEmpty())
         return result;
 
     result.append(SVGElementAnimatedProperties { &targetElement, WTFMove(targetProperties) });
 
     for (SVGElement* instance : targetElement.instances())
-        result.append(SVGElementAnimatedProperties { instance, propertyMap.properties(*instance, attributeName) });
+        result.append(SVGElementAnimatedProperties { instance, instance->lookupOrCreateAnimatedProperties(attributeName) });
 
 #if !ASSERT_DISABLED
     for (auto& animatedProperties : result) {
index 0f91cd2..3f25808 100644 (file)
@@ -47,18 +47,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGAnimationElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_BOOLEAN(SVGAnimationElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGAnimationElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
-END_REGISTER_ANIMATED_PROPERTIES
-
 SVGAnimationElement::SVGAnimationElement(const QualifiedName& tagName, Document& document)
     : SVGSMILElement(tagName, document)
+    , SVGExternalResourcesRequired(this)
+    , SVGTests(this)
 {
-    registerAnimatedPropertiesForSVGAnimationElement();
 }
 
 static void parseKeyTimes(const String& parse, Vector<float>& result, bool verifyOrder)
@@ -691,19 +684,4 @@ void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target)
     m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attributeType() == AttributeType::CSS && !isTargetAttributeCSSProperty(target, attributeName());
 }
 
-Ref<SVGStringList> SVGAnimationElement::requiredFeatures()
-{
-    return SVGTests::requiredFeatures(*this);
-}
-
-Ref<SVGStringList> SVGAnimationElement::requiredExtensions()
-{ 
-    return SVGTests::requiredExtensions(*this);
-}
-
-Ref<SVGStringList> SVGAnimationElement::systemLanguage()
-{
-    return SVGTests::systemLanguage(*this);
-}
-
 }
index 7668f18..bfe230c 100644 (file)
@@ -52,7 +52,7 @@ enum AnimatedPropertyValueType { RegularPropertyValue, CurrentColorValue, Inheri
 
 enum class CalcMode { Discrete, Linear, Paced, Spline };
 
-class SVGAnimationElement : public SVGSMILElement, public SVGTests, public SVGExternalResourcesRequired {
+class SVGAnimationElement : public SVGSMILElement, public SVGExternalResourcesRequired, public SVGTests {
     WTF_MAKE_ISO_ALLOCATED(SVGAnimationElement);
 public:
     float getStartTime() const;
@@ -146,14 +146,13 @@ public:
             animatedNumber = number;
     }
 
-    // SVGTests
-    Ref<SVGStringList> requiredFeatures();
-    Ref<SVGStringList> requiredExtensions();
-    Ref<SVGStringList> systemLanguage();
-
 protected:
     SVGAnimationElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGAnimationElement, SVGElement, SVGExternalResourcesRequired, SVGTests>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const override { return m_attributeOwnerProxy; }
+
     void computeCSSPropertyValue(SVGElement*, CSSPropertyID, String& value);
     virtual void determinePropertyValueTypes(const String& from, const String& to);
     virtual void resetAnimatedPropertyType();
@@ -208,15 +207,6 @@ private:
     void applyAnimatedValue(ShouldApplyAnimation, SVGElement* targetElement, const QualifiedName& attributeName, SVGAnimatedType*);
     void adjustForInheritance(SVGElement* targetElement, const QualifiedName& attributeName, String&);
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGAnimationElement)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
-
-    // SVGTests
-    void synchronizeRequiredFeatures() final { SVGTests::synchronizeRequiredFeatures(*this); }
-    void synchronizeRequiredExtensions() final { SVGTests::synchronizeRequiredExtensions(*this); }
-    void synchronizeSystemLanguage() final { SVGTests::synchronizeSystemLanguage(*this); }
-
     void setCalcMode(const AtomicString&);
 
     bool m_animationValid { false };
@@ -231,6 +221,7 @@ private:
     bool m_hasInvalidCSSAttributeType { false };
     CalcMode m_calcMode { CalcMode::Linear };
     AnimationMode m_animationMode { NoAnimation };
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
 };
 
 } // namespace WebCore
index 2928653..ef3daa6 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+ * 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
 #include "config.h"
 #include "SVGCircleElement.h"
 
-#include "FloatPoint.h"
 #include "RenderSVGEllipse.h"
-#include "RenderSVGPath.h"
 #include "RenderSVGResource.h"
-#include "SVGLengthValue.h"
-#include "SVGNames.h"
 #include <wtf/IsoMallocInlines.h>
 
 namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGCircleElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::cxAttr, Cx, cx)
-DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::cyAttr, Cy, cy)
-DEFINE_ANIMATED_LENGTH(SVGCircleElement, SVGNames::rAttr, R, r)
-DEFINE_ANIMATED_BOOLEAN(SVGCircleElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCircleElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(cx)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(cy)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(r)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGeometryElement)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGCircleElement::SVGCircleElement(const QualifiedName& tagName, Document& document)
     : SVGGeometryElement(tagName, document)
-    , m_cx(LengthModeWidth)
-    , m_cy(LengthModeHeight)
-    , m_r(LengthModeOther)
+    , SVGExternalResourcesRequired(this)
 {
     ASSERT(hasTagName(SVGNames::circleTag));
-    registerAnimatedPropertiesForSVGCircleElement();
+    registerAttributes();
 }
 
 Ref<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagName, Document& document)
@@ -62,41 +43,43 @@ Ref<SVGCircleElement> SVGCircleElement::create(const QualifiedName& tagName, Doc
     return adoptRef(*new SVGCircleElement(tagName, document));
 }
 
+void SVGCircleElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::cxAttr, &SVGCircleElement::m_cx>();
+    registry.registerAttribute<SVGNames::cyAttr, &SVGCircleElement::m_cy>();
+    registry.registerAttribute<SVGNames::rAttr, &SVGCircleElement::m_r>();
+}
+
 void SVGCircleElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     SVGParsingError parseError = NoError;
 
     if (name == SVGNames::cxAttr)
-        setCxBaseValue(SVGLengthValue::construct(LengthModeWidth, value, parseError));
+        m_cx.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError));
     else if (name == SVGNames::cyAttr)
-        setCyBaseValue(SVGLengthValue::construct(LengthModeHeight, value, parseError));
+        m_cy.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError));
     else if (name == SVGNames::rAttr)
-        setRBaseValue(SVGLengthValue::construct(LengthModeOther, value, parseError, ForbidNegativeLengths));
+        m_r.setValue(SVGLengthValue::construct(LengthModeOther, value, parseError, ForbidNegativeLengths));
 
     reportAttributeParsingError(parseError, name, value);
 
-    SVGGraphicsElement::parseAttribute(name, value);
+    SVGGeometryElement::parseAttribute(name, value);
     SVGExternalResourcesRequired::parseAttribute(name, value);
 }
 
 void SVGCircleElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    SVGGraphicsElement::svgAttributeChanged(attrName);
-
-    if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr || attrName == SVGNames::rAttr) {
+    if (isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidateSVGPresentationAttributeStyle();
         return;
     }
 
-    auto* renderer = downcast<RenderSVGShape>(this->renderer());
-    if (!renderer)
-        return;
-
-    if (SVGLangSpace::isKnownAttribute(attrName) || SVGExternalResourcesRequired::isKnownAttribute(attrName)) {
-        InstanceInvalidationGuard guard(*this);
-        RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
-    }
+    SVGGeometryElement::svgAttributeChanged(attrName);
+    SVGExternalResourcesRequired::svgAttributeChanged(attrName);
 }
 
 RenderPtr<RenderElement> SVGCircleElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
index ac3bbb1..65c7b46 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
+ * 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
 
 #pragma once
 
-#include "SVGAnimatedBoolean.h"
 #include "SVGAnimatedLength.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGGeometryElement.h"
+#include "SVGNames.h"
 
 namespace WebCore {
 
@@ -32,24 +33,35 @@ class SVGCircleElement final : public SVGGeometryElement, public SVGExternalReso
 public:
     static Ref<SVGCircleElement> create(const QualifiedName&, Document&);
 
+    const SVGLengthValue& cx() const { return m_cx.currentValue(attributeOwnerProxy()); }
+    const SVGLengthValue& cy() const { return m_cy.currentValue(attributeOwnerProxy()); }
+    const SVGLengthValue& r() const { return m_r.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedLength> cxAnimated() { return m_cx.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedLength> cyAnimated() { return m_cy.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedLength> rAnimated() { return m_r.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGCircleElement(const QualifiedName&, Document&);
 
-    bool isValid() const final { return SVGTests::isValid(); }
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGCircleElement, SVGGeometryElement, SVGExternalResourcesRequired>;
+    static auto& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
 
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
 
+    bool isValid() const final { return SVGTests::isValid(); }
     bool selfHasRelativeLengths() const final { return true; }
 
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGCircleElement)
-        DECLARE_ANIMATED_LENGTH(Cx, cx)
-        DECLARE_ANIMATED_LENGTH(Cy, cy)
-        DECLARE_ANIMATED_LENGTH(R, r)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedLengthAttribute m_cx { LengthModeWidth };
+    SVGAnimatedLengthAttribute m_cy { LengthModeHeight };
+    SVGAnimatedLengthAttribute m_r { LengthModeOther };
 };
 
 } // namespace WebCore
index 0fa276a..bdd35d7 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
  * Copyright (C) Research In Motion Limited 2009-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
@@ -33,22 +34,12 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGClipPathElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_ENUMERATION(SVGClipPathElement, SVGNames::clipPathUnitsAttr, ClipPathUnits, clipPathUnits, SVGUnitTypes::SVGUnitType)
-DEFINE_ANIMATED_BOOLEAN(SVGClipPathElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGClipPathElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(clipPathUnits)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGClipPathElement::SVGClipPathElement(const QualifiedName& tagName, Document& document)
     : SVGGraphicsElement(tagName, document)
-    , m_clipPathUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
+    , SVGExternalResourcesRequired(this)
 {
     ASSERT(hasTagName(SVGNames::clipPathTag));
-    registerAnimatedPropertiesForSVGClipPathElement();
+    registerAttributes();
 }
 
 Ref<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& tagName, Document& document)
@@ -56,16 +47,12 @@ Ref<SVGClipPathElement> SVGClipPathElement::create(const QualifiedName& tagName,
     return adoptRef(*new SVGClipPathElement(tagName, document));
 }
 
-bool SVGClipPathElement::isSupportedAttribute(const QualifiedName& attrName)
+void SVGClipPathElement::registerAttributes()
 {
-    static const auto supportedAttributes = makeNeverDestroyed([] {
-        HashSet<QualifiedName> set;
-        SVGLangSpace::addSupportedAttributes(set);
-        SVGExternalResourcesRequired::addSupportedAttributes(set);
-        set.add(SVGNames::clipPathUnitsAttr);
-        return set;
-    }());
-    return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::clipPathUnitsAttr, SVGUnitTypes::SVGUnitType, &SVGClipPathElement::m_clipPathUnits>();
 }
 
 void SVGClipPathElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -73,7 +60,7 @@ void SVGClipPathElement::parseAttribute(const QualifiedName& name, const AtomicS
     if (name == SVGNames::clipPathUnitsAttr) {
         auto propertyValue = SVGPropertyTraits<SVGUnitTypes::SVGUnitType>::fromString(value);
         if (propertyValue > 0)
-            setClipPathUnitsBaseValue(propertyValue);
+            m_clipPathUnits.setValue(propertyValue);
         return;
     }
 
@@ -83,15 +70,16 @@ void SVGClipPathElement::parseAttribute(const QualifiedName& name, const AtomicS
 
 void SVGClipPathElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (!isSupportedAttribute(attrName)) {
-        SVGGraphicsElement::svgAttributeChanged(attrName);
+    if (isKnownAttribute(attrName)) {
+        InstanceInvalidationGuard guard(*this);
+
+        if (RenderObject* object = renderer())
+            object->setNeedsLayout();
         return;
     }
 
-    InstanceInvalidationGuard guard(*this);
-
-    if (RenderObject* object = renderer())
-        object->setNeedsLayout();
+    SVGGraphicsElement::svgAttributeChanged(attrName);
+    SVGExternalResourcesRequired::svgAttributeChanged(attrName);
 }
 
 void SVGClipPathElement::childrenChanged(const ChildChange& change)
index a11c49f..63b6bde 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
+ * 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
@@ -35,24 +36,30 @@ class SVGClipPathElement final : public SVGGraphicsElement, public SVGExternalRe
 public:
     static Ref<SVGClipPathElement> create(const QualifiedName&, Document&);
 
+    SVGUnitTypes::SVGUnitType clipPathUnits() const { return m_clipPathUnits.currentValue(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> clipPathUnitsAnimated() { return m_clipPathUnits.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGClipPathElement(const QualifiedName&, Document&);
 
-    bool isValid() const final { return SVGTests::isValid(); }
-    bool supportsFocus() const final { return false; }
-    bool needsPendingResourceHandling() const final { return false; }
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGClipPathElement, SVGGraphicsElement, SVGExternalResourcesRequired>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
 
-    static bool isSupportedAttribute(const QualifiedName&);
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
     void childrenChanged(const ChildChange&) final;
 
+    bool isValid() const final { return SVGTests::isValid(); }
+    bool supportsFocus() const final { return false; }
+    bool needsPendingResourceHandling() const final { return false; }
+
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGClipPathElement)
-        DECLARE_ANIMATED_ENUMERATION(ClipPathUnits, clipPathUnits, SVGUnitTypes::SVGUnitType)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedEnumerationAttribute<SVGUnitTypes::SVGUnitType> m_clipPathUnits { SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE };
 };
 
 } // namespace WebCore
index 198e635..4e2032b 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -31,47 +32,24 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGComponentTransferFunctionElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_ENUMERATION(SVGComponentTransferFunctionElement, SVGNames::typeAttr, Type, type, ComponentTransferType)
-DEFINE_ANIMATED_NUMBER_LIST(SVGComponentTransferFunctionElement, SVGNames::tableValuesAttr, TableValues, tableValues)
-DEFINE_ANIMATED_NUMBER(SVGComponentTransferFunctionElement, SVGNames::slopeAttr, Slope, slope)
-DEFINE_ANIMATED_NUMBER(SVGComponentTransferFunctionElement, SVGNames::interceptAttr, Intercept, intercept)
-DEFINE_ANIMATED_NUMBER(SVGComponentTransferFunctionElement, SVGNames::amplitudeAttr, Amplitude, amplitude)
-DEFINE_ANIMATED_NUMBER(SVGComponentTransferFunctionElement, SVGNames::exponentAttr, Exponent, exponent)
-DEFINE_ANIMATED_NUMBER(SVGComponentTransferFunctionElement, SVGNames::offsetAttr, Offset, offset)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGComponentTransferFunctionElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(type)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(tableValues)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(slope)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(intercept)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(amplitude)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(exponent)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(offset)
-END_REGISTER_ANIMATED_PROPERTIES
-
 SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const QualifiedName& tagName, Document& document)
     : SVGElement(tagName, document)
-    , m_type(FECOMPONENTTRANSFER_TYPE_IDENTITY)
-    , m_slope(1)
-    , m_amplitude(1)
-    , m_exponent(1)
 {
-    registerAnimatedPropertiesForSVGComponentTransferFunctionElement();
+    registerAttributes();
 }
 
-bool SVGComponentTransferFunctionElement::isSupportedAttribute(const QualifiedName& attrName)
+void SVGComponentTransferFunctionElement::registerAttributes()
 {
-    static const auto supportedAttributes = makeNeverDestroyed(HashSet<QualifiedName> {
-        SVGNames::typeAttr,
-        SVGNames::tableValuesAttr,
-        SVGNames::slopeAttr,
-        SVGNames::interceptAttr,
-        SVGNames::amplitudeAttr,
-        SVGNames::exponentAttr,
-        SVGNames::offsetAttr,
-    });
-    return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::typeAttr, ComponentTransferType, &SVGComponentTransferFunctionElement::m_type>();
+    registry.registerAttribute<SVGNames::tableValuesAttr, &SVGComponentTransferFunctionElement::m_tableValues>();
+    registry.registerAttribute<SVGNames::slopeAttr, &SVGComponentTransferFunctionElement::m_slope>();
+    registry.registerAttribute<SVGNames::interceptAttr, &SVGComponentTransferFunctionElement::m_intercept>();
+    registry.registerAttribute<SVGNames::amplitudeAttr, &SVGComponentTransferFunctionElement::m_amplitude>();
+    registry.registerAttribute<SVGNames::exponentAttr, &SVGComponentTransferFunctionElement::m_exponent>();
+    registry.registerAttribute<SVGNames::offsetAttr, &SVGComponentTransferFunctionElement::m_offset>();
 }
 
 void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -79,40 +57,40 @@ void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& na
     if (name == SVGNames::typeAttr) {
         ComponentTransferType propertyValue = SVGPropertyTraits<ComponentTransferType>::fromString(value);
         if (propertyValue > 0)
-            setTypeBaseValue(propertyValue);
+            m_type.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::tableValuesAttr) {
         SVGNumberListValues newList;
         newList.parse(value);
-        detachAnimatedTableValuesListWrappers(newList.size());
-        setTableValuesBaseValue(newList);
+        m_tableValues.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
+        m_tableValues.setValue(WTFMove(newList));
         return;
     }
 
     if (name == SVGNames::slopeAttr) {
-        setSlopeBaseValue(value.toFloat());
+        m_slope.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::interceptAttr) {
-        setInterceptBaseValue(value.toFloat());
+        m_intercept.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::amplitudeAttr) {
-        setAmplitudeBaseValue(value.toFloat());
+        m_amplitude.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::exponentAttr) {
-        setExponentBaseValue(value.toFloat());
+        m_exponent.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::offsetAttr) {
-        setOffsetBaseValue(value.toFloat());
+        m_offset.setValue(value.toFloat());
         return;
     }
 
@@ -121,27 +99,26 @@ void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& na
 
 void SVGComponentTransferFunctionElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (!isSupportedAttribute(attrName)) {
-        SVGElement::svgAttributeChanged(attrName);
+    if (isKnownAttribute(attrName)) {
+        InstanceInvalidationGuard guard(*this);
+        invalidateFilterPrimitiveParent(this);
         return;
     }
 
-    InstanceInvalidationGuard guard(*this);
-
-    invalidateFilterPrimitiveParent(this);
+    SVGElement::svgAttributeChanged(attrName);
 }
 
 ComponentTransferFunction SVGComponentTransferFunctionElement::transferFunction() const
 {
-    ComponentTransferFunction func;
-    func.type = type();
-    func.slope = slope();
-    func.intercept = intercept();
-    func.amplitude = amplitude();
-    func.exponent = exponent();
-    func.offset = offset();
-    func.tableValues = tableValues();
-    return func;
+    return {
+        type(),
+        slope(),
+        intercept(),
+        amplitude(),
+        exponent(),
+        offset(),
+        tableValues()
+    };
 }
 
 }
index 701ca05..9f46bec 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -74,26 +75,45 @@ class SVGComponentTransferFunctionElement : public SVGElement {
 public:
     ComponentTransferFunction transferFunction() const;
 
+    ComponentTransferType type() const { return m_type.currentValue(attributeOwnerProxy()); }
+    const SVGNumberListValues& tableValues() const { return m_tableValues.currentValue(attributeOwnerProxy()); }
+    float slope() const { return m_slope.currentValue(attributeOwnerProxy()); }
+    float intercept() const { return m_intercept.currentValue(attributeOwnerProxy()); }
+    float amplitude() const { return m_amplitude.currentValue(attributeOwnerProxy()); }
+    float exponent() const { return m_exponent.currentValue(attributeOwnerProxy()); }
+    float offset() const { return m_offset.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedEnumeration> typeAnimated() { return m_type.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumberList> tableValuesAnimated() { return m_tableValues.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> slopeAnimated() { return m_slope.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> interceptAnimated() { return m_intercept.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> amplitudeAnimated() { return m_amplitude.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> exponentAnimated() { return m_exponent.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> offsetAnimated() { return m_offset.animatedProperty(attributeOwnerProxy()); }
+
 protected:
     SVGComponentTransferFunctionElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGComponentTransferFunctionElement, SVGElement>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const override { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
 
     bool rendererIsNeeded(const RenderStyle&) override { return false; }
     
 private:
-    static bool isSupportedAttribute(const QualifiedName&);
-
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGComponentTransferFunctionElement)
-        DECLARE_ANIMATED_ENUMERATION(Type, type, ComponentTransferType)
-        DECLARE_ANIMATED_NUMBER_LIST(TableValues, tableValues)
-        DECLARE_ANIMATED_NUMBER(Slope, slope)
-        DECLARE_ANIMATED_NUMBER(Intercept, intercept)
-        DECLARE_ANIMATED_NUMBER(Amplitude, amplitude)
-        DECLARE_ANIMATED_NUMBER(Exponent, exponent)
-        DECLARE_ANIMATED_NUMBER(Offset, offset)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedEnumerationAttribute<ComponentTransferType> m_type { FECOMPONENTTRANSFER_TYPE_IDENTITY };
+    SVGAnimatedNumberListAttribute m_tableValues;
+    SVGAnimatedNumberAttribute m_slope { 1 };
+    SVGAnimatedNumberAttribute m_intercept;
+    SVGAnimatedNumberAttribute m_amplitude { 1 };
+    SVGAnimatedNumberAttribute m_exponent { 1 };
+    SVGAnimatedNumberAttribute m_offset;
 };
 
 } // namespace WebCore
index 070bfde..8dd70f2 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+ * 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
@@ -33,27 +34,14 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGCursorElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_LENGTH(SVGCursorElement, SVGNames::xAttr, X, x)
-DEFINE_ANIMATED_LENGTH(SVGCursorElement, SVGNames::yAttr, Y, y)
-DEFINE_ANIMATED_STRING(SVGCursorElement, XLinkNames::hrefAttr, Href, href)
-DEFINE_ANIMATED_BOOLEAN(SVGCursorElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGCursorElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(x)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(y)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(href)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGTests)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGCursorElement::SVGCursorElement(const QualifiedName& tagName, Document& document)
     : SVGElement(tagName, document)
-    , m_x(LengthModeWidth)
-    , m_y(LengthModeHeight)
+    , SVGExternalResourcesRequired(this)
+    , SVGTests(this)
+    , SVGURIReference(this)
 {
     ASSERT(hasTagName(SVGNames::cursorTag));
-    registerAnimatedPropertiesForSVGCursorElement();
+    registerAttributes();
 }
 
 Ref<SVGCursorElement> SVGCursorElement::create(const QualifiedName& tagName, Document& document)
@@ -67,17 +55,13 @@ SVGCursorElement::~SVGCursorElement()
         client->cursorElementRemoved(*this);
 }
 
-bool SVGCursorElement::isSupportedAttribute(const QualifiedName& attrName)
+void SVGCursorElement::registerAttributes()
 {
-    static const auto supportedAttributes = makeNeverDestroyed([] {
-        HashSet<QualifiedName> set;
-        SVGTests::addSupportedAttributes(set);
-        SVGExternalResourcesRequired::addSupportedAttributes(set);
-        SVGURIReference::addSupportedAttributes(set);
-        set.add({ SVGNames::xAttr.get(), SVGNames::yAttr.get() });
-        return set;
-    }());
-    return supportedAttributes.get().contains<SVGAttributeHashTranslator>(attrName);
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::xAttr, &SVGCursorElement::m_x>();
+    registry.registerAttribute<SVGNames::yAttr, &SVGCursorElement::m_y>();
 }
 
 void SVGCursorElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -85,9 +69,9 @@ void SVGCursorElement::parseAttribute(const QualifiedName& name, const AtomicStr
     SVGParsingError parseError = NoError;
 
     if (name == SVGNames::xAttr)
-        setXBaseValue(SVGLengthValue::construct(LengthModeWidth, value, parseError));
+        m_x.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError));
     else if (name == SVGNames::yAttr)
-        setYBaseValue(SVGLengthValue::construct(LengthModeHeight, value, parseError));
+        m_y.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError));
 
     reportAttributeParsingError(parseError, name, value);
 
@@ -109,14 +93,14 @@ void SVGCursorElement::removeClient(CSSCursorImageValue& value)
 
 void SVGCursorElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (!isSupportedAttribute(attrName)) {
-        SVGElement::svgAttributeChanged(attrName);
+    if (isKnownAttribute(attrName)) {
+        InstanceInvalidationGuard guard(*this);
+        for (auto& client : m_clients)
+            client->cursorElementChanged(*this);
         return;
     }
 
-    InstanceInvalidationGuard guard(*this);
-    for (auto& client : m_clients)
-        client->cursorElementChanged(*this);
+    SVGElement::svgAttributeChanged(attrName);
 }
 
 void SVGCursorElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
@@ -126,19 +110,4 @@ void SVGCursorElement::addSubresourceAttributeURLs(ListHashSet<URL>& urls) const
     addSubresourceURL(urls, document().completeURL(href()));
 }
 
-Ref<SVGStringList> SVGCursorElement::requiredFeatures()
-{
-    return SVGTests::requiredFeatures(*this);
-}
-
-Ref<SVGStringList> SVGCursorElement::requiredExtensions()
-{ 
-    return SVGTests::requiredExtensions(*this);
-}
-
-Ref<SVGStringList> SVGCursorElement::systemLanguage()
-{
-    return SVGTests::systemLanguage(*this);
-}
-
 }
index 37eebb0..2a71c62 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
+ * 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
@@ -32,7 +33,7 @@ namespace WebCore {
 
 class CSSCursorImageValue;
 
-class SVGCursorElement final : public SVGElement, public SVGTests, public SVGExternalResourcesRequired, public SVGURIReference {
+class SVGCursorElement final : public SVGElement, public SVGExternalResourcesRequired, public SVGTests, public SVGURIReference {
     WTF_MAKE_ISO_ALLOCATED(SVGCursorElement);
 public:
     static Ref<SVGCursorElement> create(const QualifiedName&, Document&);
@@ -42,36 +43,32 @@ public:
     void addClient(CSSCursorImageValue&);
     void removeClient(CSSCursorImageValue&);
 
-    // SVGTests
-    Ref<SVGStringList> requiredFeatures();
-    Ref<SVGStringList> requiredExtensions();
-    Ref<SVGStringList> systemLanguage();
+    const SVGLengthValue& x() const { return m_x.currentValue(attributeOwnerProxy()); }
+    const SVGLengthValue& y() const { return m_y.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedLength> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedLength> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); }
 
 private:
     SVGCursorElement(const QualifiedName&, Document&);
 
-    bool isValid() const final { return SVGTests::isValid(); }
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGCursorElement, SVGElement, SVGExternalResourcesRequired, SVGTests, SVGURIReference>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
 
-    static bool isSupportedAttribute(const QualifiedName&);
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
 
+    bool isValid() const final { return SVGTests::isValid(); }
     bool rendererIsNeeded(const RenderStyle&) final { return false; }
 
     void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGCursorElement)
-        DECLARE_ANIMATED_LENGTH(X, x)
-        DECLARE_ANIMATED_LENGTH(Y, y)
-        DECLARE_ANIMATED_STRING_OVERRIDE(Href, href)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
-
-    // SVGTests
-    void synchronizeRequiredFeatures() final { SVGTests::synchronizeRequiredFeatures(*this); }
-    void synchronizeRequiredExtensions() final { SVGTests::synchronizeRequiredExtensions(*this); }
-    void synchronizeSystemLanguage() final { SVGTests::synchronizeSystemLanguage(*this); }
-
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedLengthAttribute m_x { LengthModeWidth };
+    SVGAnimatedLengthAttribute m_y { LengthModeHeight };
     HashSet<CSSCursorImageValue*> m_clients;
 };
 
index c6a0f3d..acbe55e 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,19 +30,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGDefsElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_BOOLEAN(SVGDefsElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGDefsElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGraphicsElement)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGDefsElement::SVGDefsElement(const QualifiedName& tagName, Document& document)
     : SVGGraphicsElement(tagName, document)
+    , SVGExternalResourcesRequired(this)
 {
     ASSERT(hasTagName(SVGNames::defsTag));
-    registerAnimatedPropertiesForSVGDefsElement();
 }
 
 Ref<SVGDefsElement> SVGDefsElement::create(const QualifiedName& tagName, Document& document)
index 64495fd..df3c040 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -34,14 +35,15 @@ public:
 private:
     SVGDefsElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGDefsElement, SVGGraphicsElement, SVGExternalResourcesRequired>;
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
+
     bool isValid() const final;
     bool supportsFocus() const final { return false; }
 
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGDefsElement)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
 };
 
 } // namespace WebCore
index 55898ee..1b7214b 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-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2018 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.
@@ -64,13 +64,6 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGElement, HTMLNames::classAttr, ClassName, className)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(className)
-END_REGISTER_ANIMATED_PROPERTIES
-
 static NEVER_INLINE HashMap<AtomicStringImpl*, CSSPropertyID> createAttributeNameToCSSPropertyIDMap()
 {
     using namespace HTMLNames;
@@ -282,8 +275,9 @@ static inline const HashMap<QualifiedName::QualifiedNameImpl*, AnimatedPropertyT
 
 SVGElement::SVGElement(const QualifiedName& tagName, Document& document)
     : StyledElement(tagName, document, CreateSVGElement)
+    , SVGLangSpace(this)
 {
-    registerAnimatedPropertiesForSVGElement();
+    registerAttributes();
 }
 
 SVGElement::~SVGElement()
@@ -458,10 +452,18 @@ 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) {
-        setClassNameBaseValue(value);
+        m_className.setValue(value);
         return;
     }
 
@@ -484,7 +486,7 @@ void SVGElement::parseAttribute(const QualifiedName& name, const AtomicString& v
 
 Vector<AnimatedPropertyType> SVGElement::animatedPropertyTypesForAttribute(const QualifiedName& attributeName)
 {
-    auto types = localAttributeToPropertyMap().types(attributeName);
+    auto types = animatedTypes(attributeName);
     if (!types.isEmpty())
         return types;
 
@@ -695,7 +697,7 @@ void SVGElement::synchronizeAllAnimatedSVGAttribute(SVGElement* svgElement)
     ASSERT(svgElement->elementData());
     ASSERT(svgElement->elementData()->animatedSVGAttributesAreDirty());
 
-    svgElement->localAttributeToPropertyMap().synchronizeProperties(*svgElement);
+    svgElement->synchronizeAttributes();
     svgElement->elementData()->setAnimatedSVGAttributesAreDirty(false);
 }
 
@@ -708,25 +710,7 @@ void SVGElement::synchronizeAnimatedSVGAttribute(const QualifiedName& name) cons
     if (name == anyQName())
         synchronizeAllAnimatedSVGAttribute(nonConstThis);
     else
-        nonConstThis->localAttributeToPropertyMap().synchronizeProperty(*nonConstThis, name);
-}
-
-void SVGElement::synchronizeRequiredFeatures(SVGElement* contextElement)
-{
-    ASSERT(contextElement);
-    contextElement->synchronizeRequiredFeatures();
-}
-
-void SVGElement::synchronizeRequiredExtensions(SVGElement* contextElement)
-{
-    ASSERT(contextElement);
-    contextElement->synchronizeRequiredExtensions();
-}
-
-void SVGElement::synchronizeSystemLanguage(SVGElement* contextElement)
-{
-    ASSERT(contextElement);
-    contextElement->synchronizeSystemLanguage();
+        nonConstThis->synchronizeAttribute(name);
 }
 
 std::optional<ElementStyle> SVGElement::resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle*)
@@ -939,7 +923,7 @@ bool SVGElement::isAnimatableCSSProperty(const QualifiedName& attributeName)
 
 bool SVGElement::isPresentationAttributeWithSVGDOM(const QualifiedName& attributeName)
 {
-    return !localAttributeToPropertyMap().types(attributeName).isEmpty();
+    return !animatedTypes(attributeName).isEmpty();
 }
 
 bool SVGElement::isPresentationAttribute(const QualifiedName& name) const
@@ -956,11 +940,6 @@ void SVGElement::collectStyleForPresentationAttribute(const QualifiedName& name,
         addPropertyToPresentationAttributeStyle(style, propertyID, value);
 }
 
-bool SVGElement::isKnownAttribute(const QualifiedName& attrName)
-{
-    return attrName == HTMLNames::idAttr;
-}
-
 void SVGElement::svgAttributeChanged(const QualifiedName& attrName)
 {
     CSSPropertyID propId = cssPropertyIdForSVGAttributeName(attrName);
@@ -985,6 +964,8 @@ void SVGElement::svgAttributeChanged(const QualifiedName& attrName)
         invalidateInstances();
         return;
     }
+
+    SVGLangSpace::svgAttributeChanged(attrName);
 }
 
 Node::InsertedIntoAncestorResult SVGElement::insertedIntoAncestor(InsertionType insertionType, ContainerNode& parentOfInsertedTree)
index e3d1358..cf60b8d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
- * Copyright (C) 2009-2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2018 Apple Inc. All rights reserved.
  * Copyright (C) 2013 Samsung Electronics. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
 #pragma once
 
 #include "SVGAnimatedString.h"
+#include "SVGAttributeOwnerProxy.h"
 #include "SVGLangSpace.h"
 #include "SVGLocatable.h"
 #include "SVGNames.h"
 #include "SVGParsingError.h"
-#include "SVGPropertyInfo.h"
 #include "StyledElement.h"
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
@@ -38,7 +38,6 @@ class AffineTransform;
 class CSSStyleDeclaration;
 class DeprecatedCSSOMValue;
 class Document;
-class SVGAttributeToPropertyMap;
 class SVGDocumentExtensions;
 class SVGElementRareData;
 class SVGSVGElement;
@@ -57,7 +56,6 @@ public:
     String title() const override;
     static bool isAnimatableCSSProperty(const QualifiedName&);
     bool isPresentationAttributeWithSVGDOM(const QualifiedName&);
-    bool isKnownAttribute(const QualifiedName&);
     RefPtr<DeprecatedCSSOMValue> getPresentationAttribute(const String& name);
     virtual bool supportsMarkers() const { return false; }
     bool hasRelativeLengths() const { return !m_elementsWithRelativeLengths.isEmpty(); }
@@ -109,14 +107,6 @@ public:
  
     std::optional<ElementStyle> resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle) override;
 
-    static void synchronizeRequiredFeatures(SVGElement* contextElement);
-    static void synchronizeRequiredExtensions(SVGElement* contextElement);
-    static void synchronizeSystemLanguage(SVGElement* contextElement);
-
-    virtual void synchronizeRequiredFeatures() { }
-    virtual void synchronizeRequiredExtensions() { }
-    virtual void synchronizeSystemLanguage() { }
-
     static QualifiedName animatableAttributeForName(const AtomicString&);
 #ifndef NDEBUG
     bool isAnimatableAttribute(const QualifiedName&) const;
@@ -138,6 +128,29 @@ public:
     void callClearTarget() { clearTarget(); }
 
     class InstanceUpdateBlocker;
+    class InstanceInvalidationGuard;
+
+    // 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.
+    virtual const SVGAttributeOwnerProxy& attributeOwnerProxy() const { return m_attributeOwnerProxy; }
+
+    // Helper functions which return info for the super class' attributes.
+    void synchronizeAttribute(const QualifiedName& name) { attributeOwnerProxy().synchronizeAttribute(name); }
+    void synchronizeAttributes() { attributeOwnerProxy().synchronizeAttributes(); }
+    Vector<AnimatedPropertyType> animatedTypes(const QualifiedName& attributeName) const { return attributeOwnerProxy().animatedTypes(attributeName); }
+    RefPtr<SVGAnimatedProperty> lookupAnimatedProperty(const SVGAttribute& attribute) const { return attributeOwnerProxy().lookupAnimatedProperty(attribute); }
+    RefPtr<SVGAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute& attribute) { return attributeOwnerProxy().lookupOrCreateAnimatedProperty(attribute); }
+    Vector<RefPtr<SVGAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& name) { return attributeOwnerProxy().lookupOrCreateAnimatedProperties(name); }
+
+    // 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()); }
 
 protected:
     SVGElement(const QualifiedName&, Document&);
@@ -169,8 +182,6 @@ protected:
 
     void willRecalcStyle(Style::Change) override;
 
-    class InstanceInvalidationGuard;
-
 private:
     const RenderStyle* computedStyle(PseudoId = PseudoId::None) final;
 
@@ -189,10 +200,8 @@ private:
 
     HashSet<SVGElement*> m_elementsWithRelativeLengths;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES_BASE(SVGElement)
-        DECLARE_ANIMATED_STRING(ClassName, className)
-    END_DECLARE_ANIMATED_PROPERTIES
-
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_className;
 };
 
 class SVGElement::InstanceInvalidationGuard {
index 96a6774..0a54b18 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+ * 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
 #include "config.h"
 #include "SVGEllipseElement.h"
 
-#include "FloatPoint.h"
 #include "RenderSVGEllipse.h"
-#include "RenderSVGPath.h"
 #include "RenderSVGResource.h"
-#include "SVGLengthValue.h"
-#include "SVGNames.h"
 #include <wtf/IsoMallocInlines.h>
 
 namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGEllipseElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::cxAttr, Cx, cx)
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::cyAttr, Cy, cy)
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::rxAttr, Rx, rx)
-DEFINE_ANIMATED_LENGTH(SVGEllipseElement, SVGNames::ryAttr, Ry, ry)
-DEFINE_ANIMATED_BOOLEAN(SVGEllipseElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGEllipseElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(cx)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(cy)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(rx)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(ry)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGGeometryElement)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGEllipseElement::SVGEllipseElement(const QualifiedName& tagName, Document& document)
     : SVGGeometryElement(tagName, document)
-    , m_cx(LengthModeWidth)
-    , m_cy(LengthModeHeight)
-    , m_rx(LengthModeWidth)
-    , m_ry(LengthModeHeight)
+    , SVGExternalResourcesRequired(this)
 {
     ASSERT(hasTagName(SVGNames::ellipseTag));
-    registerAnimatedPropertiesForSVGEllipseElement();
+    registerAttributes();
 }    
 
 Ref<SVGEllipseElement> SVGEllipseElement::create(const QualifiedName& tagName, Document& document)
@@ -65,42 +43,46 @@ Ref<SVGEllipseElement> SVGEllipseElement::create(const QualifiedName& tagName, D
     return adoptRef(*new SVGEllipseElement(tagName, document));
 }
 
+void SVGEllipseElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::cxAttr, &SVGEllipseElement::m_cx>();
+    registry.registerAttribute<SVGNames::cyAttr, &SVGEllipseElement::m_cy>();
+    registry.registerAttribute<SVGNames::rxAttr, &SVGEllipseElement::m_rx>();
+    registry.registerAttribute<SVGNames::ryAttr, &SVGEllipseElement::m_ry>();
+}
+
 void SVGEllipseElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     SVGParsingError parseError = NoError;
 
     if (name == SVGNames::cxAttr)
-        setCxBaseValue(SVGLengthValue::construct(LengthModeWidth, value, parseError));
+        m_cx.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError));
     else if (name == SVGNames::cyAttr)
-        setCyBaseValue(SVGLengthValue::construct(LengthModeHeight, value, parseError));
+        m_cy.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError));
     else if (name == SVGNames::rxAttr)
-        setRxBaseValue(SVGLengthValue::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
+        m_rx.setValue(SVGLengthValue::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths));
     else if (name == SVGNames::ryAttr)
-        setRyBaseValue(SVGLengthValue::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
+        m_ry.setValue(SVGLengthValue::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths));
 
     reportAttributeParsingError(parseError, name, value);
 
-    SVGGraphicsElement::parseAttribute(name, value);
+    SVGGeometryElement::parseAttribute(name, value);
     SVGExternalResourcesRequired::parseAttribute(name, value);
 }
 
 void SVGEllipseElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (attrName == SVGNames::cxAttr || attrName == SVGNames::cyAttr || attrName == SVGNames::rxAttr || attrName == SVGNames::ryAttr) {
+    if (isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidateSVGPresentationAttributeStyle();
         return;
     }
 
-    if (SVGLangSpace::isKnownAttribute(attrName) || SVGExternalResourcesRequired::isKnownAttribute(attrName)) {
-        if (auto* renderer = downcast<RenderSVGShape>(this->renderer())) {
-            InstanceInvalidationGuard guard(*this);
-            RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
-        }
-        return;
-    }
-
-    SVGGraphicsElement::svgAttributeChanged(attrName);
+    SVGGeometryElement::svgAttributeChanged(attrName);
+    SVGExternalResourcesRequired::svgAttributeChanged(attrName);
 }
 
 RenderPtr<RenderElement> SVGEllipseElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
index 2570327..9daaea8 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
+ * 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
 
 #pragma once
 
-#include "SVGAnimatedBoolean.h"
 #include "SVGAnimatedLength.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGGeometryElement.h"
+#include "SVGNames.h"
 
 namespace WebCore {
 
@@ -32,25 +33,38 @@ class SVGEllipseElement final : public SVGGeometryElement, public SVGExternalRes
 public:
     static Ref<SVGEllipseElement> create(const QualifiedName&, Document&);
 
+    const SVGLengthValue& cx() const { return m_cx.currentValue(attributeOwnerProxy()); }
+    const SVGLengthValue& cy() const { return m_cy.currentValue(attributeOwnerProxy()); }
+    const SVGLengthValue& rx() const { return m_rx.currentValue(attributeOwnerProxy()); }
+    const SVGLengthValue& ry() const { return m_ry.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedLength> cxAnimated() { return m_cx.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedLength> cyAnimated() { return m_cy.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedLength> rxAnimated() { return m_rx.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedLength> ryAnimated() { return m_ry.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGEllipseElement(const QualifiedName&, Document&);
-    
-    bool isValid() const final { return SVGTests::isValid(); }
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGEllipseElement, SVGGeometryElement, SVGExternalResourcesRequired>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
 
+    bool isValid() const final { return SVGTests::isValid(); }
     bool selfHasRelativeLengths() const final { return true; }
 
     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGEllipseElement)
-        DECLARE_ANIMATED_LENGTH(Cx, cx)
-        DECLARE_ANIMATED_LENGTH(Cy, cy)
-        DECLARE_ANIMATED_LENGTH(Rx, rx)
-        DECLARE_ANIMATED_LENGTH(Ry, ry)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedLengthAttribute m_cx { LengthModeWidth };
+    SVGAnimatedLengthAttribute m_cy { LengthModeHeight };
+    SVGAnimatedLengthAttribute m_rx { LengthModeWidth };
+    SVGAnimatedLengthAttribute m_ry { LengthModeHeight };
 };
 
 } // namespace WebCore
index b0d38ec..3a1e56d 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
+ * 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
 
 namespace WebCore {
 
-void SVGExternalResourcesRequired::parseAttribute(const QualifiedName& name, const AtomicString& value)
+SVGExternalResourcesRequired::SVGExternalResourcesRequired(SVGElement* contextElement)
+    : m_contextElement(*contextElement)
 {
-    if (name == SVGNames::externalResourcesRequiredAttr)
-        setExternalResourcesRequiredBaseValue(value == "true");
+    registerAttributes();
 }
 
-bool SVGExternalResourcesRequired::isKnownAttribute(const QualifiedName& attrName)
+void SVGExternalResourcesRequired::registerAttributes()
 {
-    return attrName == SVGNames::externalResourcesRequiredAttr;
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::externalResourcesRequiredAttr, &SVGEllipseElement::m_externalResourcesRequired>();
 }
 
-void SVGExternalResourcesRequired::addSupportedAttributes(HashSet<QualifiedName>& supportedAttributes)
+void SVGExternalResourcesRequired::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
-    supportedAttributes.add(SVGNames::externalResourcesRequiredAttr);
+    if (name == SVGNames::externalResourcesRequiredAttr)
+        setExternalResourcesRequired(value == "true");
 }
 
-bool SVGExternalResourcesRequired::handleAttributeChange(SVGElement* targetElement, const QualifiedName& attrName)
+void SVGExternalResourcesRequired::svgAttributeChanged(const QualifiedName& attrName)
 {
-    ASSERT(targetElement);
     if (!isKnownAttribute(attrName))
-        return false;
-    if (!targetElement->isConnected())
-        return true;
+        return;
+    if (!m_contextElement.isConnected())
+        return;
 
     // Handle dynamic updates of the 'externalResourcesRequired' attribute. Only possible case: changing from 'true' to 'false'
     // causes an immediate dispatch of the SVGLoad event. If the attribute value was 'false' before inserting the script element
     // in the document, the SVGLoad event has already been dispatched.
-    if (!externalResourcesRequiredBaseValue() && !haveFiredLoadEvent() && !isParserInserted()) {
+    if (!externalResourcesRequired() && !haveFiredLoadEvent() && !isParserInserted()) {
         setHaveFiredLoadEvent(true);
-        ASSERT(targetElement->haveLoadedRequiredResources());
 
-        targetElement->sendSVGLoadEventIfPossible();
+        ASSERT(m_contextElement.haveLoadedRequiredResources());
+        m_contextElement.sendSVGLoadEventIfPossible();
     }
 
-    return true;
+    auto* renderer = m_contextElement.renderer();
+    if (renderer && is<RenderSVGShape>(renderer)) {
+        SVGElement::InstanceInvalidationGuard guard(m_contextElement);
+        RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
+    }
 }
 
-void SVGExternalResourcesRequired::dispatchLoadEvent(SVGElement* targetElement)
+void SVGExternalResourcesRequired::addSupportedAttributes(HashSet<QualifiedName>& supportedAttributes)
 {
-    bool externalResourcesRequired = externalResourcesRequiredBaseValue();
+    supportedAttributes.add(SVGNames::externalResourcesRequiredAttr);
+}
 
+void SVGExternalResourcesRequired::dispatchLoadEvent()
+{
     if (isParserInserted())
-        ASSERT(externalResourcesRequired != haveFiredLoadEvent());
+        ASSERT(externalResourcesRequired() != haveFiredLoadEvent());
     else if (haveFiredLoadEvent())
         return;
 
@@ -76,40 +87,40 @@ void SVGExternalResourcesRequired::dispatchLoadEvent(SVGElement* targetElement)
     // HTML fires the 'load' event after it sucessfully loaded a remote resource, otherwise an error event.
     // SVG fires the SVGLoad event immediately after parsing the <script> element, if externalResourcesRequired
     // is set to 'false', otherwise it dispatches the 'SVGLoad' event just after loading the remote resource.
-    if (!externalResourcesRequired)
+    if (!externalResourcesRequired())
         return;
 
     ASSERT(!haveFiredLoadEvent());
 
     // Dispatch SVGLoad event
     setHaveFiredLoadEvent(true);
-    ASSERT(targetElement->haveLoadedRequiredResources());
+    ASSERT(m_contextElement.haveLoadedRequiredResources());
 
-    targetElement->sendSVGLoadEventIfPossible();
+    m_contextElement.sendSVGLoadEventIfPossible();
 }
 
-void SVGExternalResourcesRequired::insertedIntoDocument(SVGElement* targetElement)
+void SVGExternalResourcesRequired::insertedIntoDocument()
 {
     if (isParserInserted())
         return;
 
     // Eventually send SVGLoad event now for the dynamically inserted script element.
-    if (externalResourcesRequiredBaseValue())
+    if (externalResourcesRequired())
         return;
     setHaveFiredLoadEvent(true);
-    targetElement->sendSVGLoadEventIfPossibleAsynchronously();
+    m_contextElement.sendSVGLoadEventIfPossibleAsynchronously();
 }
 
 void SVGExternalResourcesRequired::finishParsingChildren()
 {
     // A SVGLoad event has been fired by SVGElement::finishParsingChildren.
-    if (!externalResourcesRequiredBaseValue())
+    if (!externalResourcesRequired())
         setHaveFiredLoadEvent(true);
 }
 
 bool SVGExternalResourcesRequired::haveLoadedRequiredResources() const
 {
-    return !externalResourcesRequiredBaseValue() || haveFiredLoadEvent();
+    return !externalResourcesRequired() || haveFiredLoadEvent();
 }
 
 }
index 675c545..d25507a 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
+ * 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
@@ -21,6 +22,7 @@
 #pragma once
 
 #include "QualifiedName.h"
+#include "SVGAttributeOwnerProxyImpl.h"
 #include <wtf/HashSet.h>
 
 namespace WebCore {
@@ -33,29 +35,43 @@ class SVGElement;
 // states that externalResourcesRequired cannot be animated, the animVal will always be the same as the baseVal.
 // FIXME: When implementing animVal support, make sure that animVal==baseVal for externalResourcesRequired
 class SVGExternalResourcesRequired {
+    WTF_MAKE_NONCOPYABLE(SVGExternalResourcesRequired);
 public:
     virtual ~SVGExternalResourcesRequired() = default;
 
     void parseAttribute(const QualifiedName&, const AtomicString&);
+    void svgAttributeChanged(const QualifiedName&);
 
-    static bool isKnownAttribute(const QualifiedName&);
     static void addSupportedAttributes(HashSet<QualifiedName>&);
 
-    bool handleAttributeChange(SVGElement*, const QualifiedName&);
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGExternalResourcesRequired>;
+    static auto& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+
+    auto externalResourcesRequiredAnimated() { return m_externalResourcesRequired.animatedProperty(attributeOwnerProxy()); }
+
+    bool externalResourcesRequired() const { return m_externalResourcesRequired.value(); }
+    void setExternalResourcesRequired(bool externalResourcesRequired) { m_externalResourcesRequired.setValue(externalResourcesRequired); }
 
 protected:
-    // These types look a bit awkward, but have to match the generic types of the SVGAnimatedProperty macros.
-    virtual void setExternalResourcesRequiredBaseValue(const bool&, const bool validValue = true) = 0;
-    virtual bool& externalResourcesRequiredBaseValue() const = 0;
+    SVGExternalResourcesRequired(SVGElement* contextElement);
+
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
 
     virtual void setHaveFiredLoadEvent(bool) { }
     virtual bool isParserInserted() const { return false; }
     virtual bool haveFiredLoadEvent() const { return false; }
 
-    void dispatchLoadEvent(SVGElement*);
-    void insertedIntoDocument(SVGElement*);
+    void dispatchLoadEvent();
+    void insertedIntoDocument();
     void finishParsingChildren();
     bool haveLoadedRequiredResources() const;
+
+private:
+    static void registerAttributes();
+    AttributeOwnerProxy attributeOwnerProxy() { return { *this, m_contextElement }; }
+    
+    SVGElement& m_contextElement;
+    SVGAnimatedBooleanAttribute m_externalResourcesRequired;
 };
 
 } // namespace WebCore
index a7eba08..8c66d2c 100644 (file)
@@ -2,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -32,47 +33,44 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEBlendElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEBlendElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_STRING(SVGFEBlendElement, SVGNames::in2Attr, In2, in2)
-DEFINE_ANIMATED_ENUMERATION(SVGFEBlendElement, SVGNames::modeAttr, Mode, mode, BlendMode)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEBlendElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in2)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(mode)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_mode(BlendMode::Normal)
 {
     ASSERT(hasTagName(SVGNames::feBlendTag));
-    registerAnimatedPropertiesForSVGFEBlendElement();
+    registerAttributes();
 }
 
 Ref<SVGFEBlendElement> SVGFEBlendElement::create(const QualifiedName& tagName, Document& document)
 {
     return adoptRef(*new SVGFEBlendElement(tagName, document));
 }
+    
+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>();
+}
 
 void SVGFEBlendElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::modeAttr) {
         BlendMode mode = BlendMode::Normal;
         if (parseBlendMode(value, mode))
-            setModeBaseValue(mode);
+            m_mode.setValue(mode);
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::in2Attr) {
-        setIn2BaseValue(value);
+        m_in2.setValue(value);
         return;
     }
 
index 339ca65..d67baff 100644 (file)
@@ -2,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -45,19 +46,33 @@ 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()); }
+    BlendMode mode() const { return m_mode.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedString> in2Animated() { return m_in2.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> modeAnimated() { return m_mode.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEBlendElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEBlendElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEBlendElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_STRING(In2, in2)
-        DECLARE_ANIMATED_ENUMERATION(Mode, mode, BlendMode)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedStringAttribute m_in2;
+    SVGAnimatedEnumerationAttribute<BlendMode> m_mode { BlendMode::Normal };
 };
 
 } // namespace WebCore
index 249667d..515d32f 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -30,24 +31,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEColorMatrixElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEColorMatrixElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_ENUMERATION(SVGFEColorMatrixElement, SVGNames::typeAttr, Type, type, ColorMatrixType)
-DEFINE_ANIMATED_NUMBER_LIST(SVGFEColorMatrixElement, SVGNames::valuesAttr, Values, values)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEColorMatrixElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(type)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(values)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_type(FECOLORMATRIX_TYPE_MATRIX)
 {
     ASSERT(hasTagName(SVGNames::feColorMatrixTag));
-    registerAnimatedPropertiesForSVGFEColorMatrixElement();
+    registerAttributes();
 }
 
 Ref<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const QualifiedName& tagName, Document& document)
@@ -55,25 +43,35 @@ Ref<SVGFEColorMatrixElement> SVGFEColorMatrixElement::create(const QualifiedName
     return adoptRef(*new SVGFEColorMatrixElement(tagName, document));
 }
 
+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>();
+}
+
 void SVGFEColorMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::typeAttr) {
         auto propertyValue = SVGPropertyTraits<ColorMatrixType>::fromString(value);
         if (propertyValue > 0)
-            setTypeBaseValue(propertyValue);
+            m_type.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::valuesAttr) {
         SVGNumberListValues newList;
         newList.parse(value);
-        detachAnimatedValuesListWrappers(newList.size());
-        setValuesBaseValue(newList);
+        m_values.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
+        m_values.setValue(WTFMove(newList));
         return;
     }
 
index 2c5dafb..47688ec 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -69,19 +70,33 @@ class SVGFEColorMatrixElement final : public SVGFilterPrimitiveStandardAttribute
 public:
     static Ref<SVGFEColorMatrixElement> create(const QualifiedName&, Document&);
 
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    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()); }
+    RefPtr<SVGAnimatedEnumeration> typeAnimated() { return m_type.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumberList> valuesAnimated() { return m_values.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEColorMatrixElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEColorMatrixElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEColorMatrixElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_ENUMERATION(Type, type, ColorMatrixType)
-        DECLARE_ANIMATED_NUMBER_LIST(Values, values)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedEnumerationAttribute<ColorMatrixType> m_type { FECOLORMATRIX_TYPE_MATRIX };
+    SVGAnimatedNumberListAttribute m_values;
 };
 
 } // namespace WebCore
index f74c622..57faf3b 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -35,19 +36,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEComponentTransferElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEComponentTransferElement, SVGNames::inAttr, In1, in1)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEComponentTransferElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEComponentTransferElement::SVGFEComponentTransferElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feComponentTransferTag));
-    registerAnimatedPropertiesForSVGFEComponentTransferElement();
+    registerAttributes();
 }
 
 Ref<SVGFEComponentTransferElement> SVGFEComponentTransferElement::create(const QualifiedName& tagName, Document& document)
@@ -55,10 +48,18 @@ 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) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
index 84ee6e1..bd62b34 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,16 +30,24 @@ 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()); }
+
 private:
     SVGFEComponentTransferElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEComponentTransferElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static void registerAttributes();
+
     // FIXME: svgAttributeChanged missing.
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEComponentTransferElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
 };
 
 } // namespace WebCore
index aba3e41..a10e3a7 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -30,32 +31,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFECompositeElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFECompositeElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_STRING(SVGFECompositeElement, SVGNames::in2Attr, In2, in2)
-DEFINE_ANIMATED_ENUMERATION(SVGFECompositeElement, SVGNames::operatorAttr, SVGOperator, svgOperator, CompositeOperationType)
-DEFINE_ANIMATED_NUMBER(SVGFECompositeElement, SVGNames::k1Attr, K1, k1)
-DEFINE_ANIMATED_NUMBER(SVGFECompositeElement, SVGNames::k2Attr, K2, k2)
-DEFINE_ANIMATED_NUMBER(SVGFECompositeElement, SVGNames::k3Attr, K3, k3)
-DEFINE_ANIMATED_NUMBER(SVGFECompositeElement, SVGNames::k4Attr, K4, k4)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFECompositeElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in2)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(svgOperator)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(k1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(k2)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(k3)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(k4)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_svgOperator(FECOMPOSITE_OPERATOR_OVER)
 {
     ASSERT(hasTagName(SVGNames::feCompositeTag));
-    registerAnimatedPropertiesForSVGFECompositeElement();
+    registerAttributes();
 }
 
 Ref<SVGFECompositeElement> SVGFECompositeElement::create(const QualifiedName& tagName, Document& document)
@@ -63,42 +43,56 @@ Ref<SVGFECompositeElement> SVGFECompositeElement::create(const QualifiedName& ta
     return adoptRef(*new SVGFECompositeElement(tagName, document));
 }
 
+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>();
+    registry.registerAttribute<SVGNames::k1Attr, &SVGFECompositeElement::m_k1>();
+    registry.registerAttribute<SVGNames::k2Attr, &SVGFECompositeElement::m_k2>();
+    registry.registerAttribute<SVGNames::k3Attr, &SVGFECompositeElement::m_k3>();
+    registry.registerAttribute<SVGNames::k4Attr, &SVGFECompositeElement::m_k4>();
+}
+
 void SVGFECompositeElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::operatorAttr) {
         CompositeOperationType propertyValue = SVGPropertyTraits<CompositeOperationType>::fromString(value);
         if (propertyValue > 0)
-            setSVGOperatorBaseValue(propertyValue);
+            m_svgOperator.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::in2Attr) {
-        setIn2BaseValue(value);
+        m_in2.setValue(value);
         return;
     }
 
     if (name == SVGNames::k1Attr) {
-        setK1BaseValue(value.toFloat());
+        m_k1.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::k2Attr) {
-        setK2BaseValue(value.toFloat());
+        m_k2.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::k3Attr) {
-        setK3BaseValue(value.toFloat());
+        m_k3.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::k4Attr) {
-        setK4BaseValue(value.toFloat());
+        m_k4.setValue(value.toFloat());
         return;
     }
 
index 9836a1b..a123cc6 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -84,23 +85,45 @@ class SVGFECompositeElement final : public SVGFilterPrimitiveStandardAttributes
 public:
     static Ref<SVGFECompositeElement> create(const QualifiedName&, Document&);
 
+    String in1() { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in2() { return m_in2.currentValue(attributeOwnerProxy()); }
+    CompositeOperationType svgOperator() const { return m_svgOperator.currentValue(attributeOwnerProxy()); }
+    float k1() const { return m_k1.currentValue(attributeOwnerProxy()); }
+    float k2() const { return m_k2.currentValue(attributeOwnerProxy()); }
+    float k3() const { return m_k3.currentValue(attributeOwnerProxy()); }
+    float k4() const { return m_k4.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedString> in2Animated() { return m_in2.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> svgOperatorAnimated() { return m_svgOperator.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> k1Animated() { return m_k1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> k2Animated() { return m_k2.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> k3Animated() { return m_k3.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> k4Animated() { return m_k4.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFECompositeElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFECompositeElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFECompositeElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_STRING(In2, in2)
-        DECLARE_ANIMATED_ENUMERATION(SVGOperator, svgOperator, CompositeOperationType)
-        DECLARE_ANIMATED_NUMBER(K1, k1)
-        DECLARE_ANIMATED_NUMBER(K2, k2)
-        DECLARE_ANIMATED_NUMBER(K3, k3)
-        DECLARE_ANIMATED_NUMBER(K4, k4)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedStringAttribute m_in2;
+    SVGAnimatedEnumerationAttribute<CompositeOperationType> m_svgOperator { FECOMPOSITE_OPERATOR_OVER };
+    SVGAnimatedNumberAttribute m_k1;
+    SVGAnimatedNumberAttribute m_k2;
+    SVGAnimatedNumberAttribute m_k3;
+    SVGAnimatedNumberAttribute m_k4;
 };
 
 } // namespace WebCore
index d0fb611..e63b323 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
+ * 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
@@ -34,42 +35,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEConvolveMatrixElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEConvolveMatrixElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderXIdentifier(), OrderX, orderX)
-DEFINE_ANIMATED_INTEGER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::orderAttr, orderYIdentifier(), OrderY, orderY) 
-DEFINE_ANIMATED_NUMBER_LIST(SVGFEConvolveMatrixElement, SVGNames::kernelMatrixAttr, KernelMatrix, kernelMatrix)
-DEFINE_ANIMATED_NUMBER(SVGFEConvolveMatrixElement, SVGNames::divisorAttr, Divisor, divisor)
-DEFINE_ANIMATED_NUMBER(SVGFEConvolveMatrixElement, SVGNames::biasAttr, Bias, bias)
-DEFINE_ANIMATED_INTEGER(SVGFEConvolveMatrixElement, SVGNames::targetXAttr, TargetX, targetX)
-DEFINE_ANIMATED_INTEGER(SVGFEConvolveMatrixElement, SVGNames::targetYAttr, TargetY, targetY)
-DEFINE_ANIMATED_ENUMERATION(SVGFEConvolveMatrixElement, SVGNames::edgeModeAttr, EdgeMode, edgeMode, EdgeModeType)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), KernelUnitLengthX, kernelUnitLengthX)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEConvolveMatrixElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), KernelUnitLengthY, kernelUnitLengthY)
-DEFINE_ANIMATED_BOOLEAN(SVGFEConvolveMatrixElement, SVGNames::preserveAlphaAttr, PreserveAlpha, preserveAlpha)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEConvolveMatrixElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(orderX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(orderY)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(kernelMatrix)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(divisor)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(bias)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(targetX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(targetY)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(edgeMode)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAlpha)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_edgeMode(EDGEMODE_DUPLICATE)
 {
     ASSERT(hasTagName(SVGNames::feConvolveMatrixTag));
-    registerAnimatedPropertiesForSVGFEConvolveMatrixElement();
+    registerAttributes();
 }
 
 Ref<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const QualifiedName& tagName, Document& document)
@@ -101,18 +71,39 @@ const AtomicString& SVGFEConvolveMatrixElement::orderYIdentifier()
     return s_identifier;
 }
 
+void SVGFEConvolveMatrixElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::inAttr, &SVGFEConvolveMatrixElement::m_in1>();
+    registry.registerAttribute<SVGNames::orderAttr,
+        &SVGFEConvolveMatrixElement::orderXIdentifier, &SVGFEConvolveMatrixElement::m_orderX,
+        &SVGFEConvolveMatrixElement::orderYIdentifier, &SVGFEConvolveMatrixElement::m_orderY>();
+    registry.registerAttribute<SVGNames::kernelMatrixAttr, &SVGFEConvolveMatrixElement::m_kernelMatrix>();
+    registry.registerAttribute<SVGNames::divisorAttr, &SVGFEConvolveMatrixElement::m_divisor>();
+    registry.registerAttribute<SVGNames::biasAttr, &SVGFEConvolveMatrixElement::m_bias>();
+    registry.registerAttribute<SVGNames::targetXAttr, &SVGFEConvolveMatrixElement::m_targetX>();
+    registry.registerAttribute<SVGNames::targetYAttr, &SVGFEConvolveMatrixElement::m_targetY>();
+    registry.registerAttribute<SVGNames::edgeModeAttr, EdgeModeType, &SVGFEConvolveMatrixElement::m_edgeMode>();
+    registry.registerAttribute<SVGNames::kernelUnitLengthAttr,
+        &SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier, &SVGFEConvolveMatrixElement::m_kernelUnitLengthX,
+        &SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier, &SVGFEConvolveMatrixElement::m_kernelUnitLengthY>();
+    registry.registerAttribute<SVGNames::preserveAlphaAttr, &SVGFEConvolveMatrixElement::m_preserveAlpha>();
+}
+
 void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::orderAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y) && x >= 1 && y >= 1) {
-            setOrderXBaseValue(x);
-            setOrderYBaseValue(y);
+            m_orderX.setValue(x);
+            m_orderY.setValue(y);
         } else
             document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing order=\"" + value + "\". Filtered element will not be displayed.");
         return;
@@ -121,7 +112,7 @@ void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const
     if (name == SVGNames::edgeModeAttr) {
         EdgeModeType propertyValue = SVGPropertyTraits<EdgeModeType>::fromString(value);
         if (propertyValue > 0)
-            setEdgeModeBaseValue(propertyValue);
+            m_edgeMode.setValue(propertyValue);
         else
             document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing edgeMode=\"" + value + "\". Filtered element will not be displayed.");
         return;
@@ -130,40 +121,40 @@ void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const
     if (name == SVGNames::kernelMatrixAttr) {
         SVGNumberListValues newList;
         newList.parse(value);
-        detachAnimatedKernelMatrixListWrappers(newList.size());
-        setKernelMatrixBaseValue(newList);
+        m_kernelMatrix.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
+        m_kernelMatrix.setValue(WTFMove(newList));
         return;
     }
 
     if (name == SVGNames::divisorAttr) {
         float divisor = value.toFloat();
         if (divisor)
-            setDivisorBaseValue(divisor);
+            m_divisor.setValue(divisor);
         else
             document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing divisor=\"" + value + "\". Filtered element will not be displayed.");
         return;
     }
     
     if (name == SVGNames::biasAttr) {
-        setBiasBaseValue(value.toFloat());
+        m_bias.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::targetXAttr) {
-        setTargetXBaseValue(value.string().toUIntStrict());
+        m_targetX.setValue(value.string().toUIntStrict());
         return;
     }
 
     if (name == SVGNames::targetYAttr) {
-        setTargetYBaseValue(value.string().toUIntStrict());
+        m_targetY.setValue(value.string().toUIntStrict());
         return;
     }
 
     if (name == SVGNames::kernelUnitLengthAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y) && x > 0 && y > 0) {
-            setKernelUnitLengthXBaseValue(x);
-            setKernelUnitLengthYBaseValue(y);
+            m_kernelUnitLengthX.setValue(x);
+            m_kernelUnitLengthY.setValue(y);
         } else
             document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing kernelUnitLength=\"" + value + "\". Filtered element will not be displayed.");
         return;
@@ -171,9 +162,9 @@ void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const
 
     if (name == SVGNames::preserveAlphaAttr) {
         if (value == "true")
-            setPreserveAlphaBaseValue(true);
+            m_preserveAlpha.setValue(true);
         else if (value == "false")
-            setPreserveAlphaBaseValue(false);
+            m_preserveAlpha.setValue(false);
         else
             document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing preserveAlphaAttr=\"" + value  + "\". Filtered element will not be displayed.");
         return;
@@ -192,11 +183,11 @@ bool SVGFEConvolveMatrixElement::setFilterEffectAttribute(FilterEffect* effect,
     if (attrName == SVGNames::biasAttr)
         return convolveMatrix->setBias(bias());
     if (attrName == SVGNames::targetXAttr)
-       return convolveMatrix->setTargetOffset(IntPoint(targetX(), targetY()));
+        return convolveMatrix->setTargetOffset(IntPoint(targetX(), targetY()));
     if (attrName == SVGNames::targetYAttr)
-       return convolveMatrix->setTargetOffset(IntPoint(targetX(), targetY()));
+        return convolveMatrix->setTargetOffset(IntPoint(targetX(), targetY()));
     if (attrName == SVGNames::kernelUnitLengthAttr)
-       return convolveMatrix->setKernelUnitLength(FloatPoint(kernelUnitLengthX(), kernelUnitLengthY()));
+        return convolveMatrix->setKernelUnitLength(FloatPoint(kernelUnitLengthX(), kernelUnitLengthY()));
     if (attrName == SVGNames::preserveAlphaAttr)
         return convolveMatrix->setPreserveAlpha(preserveAlpha());
 
@@ -206,15 +197,15 @@ bool SVGFEConvolveMatrixElement::setFilterEffectAttribute(FilterEffect* effect,
 
 void SVGFEConvolveMatrixElement::setOrder(float x, float y)
 {
-    setOrderXBaseValue(x);
-    setOrderYBaseValue(y);
+    m_orderX.setValue(x);
+    m_orderY.setValue(y);
     invalidate();
 }
 
 void SVGFEConvolveMatrixElement::setKernelUnitLength(float x, float y)
 {
-    setKernelUnitLengthXBaseValue(x);
-    setKernelUnitLengthYBaseValue(y);
+    m_kernelUnitLengthX.setValue(x);
+    m_kernelUnitLengthY.setValue(y);
     invalidate();
 }
 
index 6d25881..6f73174 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
+ * 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
@@ -32,6 +33,7 @@ namespace WebCore {
 template<>
 struct SVGPropertyTraits<EdgeModeType> {
     static unsigned highestEnumValue() { return EDGEMODE_NONE; }
+    static EdgeModeType initialValue() { return EDGEMODE_NONE; }
 
     static String toString(EdgeModeType type)
     {
@@ -70,12 +72,45 @@ public:
     void setOrder(float orderX, float orderY);
     void setKernelUnitLength(float kernelUnitLengthX, float kernelUnitLengthY);
 
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    int orderX() const { return m_orderX.currentValue(attributeOwnerProxy()); }
+    int orderY() const { return m_orderY.currentValue(attributeOwnerProxy()); }
+    const SVGNumberListValues& kernelMatrix() const { return m_kernelMatrix.currentValue(attributeOwnerProxy()); }
+    float divisor() const { return m_divisor.currentValue(attributeOwnerProxy()); }
+    float bias() const { return m_bias.currentValue(attributeOwnerProxy()); }
+    int targetX() const { return m_targetX.currentValue(attributeOwnerProxy()); }
+    int targetY() const { return m_targetY.currentValue(attributeOwnerProxy()); }
+    EdgeModeType edgeMode() const { return m_edgeMode.currentValue(attributeOwnerProxy()); }
+    float kernelUnitLengthX() const { return m_kernelUnitLengthX.currentValue(attributeOwnerProxy()); }
+    float kernelUnitLengthY() const { return m_kernelUnitLengthY.currentValue(attributeOwnerProxy()); }
+    bool preserveAlpha() const { return m_preserveAlpha.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedInteger> orderXAnimated() { return m_orderX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedInteger> orderYAnimated() { return m_orderY.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumberList> kernelMatrixAnimated() { return m_kernelMatrix.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> divisorAnimated() { return m_divisor.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> biasAnimated() { return m_bias.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedInteger> targetXAnimated() { return m_targetX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedInteger> targetYAnimated() { return m_targetY.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> edgeModeAnimated() { return m_edgeMode.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> kernelUnitLengthXAnimated() { return m_kernelUnitLengthX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> kernelUnitLengthYAnimated() { return m_kernelUnitLengthY.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedBoolean> preserveAlphaAnimated() { return m_preserveAlpha.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEConvolveMatrixElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEConvolveMatrixElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
     static const AtomicString& orderXIdentifier();
@@ -83,20 +118,19 @@ private:
     static const AtomicString& kernelUnitLengthXIdentifier();
     static const AtomicString& kernelUnitLengthYIdentifier();
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEConvolveMatrixElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_INTEGER(OrderX, orderX)
-        DECLARE_ANIMATED_INTEGER(OrderY, orderY)
-        DECLARE_ANIMATED_NUMBER_LIST(KernelMatrix, kernelMatrix)
-        DECLARE_ANIMATED_NUMBER(Divisor, divisor)
-        DECLARE_ANIMATED_NUMBER(Bias, bias)
-        DECLARE_ANIMATED_INTEGER(TargetX, targetX)
-        DECLARE_ANIMATED_INTEGER(TargetY, targetY)
-        DECLARE_ANIMATED_ENUMERATION(EdgeMode, edgeMode, EdgeModeType)
-        DECLARE_ANIMATED_NUMBER(KernelUnitLengthX, kernelUnitLengthX)
-        DECLARE_ANIMATED_NUMBER(KernelUnitLengthY, kernelUnitLengthY)
-        DECLARE_ANIMATED_BOOLEAN(PreserveAlpha, preserveAlpha)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedIntegerAttribute m_orderX;
+    SVGAnimatedIntegerAttribute m_orderY;
+    SVGAnimatedNumberListAttribute m_kernelMatrix;
+    SVGAnimatedNumberAttribute m_divisor;
+    SVGAnimatedNumberAttribute m_bias;
+    SVGAnimatedIntegerAttribute m_targetX;
+    SVGAnimatedIntegerAttribute m_targetY;
+    SVGAnimatedEnumerationAttribute<EdgeModeType> m_edgeMode { EDGEMODE_DUPLICATE };
+    SVGAnimatedNumberAttribute m_kernelUnitLengthX;
+    SVGAnimatedNumberAttribute m_kernelUnitLengthY;
+    SVGAnimatedBooleanAttribute m_preserveAlpha;
 };
 
 } // namespace WebCore
index 3ea3b16..b9b023a 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>
+ * 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
@@ -33,29 +34,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEDiffuseLightingElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEDiffuseLightingElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_NUMBER(SVGFEDiffuseLightingElement, SVGNames::diffuseConstantAttr, DiffuseConstant, diffuseConstant)
-DEFINE_ANIMATED_NUMBER(SVGFEDiffuseLightingElement, SVGNames::surfaceScaleAttr, SurfaceScale, surfaceScale)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), KernelUnitLengthX, kernelUnitLengthX)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEDiffuseLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), KernelUnitLengthY, kernelUnitLengthY)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDiffuseLightingElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(diffuseConstant)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_diffuseConstant(1)
-    , m_surfaceScale(1)
 {
     ASSERT(hasTagName(SVGNames::feDiffuseLightingTag));
-    registerAnimatedPropertiesForSVGFEDiffuseLightingElement();
+    registerAttributes();
 }
 
 Ref<SVGFEDiffuseLightingElement> SVGFEDiffuseLightingElement::create(const QualifiedName& tagName, Document& document)
@@ -75,28 +58,41 @@ const AtomicString& SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier()
     return s_identifier;
 }
 
+void SVGFEDiffuseLightingElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::inAttr, &SVGFEDiffuseLightingElement::m_in1>();
+    registry.registerAttribute<SVGNames::diffuseConstantAttr, &SVGFEDiffuseLightingElement::m_diffuseConstant>();
+    registry.registerAttribute<SVGNames::surfaceScaleAttr, &SVGFEDiffuseLightingElement::m_surfaceScale>();
+    registry.registerAttribute<SVGNames::kernelUnitLengthAttr,
+        &SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier, &SVGFEDiffuseLightingElement::m_kernelUnitLengthX,
+        &SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier, &SVGFEDiffuseLightingElement::m_kernelUnitLengthY>();
+}
+
 void SVGFEDiffuseLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::surfaceScaleAttr) {
-        setSurfaceScaleBaseValue(value.toFloat());
+        m_surfaceScale.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::diffuseConstantAttr) {
-        setDiffuseConstantBaseValue(value.toFloat());
+        m_diffuseConstant.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::kernelUnitLengthAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y)) {
-            setKernelUnitLengthXBaseValue(x);
-            setKernelUnitLengthYBaseValue(y);
+            m_kernelUnitLengthX.setValue(x);
+            m_kernelUnitLengthY.setValue(y);
         }
         return;
     }
index 48fbfc2..0b8ae8b 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
  * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
+ * 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
@@ -35,24 +36,42 @@ public:
     static Ref<SVGFEDiffuseLightingElement> create(const QualifiedName&, Document&);
     void lightElementAttributeChanged(const SVGFELightElement*, const QualifiedName&);
 
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    float diffuseConstant() const { return m_diffuseConstant.currentValue(attributeOwnerProxy()); }
+    float surfaceScale() const { return m_surfaceScale.currentValue(attributeOwnerProxy()); }
+    float kernelUnitLengthX() const { return m_kernelUnitLengthX.currentValue(attributeOwnerProxy()); }
+    float kernelUnitLengthY() const { return m_kernelUnitLengthY.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> diffuseConstantAnimated() { return m_diffuseConstant.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> surfaceScaleAnimated() { return m_surfaceScale.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> kernelUnitLengthXAnimated() { return m_kernelUnitLengthX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> kernelUnitLengthYAnimated() { return m_kernelUnitLengthY.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEDiffuseLightingElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEDiffuseLightingElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
     static const AtomicString& kernelUnitLengthXIdentifier();
     static const AtomicString& kernelUnitLengthYIdentifier();
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEDiffuseLightingElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_NUMBER(DiffuseConstant, diffuseConstant)
-        DECLARE_ANIMATED_NUMBER(SurfaceScale, surfaceScale)
-        DECLARE_ANIMATED_NUMBER(KernelUnitLengthX, kernelUnitLengthX)
-        DECLARE_ANIMATED_NUMBER(KernelUnitLengthY, kernelUnitLengthY)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedNumberAttribute m_diffuseConstant { 1 };
+    SVGAnimatedNumberAttribute m_surfaceScale { 1 };
+    SVGAnimatedNumberAttribute m_kernelUnitLengthX;
+    SVGAnimatedNumberAttribute m_kernelUnitLengthY;
 };
 
 } // namespace WebCore
index 2b48e84..435fc70 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com>
+ * 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
@@ -29,29 +30,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEDisplacementMapElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEDisplacementMapElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_STRING(SVGFEDisplacementMapElement, SVGNames::in2Attr, In2, in2)
-DEFINE_ANIMATED_ENUMERATION(SVGFEDisplacementMapElement, SVGNames::xChannelSelectorAttr, XChannelSelector, xChannelSelector, ChannelSelectorType)
-DEFINE_ANIMATED_ENUMERATION(SVGFEDisplacementMapElement, SVGNames::yChannelSelectorAttr, YChannelSelector, yChannelSelector, ChannelSelectorType)
-DEFINE_ANIMATED_NUMBER(SVGFEDisplacementMapElement, SVGNames::scaleAttr, Scale, scale)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDisplacementMapElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in2)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(xChannelSelector)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(yChannelSelector)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(scale)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_xChannelSelector(CHANNEL_A)
-    , m_yChannelSelector(CHANNEL_A)
 {
     ASSERT(hasTagName(SVGNames::feDisplacementMapTag));
-    registerAnimatedPropertiesForSVGFEDisplacementMapElement();
+    registerAttributes();
 }
 
 Ref<SVGFEDisplacementMapElement> SVGFEDisplacementMapElement::create(const QualifiedName& tagName, Document& document)
@@ -59,34 +42,46 @@ Ref<SVGFEDisplacementMapElement> SVGFEDisplacementMapElement::create(const Quali
     return adoptRef(*new SVGFEDisplacementMapElement(tagName, document));
 }
 
+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>();
+    registry.registerAttribute<SVGNames::scaleAttr, &SVGFEDisplacementMapElement::m_scale>();
+}
+
 void SVGFEDisplacementMapElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::xChannelSelectorAttr) {
         auto propertyValue = SVGPropertyTraits<ChannelSelectorType>::fromString(value);
         if (propertyValue > 0)
-            setXChannelSelectorBaseValue(propertyValue);
+            m_xChannelSelector.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::yChannelSelectorAttr) {
         auto propertyValue = SVGPropertyTraits<ChannelSelectorType>::fromString(value);
         if (propertyValue > 0)
-            setYChannelSelectorBaseValue(propertyValue);
+            m_yChannelSelector.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::in2Attr) {
-        setIn2BaseValue(value);
+        m_in2.setValue(value);
         return;
     }
 
     if (name == SVGNames::scaleAttr) {
-        setScaleBaseValue(value.toFloat());
+        m_scale.setValue(value.toFloat());
         return;
     }
 
index 15f8be7..51bed53 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com>
+ * 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
@@ -69,22 +70,40 @@ public:
     static Ref<SVGFEDisplacementMapElement> create(const QualifiedName&, Document&);
 
     static ChannelSelectorType stringToChannel(const String&);
-    
+
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    String in2() const { return m_in2.currentValue(attributeOwnerProxy()); }
+    ChannelSelectorType xChannelSelector() const { return m_xChannelSelector.currentValue(attributeOwnerProxy()); }
+    ChannelSelectorType yChannelSelector() const { return m_yChannelSelector.currentValue(attributeOwnerProxy()); }
+    float scale() const { return m_scale.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedString> in2Animated() { return m_in2.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> xChannelSelectorAnimated() { return m_xChannelSelector.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> yChannelSelectorAnimated() { return m_yChannelSelector.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> scaleAnimated() { return m_scale.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEDisplacementMapElement(const QualifiedName& tagName, Document&);
-    
+
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEDisplacementMapElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEDisplacementMapElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_STRING(In2, in2)
-        DECLARE_ANIMATED_ENUMERATION(XChannelSelector, xChannelSelector, ChannelSelectorType)
-        DECLARE_ANIMATED_ENUMERATION(YChannelSelector, yChannelSelector, ChannelSelectorType)
-        DECLARE_ANIMATED_NUMBER(Scale, scale)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedStringAttribute m_in2;
+    SVGAnimatedEnumerationAttribute<ChannelSelectorType> m_xChannelSelector { CHANNEL_A };
+    SVGAnimatedEnumerationAttribute<ChannelSelectorType> m_yChannelSelector { CHANNEL_A };
+    SVGAnimatedNumberAttribute m_scale;
 };
 
 } // namespace WebCore
index cc4bba1..550f65e 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) Research In Motion Limited 2011. 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
@@ -31,31 +32,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEDropShadowElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEDropShadowElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_NUMBER(SVGFEDropShadowElement, SVGNames::dxAttr, Dx, dx)
-DEFINE_ANIMATED_NUMBER(SVGFEDropShadowElement, SVGNames::dyAttr, Dy, dy)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEDropShadowElement, SVGNames::stdDeviationAttr, stdDeviationXIdentifier(), StdDeviationX, stdDeviationX)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEDropShadowElement, SVGNames::stdDeviationAttr, stdDeviationYIdentifier(), StdDeviationY, stdDeviationY)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDropShadowElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(dx)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(dy)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(stdDeviationX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(stdDeviationY)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEDropShadowElement::SVGFEDropShadowElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_dx(2)
-    , m_dy(2)
-    , m_stdDeviationX(2)
-    , m_stdDeviationY(2)
 {
     ASSERT(hasTagName(SVGNames::feDropShadowTag));
-    registerAnimatedPropertiesForSVGFEDropShadowElement();
+    registerAttributes();
 }
 
 Ref<SVGFEDropShadowElement> SVGFEDropShadowElement::create(const QualifiedName& tagName, Document& document)
@@ -77,34 +58,47 @@ const AtomicString& SVGFEDropShadowElement::stdDeviationYIdentifier()
 
 void SVGFEDropShadowElement::setStdDeviation(float x, float y)
 {
-    setStdDeviationXBaseValue(x);
-    setStdDeviationYBaseValue(y);
+    m_stdDeviationX.setValue(x);
+    m_stdDeviationY.setValue(y);
     invalidate();
 }
 
+void SVGFEDropShadowElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::inAttr, &SVGFEDropShadowElement::m_in1>();
+    registry.registerAttribute<SVGNames::dxAttr, &SVGFEDropShadowElement::m_dx>();
+    registry.registerAttribute<SVGNames::dyAttr, &SVGFEDropShadowElement::m_dy>();
+    registry.registerAttribute<SVGNames::stdDeviationAttr,
+        &SVGFEDropShadowElement::stdDeviationXIdentifier, &SVGFEDropShadowElement::m_stdDeviationX,
+        &SVGFEDropShadowElement::stdDeviationYIdentifier, &SVGFEDropShadowElement::m_stdDeviationY>();
+}
+
 void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::stdDeviationAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y)) {
-            setStdDeviationXBaseValue(x);
-            setStdDeviationYBaseValue(y);
+            m_stdDeviationX.setValue(x);
+            m_stdDeviationY.setValue(y);
         }
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::dxAttr) {
-        setDxBaseValue(value.toFloat());
+        m_dx.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::dyAttr) {
-        setDyBaseValue(value.toFloat());
+        m_dy.setValue(value.toFloat());
         return;
     }
 
@@ -113,7 +107,7 @@ void SVGFEDropShadowElement::parseAttribute(const QualifiedName& name, const Ato
 
 void SVGFEDropShadowElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (attrName == SVGNames::inAttr || attrName == SVGNames::stdDeviationAttr || attrName == SVGNames::dxAttr || attrName == SVGNames::dyAttr) {
+    if (isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidate();
         return;
index dc5302b..366219e 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) Research In Motion Limited 2011. 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
 #include "SVGFilterPrimitiveStandardAttributes.h"
 
 namespace WebCore {
-    
+
 class SVGFEDropShadowElement final : public SVGFilterPrimitiveStandardAttributes {
     WTF_MAKE_ISO_ALLOCATED(SVGFEDropShadowElement);
 public:
     static Ref<SVGFEDropShadowElement> create(const QualifiedName&, Document&);
     
     void setStdDeviation(float stdDeviationX, float stdDeviationY);
-    
+
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    float dx() const { return m_dx.currentValue(attributeOwnerProxy()); }
+    float dy() const { return m_dy.currentValue(attributeOwnerProxy()); }
+    float stdDeviationX() const { return m_stdDeviationX.currentValue(attributeOwnerProxy()); }
+    float stdDeviationY() const { return m_stdDeviationY.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> dxAnimated() { return m_dx.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> dyAnimated() { return m_dy.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> stdDeviationXAnimated() { return m_stdDeviationX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> stdDeviationYAnimated() { return m_stdDeviationY.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEDropShadowElement(const QualifiedName&, Document&);
-    
+
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEDropShadowElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
-    
+
     static const AtomicString& stdDeviationXIdentifier();
     static const AtomicString& stdDeviationYIdentifier();
-    
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEDropShadowElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_NUMBER(Dx, dx)
-        DECLARE_ANIMATED_NUMBER(Dy, dy)
-        DECLARE_ANIMATED_NUMBER(StdDeviationX, stdDeviationX)
-        DECLARE_ANIMATED_NUMBER(StdDeviationY, stdDeviationY)
-    END_DECLARE_ANIMATED_PROPERTIES
+
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedNumberAttribute m_dx { 2 };
+    SVGAnimatedNumberAttribute m_dy { 2 };
+    SVGAnimatedNumberAttribute m_stdDeviationX { 2 };
+    SVGAnimatedNumberAttribute m_stdDeviationY { 2 };
 };
     
 } // namespace WebCore
index bd3f8a4..933187e 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -31,26 +32,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEGaussianBlurElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEGaussianBlurElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationXIdentifier(), StdDeviationX, stdDeviationX)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEGaussianBlurElement, SVGNames::stdDeviationAttr, stdDeviationYIdentifier(), StdDeviationY, stdDeviationY)
-DEFINE_ANIMATED_ENUMERATION(SVGFEGaussianBlurElement, SVGNames::edgeModeAttr, EdgeMode, edgeMode, EdgeModeType)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEGaussianBlurElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(stdDeviationX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(stdDeviationY)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(edgeMode)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_edgeMode(EDGEMODE_NONE)
 {
     ASSERT(hasTagName(SVGNames::feGaussianBlurTag));
-    registerAnimatedPropertiesForSVGFEGaussianBlurElement();
+    registerAttributes();
 }
 
 Ref<SVGFEGaussianBlurElement> SVGFEGaussianBlurElement::create(const QualifiedName& tagName, Document& document)
@@ -72,31 +58,43 @@ const AtomicString& SVGFEGaussianBlurElement::stdDeviationYIdentifier()
 
 void SVGFEGaussianBlurElement::setStdDeviation(float x, float y)
 {
-    setStdDeviationXBaseValue(x);
-    setStdDeviationYBaseValue(y);
+    m_stdDeviationX.setValue(x);
+    m_stdDeviationY.setValue(y);
     invalidate();
 }
 
+void SVGFEGaussianBlurElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::inAttr, &SVGFEGaussianBlurElement::m_in1>();
+    registry.registerAttribute<SVGNames::stdDeviationAttr,
+        &SVGFEGaussianBlurElement::stdDeviationXIdentifier, &SVGFEGaussianBlurElement::m_stdDeviationX,
+        &SVGFEGaussianBlurElement::stdDeviationYIdentifier, &SVGFEGaussianBlurElement::m_stdDeviationY>();
+    registry.registerAttribute<SVGNames::edgeModeAttr, EdgeModeType, &SVGFEGaussianBlurElement::m_edgeMode>();
+}
+
 void SVGFEGaussianBlurElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::stdDeviationAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y)) {
-            setStdDeviationXBaseValue(x);
-            setStdDeviationYBaseValue(y);
+            m_stdDeviationX.setValue(x);
+            m_stdDeviationY.setValue(y);
         }
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::edgeModeAttr) {
         auto propertyValue = SVGPropertyTraits<EdgeModeType>::fromString(value);
         if (propertyValue > 0)
-            setEdgeModeBaseValue(propertyValue);
+            m_edgeMode.setValue(propertyValue);
         else
             document().accessSVGExtensions().reportWarning("feGaussianBlur: problem parsing edgeMode=\"" + value + "\". Filtered element will not be displayed.");
         return;
@@ -107,7 +105,7 @@ void SVGFEGaussianBlurElement::parseAttribute(const QualifiedName& name, const A
 
 void SVGFEGaussianBlurElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (attrName == SVGNames::inAttr || attrName == SVGNames::stdDeviationAttr || attrName == SVGNames::edgeModeAttr) {
+    if (isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidate();
         return;
index 5a271cc..93b61ac 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -35,22 +36,38 @@ public:
 
     void setStdDeviation(float stdDeviationX, float stdDeviationY);
 
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    float stdDeviationX() const { return m_stdDeviationX.currentValue(attributeOwnerProxy()); }
+    float stdDeviationY() const { return m_stdDeviationY.currentValue(attributeOwnerProxy()); }
+    EdgeModeType edgeMode() const { return m_edgeMode.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> stdDeviationXAnimated() { return m_stdDeviationX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> stdDeviationYAnimated() { return m_stdDeviationY.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> edgeModeAnimated() { return m_edgeMode.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEGaussianBlurElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEGaussianBlurElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
     static const AtomicString& stdDeviationXIdentifier();
     static const AtomicString& stdDeviationYIdentifier();
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEGaussianBlurElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_NUMBER(StdDeviationX, stdDeviationX)
-        DECLARE_ANIMATED_NUMBER(StdDeviationY, stdDeviationY)
-        DECLARE_ANIMATED_ENUMERATION(EdgeMode, edgeMode, EdgeModeType)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedNumberAttribute m_stdDeviationX;
+    SVGAnimatedNumberAttribute m_stdDeviationY;
+    SVGAnimatedEnumerationAttribute<EdgeModeType> m_edgeMode { EDGEMODE_NONE };
 };
 
 } // namespace WebCore
index 0cd3d9b..3a41928 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
  * Copyright (C) 2010 Dirk Schulze <krit@webkit.org>
+ * 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
@@ -38,23 +39,13 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEImageElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_PRESERVEASPECTRATIO(SVGFEImageElement, SVGNames::preserveAspectRatioAttr, PreserveAspectRatio, preserveAspectRatio)
-DEFINE_ANIMATED_STRING(SVGFEImageElement, XLinkNames::hrefAttr, Href, href)
-DEFINE_ANIMATED_BOOLEAN(SVGFEImageElement, SVGNames::externalResourcesRequiredAttr, ExternalResourcesRequired, externalResourcesRequired)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEImageElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(preserveAspectRatio)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(href)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(externalResourcesRequired)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEImageElement::SVGFEImageElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
+    , SVGExternalResourcesRequired(this)
+    , SVGURIReference(this)
 {
     ASSERT(hasTagName(SVGNames::feImageTag));
-    registerAnimatedPropertiesForSVGFEImageElement();
+    registerAttributes();
 }
 
 Ref<SVGFEImageElement> SVGFEImageElement::create(const QualifiedName& tagName, Document& document)
@@ -122,12 +113,20 @@ void SVGFEImageElement::buildPendingResource()
     invalidate();
 }
 
+void SVGFEImageElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::preserveAspectRatioAttr, &SVGFEImageElement::m_preserveAspectRatio>();
+}
+
 void SVGFEImageElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::preserveAspectRatioAttr) {
         SVGPreserveAspectRatioValue preserveAspectRatio;
         preserveAspectRatio.parse(value);
-        setPreserveAspectRatioBaseValue(preserveAspectRatio);
+        m_preserveAspectRatio.setValue(preserveAspectRatio);
         return;
     }
 
index 2249a85..6c4fd63 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -31,7 +32,7 @@
 
 namespace WebCore {
 
-class SVGFEImageElement final : public SVGFilterPrimitiveStandardAttributes, public SVGURIReference, public SVGExternalResourcesRequired, public CachedImageClient {
+class SVGFEImageElement final : public SVGFilterPrimitiveStandardAttributes, public SVGExternalResourcesRequired, public SVGURIReference, public CachedImageClient {
     WTF_MAKE_ISO_ALLOCATED(SVGFEImageElement);
 public:
     static Ref<SVGFEImageElement> create(const QualifiedName&, Document&);
@@ -40,16 +41,26 @@ public:
 
     bool hasSingleSecurityOrigin() const;
 
+    const SVGPreserveAspectRatioValue& preserveAspectRatio() const { return m_preserveAspectRatio.currentValue(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedPreserveAspectRatio> preserveAspectRatioAnimated() { return m_preserveAspectRatio.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEImageElement(const QualifiedName&, Document&);
 
-    void didFinishInsertingNode() override;
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEImageElement, SVGFilterPrimitiveStandardAttributes, SVGExternalResourcesRequired, SVGURIReference>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
 
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
-    void notifyFinished(CachedResource&) final;
 
+    void notifyFinished(CachedResource&) final;
     void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
+
+    void didFinishInsertingNode() override;
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
     void clearResourceReferences();
@@ -59,12 +70,8 @@ private:
     InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
     void removedFromAncestor(RemovalType, ContainerNode&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEImageElement)
-        DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspectRatio)
-        DECLARE_ANIMATED_STRING_OVERRIDE(Href, href)
-        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
-    END_DECLARE_ANIMATED_PROPERTIES
-
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedPreserveAspectRatioAttribute m_preserveAspectRatio;
     CachedResourceHandle<CachedImage> m_cachedImage;
 };
 
index 9c9530c..891fedd 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
  * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
+ * 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
@@ -39,36 +40,10 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFELightElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::azimuthAttr, Azimuth, azimuth)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::elevationAttr, Elevation, elevation)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::xAttr, X, x)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::yAttr, Y, y)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::zAttr, Z, z)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::pointsAtXAttr, PointsAtX, pointsAtX)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::pointsAtYAttr, PointsAtY, pointsAtY)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::pointsAtZAttr, PointsAtZ, pointsAtZ)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::specularExponentAttr, SpecularExponent, specularExponent)
-DEFINE_ANIMATED_NUMBER(SVGFELightElement, SVGNames::limitingConeAngleAttr, LimitingConeAngle, limitingConeAngle)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFELightElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(azimuth)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(elevation)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(x)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(y)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(z)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(pointsAtX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(pointsAtY)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(pointsAtZ)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(specularExponent)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(limitingConeAngle)
-END_REGISTER_ANIMATED_PROPERTIES
-
 SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document& document)
     : SVGElement(tagName, document)
-    , m_specularExponent(1)
 {
-    registerAnimatedPropertiesForSVGFELightElement();
+    registerAttributes();
 }
 
 SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement* svgElement)
@@ -80,55 +55,72 @@ SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement* svgElem
     return nullptr;
 }
 
+void SVGFELightElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::azimuthAttr, &SVGFELightElement::m_azimuth>();
+    registry.registerAttribute<SVGNames::elevationAttr, &SVGFELightElement::m_elevation>();
+    registry.registerAttribute<SVGNames::xAttr, &SVGFELightElement::m_x>();
+    registry.registerAttribute<SVGNames::yAttr, &SVGFELightElement::m_y>();
+    registry.registerAttribute<SVGNames::zAttr, &SVGFELightElement::m_z>();
+    registry.registerAttribute<SVGNames::pointsAtXAttr, &SVGFELightElement::m_pointsAtX>();
+    registry.registerAttribute<SVGNames::pointsAtYAttr, &SVGFELightElement::m_pointsAtY>();
+    registry.registerAttribute<SVGNames::pointsAtZAttr, &SVGFELightElement::m_pointsAtZ>();
+    registry.registerAttribute<SVGNames::specularExponentAttr, &SVGFELightElement::m_specularExponent>();
+    registry.registerAttribute<SVGNames::limitingConeAngleAttr, &SVGFELightElement::m_limitingConeAngle>();
+}
+
 void SVGFELightElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::azimuthAttr) {
-        setAzimuthBaseValue(value.toFloat());
+        m_azimuth.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::elevationAttr) {
-        setElevationBaseValue(value.toFloat());
+        m_elevation.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::xAttr) {
-        setXBaseValue(value.toFloat());
+        m_x.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::yAttr) {
-        setYBaseValue(value.toFloat());
+        m_y.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::zAttr) {
-        setZBaseValue(value.toFloat());
+        m_z.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::pointsAtXAttr) {
-        setPointsAtXBaseValue(value.toFloat());
+        m_pointsAtX.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::pointsAtYAttr) {
-        setPointsAtYBaseValue(value.toFloat());
+        m_pointsAtY.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::pointsAtZAttr) {
-        setPointsAtZBaseValue(value.toFloat());
+        m_pointsAtZ.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::specularExponentAttr) {
-        setSpecularExponentBaseValue(value.toFloat());
+        m_specularExponent.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::limitingConeAngleAttr) {
-        setLimitingConeAngleBaseValue(value.toFloat());
+        m_limitingConeAngle.setValue(value.toFloat());
         return;
     }
 
@@ -137,11 +129,7 @@ void SVGFELightElement::parseAttribute(const QualifiedName& name, const AtomicSt
 
 void SVGFELightElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (attrName == SVGNames::azimuthAttr || attrName == SVGNames::elevationAttr
-        || attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName == SVGNames::zAttr
-        || attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAttr || attrName == SVGNames::pointsAtZAttr
-        || attrName == SVGNames::specularExponentAttr || attrName == SVGNames::limitingConeAngleAttr) {
-
+    if (isKnownAttribute(attrName)) {
         auto parent = makeRefPtr(parentElement());
         if (!parent)
             return;
index 91b17fa..84a678f 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
  * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
+ * 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
@@ -35,28 +36,55 @@ public:
     virtual Ref<LightSource> lightSource(SVGFilterBuilder&) const = 0;
     static SVGFELightElement* findLightElement(const SVGElement*);
 
+    float azimuth() const { return m_azimuth.currentValue(attributeOwnerProxy()); }
+    float elevation() const { return m_elevation.currentValue(attributeOwnerProxy()); }
+    float x() const { return m_x.currentValue(attributeOwnerProxy()); }
+    float y() const { return m_y.currentValue(attributeOwnerProxy()); }
+    float z() const { return m_z.currentValue(attributeOwnerProxy()); }
+    float pointsAtX() const { return m_pointsAtX.currentValue(attributeOwnerProxy()); }
+    float pointsAtY() const { return m_pointsAtY.currentValue(attributeOwnerProxy()); }
+    float pointsAtZ() const { return m_pointsAtZ.currentValue(attributeOwnerProxy()); }
+    float specularExponent() const { return m_specularExponent.currentValue(attributeOwnerProxy()); }
+    float limitingConeAngle() const { return m_limitingConeAngle.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedNumber> azimuthAnimated() { return m_azimuth.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> elevationAnimated() { return m_elevation.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> zAnimated() { return m_z.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> pointsAtXAnimated() { return m_pointsAtX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> pointsAtYAnimated() { return m_pointsAtY.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> pointsAtZAnimated() { return m_pointsAtZ.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> specularExponentAnimated() { return m_specularExponent.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> limitingConeAngleAnimated() { return m_limitingConeAngle.animatedProperty(attributeOwnerProxy()); }
+
 protected:
     SVGFELightElement(const QualifiedName&, Document&);
 
     bool rendererIsNeeded(const RenderStyle&) override { return false; }
 
 private:
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFELightElement, SVGElement>;
+    static auto& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
     void childrenChanged(const ChildChange&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFELightElement)
-        DECLARE_ANIMATED_NUMBER(Azimuth, azimuth)
-        DECLARE_ANIMATED_NUMBER(Elevation, elevation)
-        DECLARE_ANIMATED_NUMBER(X, x)
-        DECLARE_ANIMATED_NUMBER(Y, y)
-        DECLARE_ANIMATED_NUMBER(Z, z)
-        DECLARE_ANIMATED_NUMBER(PointsAtX, pointsAtX)
-        DECLARE_ANIMATED_NUMBER(PointsAtY, pointsAtY)
-        DECLARE_ANIMATED_NUMBER(PointsAtZ, pointsAtZ)
-        DECLARE_ANIMATED_NUMBER(SpecularExponent, specularExponent)
-        DECLARE_ANIMATED_NUMBER(LimitingConeAngle, limitingConeAngle)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedNumberAttribute m_azimuth;
+    SVGAnimatedNumberAttribute m_elevation;
+    SVGAnimatedNumberAttribute m_x;
+    SVGAnimatedNumberAttribute m_y;
+    SVGAnimatedNumberAttribute m_z;
+    SVGAnimatedNumberAttribute m_pointsAtX;
+    SVGAnimatedNumberAttribute m_pointsAtY;
+    SVGAnimatedNumberAttribute m_pointsAtZ;
+    SVGAnimatedNumberAttribute m_specularExponent { 1 };
+    SVGAnimatedNumberAttribute m_limitingConeAngle;
 };
 
 } // namespace WebCore
index c738ccf..69cdef0 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -31,18 +32,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEMergeNodeElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEMergeNodeElement, SVGNames::inAttr, In1, in1)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEMergeNodeElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEMergeNodeElement::SVGFEMergeNodeElement(const QualifiedName& tagName, Document& document)
     : SVGElement(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feMergeNodeTag));
-    registerAnimatedPropertiesForSVGFEMergeNodeElement();
+    registerAttributes();
 }
 
 Ref<SVGFEMergeNodeElement> SVGFEMergeNodeElement::create(const QualifiedName& tagName, Document& document)
@@ -50,10 +44,18 @@ 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) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
index 621c5db..9c554ee 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -30,16 +31,25 @@ 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()); }
+
 private:
     SVGFEMergeNodeElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEMergeNodeElement, SVGElement>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) final;
     void svgAttributeChanged(const QualifiedName&) final;
+
     bool rendererIsNeeded(const RenderStyle&) final { return false; }
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEMergeNodeElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
 };
 
 } // namespace WebCore
index acb3aca..fcbc63b 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
+ * 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
@@ -30,26 +31,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEMorphologyElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEMorphologyElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_ENUMERATION(SVGFEMorphologyElement, SVGNames::operatorAttr, SVGOperator, svgOperator, MorphologyOperatorType)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiusAttr, radiusXIdentifier(), RadiusX, radiusX)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEMorphologyElement, SVGNames::radiusAttr, radiusYIdentifier(), RadiusY, radiusY)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEMorphologyElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(svgOperator)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(radiusX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(radiusY)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEMorphologyElement::SVGFEMorphologyElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_svgOperator(FEMORPHOLOGY_OPERATOR_ERODE)
 {
     ASSERT(hasTagName(SVGNames::feMorphologyTag));
-    registerAnimatedPropertiesForSVGFEMorphologyElement();
+    registerAttributes();
 }
 
 Ref<SVGFEMorphologyElement> SVGFEMorphologyElement::create(const QualifiedName& tagName, Document& document)
@@ -71,30 +57,42 @@ const AtomicString& SVGFEMorphologyElement::radiusYIdentifier()
 
 void SVGFEMorphologyElement::setRadius(float x, float y)
 {
-    setRadiusXBaseValue(x);
-    setRadiusYBaseValue(y);
+    m_radiusX.setValue(x);
+    m_radiusY.setValue(y);
     invalidate();
 }
 
+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>();
+    registry.registerAttribute<SVGNames::radiusAttr,
+        &SVGFEMorphologyElement::radiusXIdentifier, &SVGFEMorphologyElement::m_radiusX,
+        &SVGFEMorphologyElement::radiusYIdentifier, &SVGFEMorphologyElement::m_radiusY>();
+}
+
 void SVGFEMorphologyElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::operatorAttr) {
         MorphologyOperatorType propertyValue = SVGPropertyTraits<MorphologyOperatorType>::fromString(value);
         if (propertyValue > 0)
-            setSVGOperatorBaseValue(propertyValue);
+            m_svgOperator.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::radiusAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y)) {
-            setRadiusXBaseValue(x);
-            setRadiusYBaseValue(y);
+            m_radiusX.setValue(x);
+            m_radiusY.setValue(y);
         }
         return;
     }
index d66bbbf..af6f15e 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
+ * 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
@@ -62,23 +63,39 @@ public:
 
     void setRadius(float radiusX, float radiusY);
 
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    MorphologyOperatorType svgOperator() const { return m_svgOperator.currentValue(attributeOwnerProxy()); }
+    float radiusX() const { return m_radiusX.currentValue(attributeOwnerProxy()); }
+    float radiusY() const { return m_radiusY.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> svgOperatorAnimated() { return m_svgOperator.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> radiusXAnimated() { return m_radiusX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> radiusYAnimated() { return m_radiusY.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEMorphologyElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEMorphologyElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
     static const AtomicString& radiusXIdentifier();
     static const AtomicString& radiusYIdentifier();
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEMorphologyElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_ENUMERATION(SVGOperator, svgOperator, MorphologyOperatorType)
-        DECLARE_ANIMATED_NUMBER(RadiusX, radiusX)
-        DECLARE_ANIMATED_NUMBER(RadiusY, radiusY)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedEnumerationAttribute<MorphologyOperatorType> m_svgOperator { FEMORPHOLOGY_OPERATOR_ERODE };
+    SVGAnimatedNumberAttribute m_radiusX;
+    SVGAnimatedNumberAttribute m_radiusY;
 };
 
 } // namespace WebCore
index 9d7b865..2823698 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -31,23 +32,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFEOffsetElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFEOffsetElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dxAttr, Dx, dx)
-DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dyAttr, Dy, dy)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEOffsetElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(dx)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(dy)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feOffsetTag));
-    registerAnimatedPropertiesForSVGFEOffsetElement();
+    registerAttributes();
 }
 
 Ref<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& tagName, Document& document)
@@ -55,20 +44,30 @@ 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>();
+    registry.registerAttribute<SVGNames::dxAttr, &SVGFEOffsetElement::m_dx>();
+    registry.registerAttribute<SVGNames::dyAttr, &SVGFEOffsetElement::m_dy>();
+}
+
 void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::dxAttr) {
-        setDxBaseValue(value.toFloat());
+        m_dx.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::dyAttr) {
-        setDyBaseValue(value.toFloat());
+        m_dy.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
@@ -77,7 +76,7 @@ void SVGFEOffsetElement::parseAttribute(const QualifiedName& name, const AtomicS
 
 void SVGFEOffsetElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (attrName == SVGNames::inAttr || attrName == SVGNames::dxAttr || attrName == SVGNames::dyAttr) {
+    if (isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         invalidate();
         return;
index 906cf88..bdb0e4f 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -30,18 +31,32 @@ class SVGFEOffsetElement final : public SVGFilterPrimitiveStandardAttributes {
 public:
     static Ref<SVGFEOffsetElement> create(const QualifiedName&, Document&);
 
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    float dx() const { return m_dx.currentValue(attributeOwnerProxy()); }
+    float dy() const { return m_dy.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> dxAnimated() { return m_dx.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> dyAnimated() { return m_dy.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFEOffsetElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEOffsetElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEOffsetElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_NUMBER(Dx, dx)
-        DECLARE_ANIMATED_NUMBER(Dy, dy)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedNumberAttribute m_dx;
+    SVGAnimatedNumberAttribute m_dy;
 };
 
 } // namespace WebCore
index b0454c2..3a2f4d2 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
  * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
+ * 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
@@ -34,32 +35,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFESpecularLightingElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFESpecularLightingElement, SVGNames::inAttr, In1, in1)
-DEFINE_ANIMATED_NUMBER(SVGFESpecularLightingElement, SVGNames::specularConstantAttr, SpecularConstant, specularConstant)
-DEFINE_ANIMATED_NUMBER(SVGFESpecularLightingElement, SVGNames::specularExponentAttr, SpecularExponent, specularExponent)
-DEFINE_ANIMATED_NUMBER(SVGFESpecularLightingElement, SVGNames::surfaceScaleAttr, SurfaceScale, surfaceScale)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthXIdentifier(), KernelUnitLengthX, kernelUnitLengthX)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFESpecularLightingElement, SVGNames::kernelUnitLengthAttr, kernelUnitLengthYIdentifier(), KernelUnitLengthY, kernelUnitLengthY)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFESpecularLightingElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(specularConstant)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(specularExponent)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(surfaceScale)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(kernelUnitLengthY)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFESpecularLightingElement::SVGFESpecularLightingElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_specularConstant(1)
-    , m_specularExponent(1)
-    , m_surfaceScale(1)
 {
     ASSERT(hasTagName(SVGNames::feSpecularLightingTag));
-    registerAnimatedPropertiesForSVGFESpecularLightingElement();
+    registerAttributes();
 }
 
 Ref<SVGFESpecularLightingElement> SVGFESpecularLightingElement::create(const QualifiedName& tagName, Document& document)
@@ -79,33 +59,47 @@ const AtomicString& SVGFESpecularLightingElement::kernelUnitLengthYIdentifier()
     return s_identifier;
 }
 
+void SVGFESpecularLightingElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::inAttr, &SVGFESpecularLightingElement::m_in1>();
+    registry.registerAttribute<SVGNames::specularConstantAttr, &SVGFESpecularLightingElement::m_specularConstant>();
+    registry.registerAttribute<SVGNames::specularExponentAttr, &SVGFESpecularLightingElement::m_specularExponent>();
+    registry.registerAttribute<SVGNames::surfaceScaleAttr, &SVGFESpecularLightingElement::m_surfaceScale>();
+    registry.registerAttribute<SVGNames::kernelUnitLengthAttr,
+        &SVGFESpecularLightingElement::kernelUnitLengthXIdentifier, &SVGFESpecularLightingElement::m_kernelUnitLengthX,
+        &SVGFESpecularLightingElement::kernelUnitLengthYIdentifier, &SVGFESpecularLightingElement::m_kernelUnitLengthY>();
+}
+
 void SVGFESpecularLightingElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::inAttr) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
     if (name == SVGNames::surfaceScaleAttr) {
-        setSurfaceScaleBaseValue(value.toFloat());
+        m_surfaceScale.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::specularConstantAttr) {
-        setSpecularConstantBaseValue(value.toFloat());
+        m_specularConstant.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::specularExponentAttr) {
-        setSpecularExponentBaseValue(value.toFloat());
+        m_specularExponent.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::kernelUnitLengthAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y)) {
-            setKernelUnitLengthXBaseValue(x);
-            setKernelUnitLengthYBaseValue(y);
+            m_kernelUnitLengthX.setValue(x);
+            m_kernelUnitLengthY.setValue(y);
         }
         return;
     }
index fed1ce4..7cedaf8 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
  * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
+ * 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
@@ -34,25 +35,45 @@ public:
     static Ref<SVGFESpecularLightingElement> create(const QualifiedName&, Document&);
     void lightElementAttributeChanged(const SVGFELightElement*, const QualifiedName&);
 
+    String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
+    float specularConstant() const  { return m_specularConstant.currentValue(attributeOwnerProxy()); }
+    float specularExponent() const { return m_specularExponent.currentValue(attributeOwnerProxy()); }
+    float surfaceScale() const { return m_surfaceScale.currentValue(attributeOwnerProxy()); }
+    float kernelUnitLengthX() const { return m_kernelUnitLengthX.currentValue(attributeOwnerProxy()); }
+    float kernelUnitLengthY() const { return m_kernelUnitLengthY.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> specularConstantAnimated() { return m_specularConstant.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> specularExponentAnimated() { return m_specularExponent.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> surfaceScaleAnimated() { return m_surfaceScale.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> kernelUnitLengthXAnimated() { return m_kernelUnitLengthX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> kernelUnitLengthYAnimated() { return m_kernelUnitLengthY.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFESpecularLightingElement(const QualifiedName&, Document&);
-    
+
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFESpecularLightingElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
     static const AtomicString& kernelUnitLengthXIdentifier();
     static const AtomicString& kernelUnitLengthYIdentifier();
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFESpecularLightingElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-        DECLARE_ANIMATED_NUMBER(SpecularConstant, specularConstant)
-        DECLARE_ANIMATED_NUMBER(SpecularExponent, specularExponent)
-        DECLARE_ANIMATED_NUMBER(SurfaceScale, surfaceScale)
-        DECLARE_ANIMATED_NUMBER(KernelUnitLengthX, kernelUnitLengthX)
-        DECLARE_ANIMATED_NUMBER(KernelUnitLengthY, kernelUnitLengthY)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
+    SVGAnimatedNumberAttribute m_specularConstant { 1 };
+    SVGAnimatedNumberAttribute m_specularExponent { 1 };
+    SVGAnimatedNumberAttribute m_surfaceScale { 1 };
+    SVGAnimatedNumberAttribute m_kernelUnitLengthX;
+    SVGAnimatedNumberAttribute m_kernelUnitLengthY;
 };
 
 } // namespace WebCore
index eda6d0e..3f3879d 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -32,19 +33,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFETileElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_STRING(SVGFETileElement, SVGNames::inAttr, In1, in1)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFETileElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(in1)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
 {
     ASSERT(hasTagName(SVGNames::feTileTag));
-    registerAnimatedPropertiesForSVGFETileElement();
+    registerAttributes();
 }
 
 Ref<SVGFETileElement> SVGFETileElement::create(const QualifiedName& tagName, Document& document)
@@ -52,10 +45,18 @@ 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) {
-        setIn1BaseValue(value);
+        m_in1.setValue(value);
         return;
     }
 
index 6ea0a7a..754df40 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,16 +30,25 @@ 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()); }
+
 private:
     SVGFETileElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFETileElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFETileElement)
-        DECLARE_ANIMATED_STRING(In1, in1)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedStringAttribute m_in1;
 };
 
 } // namespace WebCore
index 1a15d9c..6b76b84 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,32 +30,11 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(SVGFETurbulenceElement);
 
-// Animated property definitions
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyXIdentifier(), BaseFrequencyX, baseFrequencyX)
-DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFETurbulenceElement, SVGNames::baseFrequencyAttr, baseFrequencyYIdentifier(), BaseFrequencyY, baseFrequencyY)
-DEFINE_ANIMATED_INTEGER(SVGFETurbulenceElement, SVGNames::numOctavesAttr, NumOctaves, numOctaves)
-DEFINE_ANIMATED_NUMBER(SVGFETurbulenceElement, SVGNames::seedAttr, Seed, seed)
-DEFINE_ANIMATED_ENUMERATION(SVGFETurbulenceElement, SVGNames::stitchTilesAttr, StitchTiles, stitchTiles, SVGStitchOptions)
-DEFINE_ANIMATED_ENUMERATION(SVGFETurbulenceElement, SVGNames::typeAttr, Type, type, TurbulenceType)
-
-BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFETurbulenceElement)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(baseFrequencyX)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(baseFrequencyY)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(numOctaves)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(seed)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(stitchTiles)
-    REGISTER_LOCAL_ANIMATED_PROPERTY(type)
-    REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
-END_REGISTER_ANIMATED_PROPERTIES
-
 inline SVGFETurbulenceElement::SVGFETurbulenceElement(const QualifiedName& tagName, Document& document)
     : SVGFilterPrimitiveStandardAttributes(tagName, document)
-    , m_numOctaves(1)
-    , m_stitchTiles(SVG_STITCHTYPE_NOSTITCH)
-    , m_type(TurbulenceType::Turbulence)
 {
     ASSERT(hasTagName(SVGNames::feTurbulenceTag));
-    registerAnimatedPropertiesForSVGFETurbulenceElement();
+    registerAttributes();
 }
 
 Ref<SVGFETurbulenceElement> SVGFETurbulenceElement::create(const QualifiedName& tagName, Document& document)
@@ -74,38 +54,52 @@ const AtomicString& SVGFETurbulenceElement::baseFrequencyYIdentifier()
     return s_identifier;
 }
 
+void SVGFETurbulenceElement::registerAttributes()
+{
+    auto& registry = attributeRegistry();
+    if (!registry.isEmpty())
+        return;
+    registry.registerAttribute<SVGNames::baseFrequencyAttr,
+        &SVGFETurbulenceElement::baseFrequencyXIdentifier, &SVGFETurbulenceElement::m_baseFrequencyX,
+        &SVGFETurbulenceElement::baseFrequencyYIdentifier, &SVGFETurbulenceElement::m_baseFrequencyY>();
+    registry.registerAttribute<SVGNames::numOctavesAttr, &SVGFETurbulenceElement::m_numOctaves>();
+    registry.registerAttribute<SVGNames::seedAttr, &SVGFETurbulenceElement::m_seed>();
+    registry.registerAttribute<SVGNames::stitchTilesAttr, SVGStitchOptions, &SVGFETurbulenceElement::m_stitchTiles>();
+    registry.registerAttribute<SVGNames::typeAttr, TurbulenceType, &SVGFETurbulenceElement::m_type>();
+}
+
 void SVGFETurbulenceElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == SVGNames::typeAttr) {
         TurbulenceType propertyValue = SVGPropertyTraits<TurbulenceType>::fromString(value);
         if (propertyValue != TurbulenceType::Unknown)
-            setTypeBaseValue(propertyValue);
+            m_type.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::stitchTilesAttr) {
         SVGStitchOptions propertyValue = SVGPropertyTraits<SVGStitchOptions>::fromString(value);
         if (propertyValue > 0)
-            setStitchTilesBaseValue(propertyValue);
+            m_stitchTiles.setValue(propertyValue);
         return;
     }
 
     if (name == SVGNames::baseFrequencyAttr) {
         float x, y;
         if (parseNumberOptionalNumber(value, x, y)) {
-            setBaseFrequencyXBaseValue(x);
-            setBaseFrequencyYBaseValue(y);
+            m_baseFrequencyX.setValue(x);
+            m_baseFrequencyY.setValue(y);
         }
         return;
     }
 
     if (name == SVGNames::seedAttr) {
-        setSeedBaseValue(value.toFloat());
+        m_seed.setValue(value.toFloat());
         return;
     }
 
     if (name == SVGNames::numOctavesAttr) {
-        setNumOctavesBaseValue(value.string().toUIntStrict());
+        m_numOctaves.setValue(value.string().toUIntStrict());
         return;
     }
 
@@ -124,7 +118,7 @@ bool SVGFETurbulenceElement::setFilterEffectAttribute(FilterEffect* effect, cons
     if (attrName == SVGNames::seedAttr)
         return turbulence->setSeed(seed());
     if (attrName == SVGNames::numOctavesAttr)
-       return turbulence->setNumOctaves(numOctaves());
+        return turbulence->setNumOctaves(numOctaves());
 
     ASSERT_NOT_REACHED();
     return false;
@@ -132,7 +126,7 @@ bool SVGFETurbulenceElement::setFilterEffectAttribute(FilterEffect* effect, cons
 
 void SVGFETurbulenceElement::svgAttributeChanged(const QualifiedName& attrName)
 {
-    if (attrName == SVGNames::baseFrequencyAttr || attrName == SVGNames::numOctavesAttr || attrName == SVGNames::seedAttr || attrName == SVGNames::stitchTilesAttr || attrName == SVGNames::typeAttr) {
+    if (isKnownAttribute(attrName)) {
         InstanceInvalidationGuard guard(*this);
         primitiveAttributeChanged(attrName);
         return;
index 4f3a096..a0f5488 100644 (file)
@@ -1,6 +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.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -97,25 +98,45 @@ class SVGFETurbulenceElement final : public SVGFilterPrimitiveStandardAttributes
 public:
     static Ref<SVGFETurbulenceElement> create(const QualifiedName&, Document&);
 
+    float baseFrequencyX() const { return m_baseFrequencyX.currentValue(attributeOwnerProxy()); }
+    float baseFrequencyY() const { return m_baseFrequencyY.currentValue(attributeOwnerProxy()); }
+    int numOctaves() const { return m_numOctaves.currentValue(attributeOwnerProxy()); }
+    float seed() const { return m_seed.currentValue(attributeOwnerProxy()); }
+    SVGStitchOptions stitchTiles() const { return m_stitchTiles.currentValue(attributeOwnerProxy()); }
+    TurbulenceType type() const { return m_type.currentValue(attributeOwnerProxy()); }
+
+    RefPtr<SVGAnimatedNumber> baseFrequencyXAnimated() { return m_baseFrequencyX.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> baseFrequencyYAnimated() { return m_baseFrequencyY.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedInteger> numOctavesAnimated() { return m_numOctaves.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedNumber> seedAnimated() { return m_seed.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> stitchTilesAnimated() { return m_stitchTiles.animatedProperty(attributeOwnerProxy()); }
+    RefPtr<SVGAnimatedEnumeration> typeAnimated() { return m_type.animatedProperty(attributeOwnerProxy()); }
+
 private:
     SVGFETurbulenceElement(const QualifiedName&, Document&);
 
+    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFETurbulenceElement, SVGFilterPrimitiveStandardAttributes>;
+    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
+    static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
+    static void registerAttributes();
+
+    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
     void parseAttribute(const QualifiedName&, const AtomicString&) override;
-    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
     void svgAttributeChanged(const QualifiedName&) override;
+
+    bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
 
     static const AtomicString& baseFrequencyXIdentifier();
     static const AtomicString& baseFrequencyYIdentifier();
 
-    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFETurbulenceElement)
-        DECLARE_ANIMATED_NUMBER(BaseFrequencyX, baseFrequencyX)
-        DECLARE_ANIMATED_NUMBER(BaseFrequencyY, baseFrequencyY)
-        DECLARE_ANIMATED_INTEGER(NumOctaves, numOctaves)
-        DECLARE_ANIMATED_NUMBER(Seed, seed)
-        DECLARE_ANIMATED_ENUMERATION(StitchTiles, stitchTiles, SVGStitchOptions)
-        DECLARE_ANIMATED_ENUMERATION(Type, type, TurbulenceType)
-    END_DECLARE_ANIMATED_PROPERTIES
+    AttributeOwnerProxy m_attributeOwnerProxy { *this };
+    SVGAnimatedNumberAttribute m_baseFrequencyX;
+    SVGAnimatedNumberAttribute m_baseFrequencyY;
+    SVGAnimatedIntegerAttribute m_numOctaves { 1 };
+    SVGAnimatedNumberAttribute m_seed;
+    SVGAnimatedEnumerationAttribute<SVGStitchOptions> m_stitchTiles { SVG_STITCHTYPE_NOSTITCH };
+    SVGAnimatedEnumerationAttribute<TurbulenceType> m_type { TurbulenceType::Turbulence };
 };
 
 } // n