<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[243036] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/243036">243036</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2019-03-16 00:42:41 -0700 (Sat, 16 Mar 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove the SVG property tear off objects for SVGAnimatedInteger
https://bugs.webkit.org/show_bug.cgi?id=195722

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

Instead of saving a raw integer value in the SVGElement and then wrapping
the pointer to this raw data in a tear off object, we will represent the
integer as Ref<SVGAnimatedInteger> in SVGElement. This will make the
representation of the property in IDL file match the C++ header file.

When the DOM requests the SVGAnimatedInteger, we get return a reference
to the new animated property. When the rendering code asks for the current
value of the this animated property, we return the animVal() or the
baseVal() depending on whether the property is animating or not.

A pointer to a member in the SVGElement will be registered along with the
associated attribute name in SVGPropertyRegistry. Registering the property
creates an SVGMemberAccessor and links to the associated attribute. The
function of SVGMemberAccessor is to retrieve the value of the property
given a pointer to an SVGElement.

SVGPropertyRegistry manages all the properties of SVGElement. It takes
into account the inherited properties as well.

SVGElement will have a virtual method called propertyRegistry(). Every
superclass will override this method to return a reference to its registry
which includes all the registered properties of this class and its bases.

One important function of the SVGPropertyRegistry and SVGAccessor is they
create the appropriate SVGAttributeAnimator for this property.

SVGAttributeAnimator is just a connection between the animated property
and SVGAnimationFunction. SVGAnimationFunction calculates the values of
the animated property within a time interval. SVGAnimatedPropertyAnimator
updates animVal of the animated property and invalidates the associated
SVGElement and all the instances that references this element.

The plan is to remove all the SVG tear off objects like what this patch
does for SVGAnimatedInteger. So for a period of time the old code and the
new code will co-exist together. These things to consider when reviewing
this patch:

-- SVGAnimatedElementBase was re-factored to use SVGAttributeAnimationControllerBase
which is inherited by SVGLegacyAttributeAnimationController and
SVGAttributeAnimationController. The tear-off properties code which uses
SVGAnimatedType now lives in SVGLegacyAttributeAnimationController. The
new code was added to SVGAttributeAnimationController. The plan is to
remove the three animation controllers and to move the code of
SVGAttributeAnimationController to SVGAnimatedElementBase when all the tear
off code is removed.

-- SVGElement now keeps two registries one for the tear-off world and the
other for the new world. Eventually we need to get rid of tear-off registry.

-- SVGElement will differentiate between the type of the property by the
the method isAnimatedAttribute().

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* svg/SVGAnimateElementBase.cpp:
(WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
(WebCore::SVGAnimateElementBase::attributeAnimationController):
(WebCore::SVGAnimateElementBase::attributeAnimationControllerIfExists):
(WebCore::SVGAnimateElementBase::hasValidAttributeType const):
(WebCore::SVGAnimateElementBase::determineAnimatedPropertyType const):
(WebCore::SVGAnimateElementBase::calculateAnimatedValue):
(WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
(WebCore::SVGAnimateElementBase::calculateFromAndToValues):
(WebCore::SVGAnimateElementBase::calculateFromAndByValues):
(WebCore::SVGAnimateElementBase::resetAnimatedType):
(WebCore::SVGAnimateElementBase::clearAnimatedType):
(WebCore::SVGAnimateElementBase::applyResultsToTarget):
(WebCore::SVGAnimateElementBase::isAdditive const):
(WebCore::SVGAnimateElementBase::calculateDistance):
(WebCore::SVGAnimateElementBase::setTargetElement):
(WebCore::SVGAnimateElementBase::setAttributeName):
(WebCore::SVGAnimateElementBase::resetAnimation):
(WebCore::SVGAnimateElementBase::hasInvalidCSSAttributeType const):
(WebCore::SVGAnimateElementBase::hasValidAttributeType): Deleted.
(WebCore::propertyTypesAreConsistent): Deleted.
(WebCore::applyCSSPropertyToTarget): Deleted.
(WebCore::removeCSSPropertyFromTarget): Deleted.
(WebCore::applyCSSPropertyToTargetAndInstances): Deleted.
(WebCore::removeCSSPropertyFromTargetAndInstances): Deleted.
(WebCore::notifyTargetAboutAnimValChange): Deleted.
(WebCore::notifyTargetAndInstancesAboutAnimValChange): Deleted.
(WebCore::SVGAnimateElementBase::animatedPropertyTypeSupportsAddition const): Deleted.
(WebCore::SVGAnimateElementBase::resetAnimatedPropertyType): Deleted.
(WebCore::SVGAnimateElementBase::ensureAnimator): Deleted.
* svg/SVGAnimateElementBase.h:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType const):
(WebCore::SVGAnimateMotionElement::hasValidAttributeName const):
(WebCore::SVGAnimateMotionElement::hasValidAttributeType): Deleted.
(WebCore::SVGAnimateMotionElement::hasValidAttributeName): Deleted.
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::hasValidAttributeType const):
(WebCore::SVGAnimateTransformElement::hasValidAttributeType): Deleted.
* svg/SVGAnimateTransformElement.h:
* svg/SVGAnimatedInteger.cpp: Removed.
* svg/SVGAnimatedInteger.h: Removed.
* svg/SVGAnimatedIntegerOptionalInteger.cpp: Removed.
* svg/SVGAnimatedIntegerOptionalInteger.h: Removed.
* svg/SVGAnimatedPointList.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::setAttributeType):
(WebCore::SVGAnimationElement::resetAnimation):
(WebCore::SVGAnimationElement::resetAnimatedPropertyType): Deleted.
(WebCore::SVGAnimationElement::setTargetElement): Deleted.
(WebCore::SVGAnimationElement::checkInvalidCSSAttributeType): Deleted.
* svg/SVGAnimationElement.h:
(WebCore::SVGAnimationElement::attributeType const):
(WebCore::SVGAnimationElement::hasInvalidCSSAttributeType const): Deleted.
* svg/SVGAnimatorFactory.h:
(WebCore::SVGAnimatorFactory::create):
* svg/SVGAttributeAnimationController.cpp: Added.
(WebCore::SVGAttributeAnimationController::SVGAttributeAnimationController):
(WebCore::SVGAttributeAnimationController::animator const):
(WebCore::SVGAttributeAnimationController::isDiscreteAnimator const):
(WebCore::SVGAttributeAnimationController::isAdditive const):
(WebCore::SVGAttributeAnimationController::hasValidAttributeType const):
(WebCore::SVGAttributeAnimationController::calculateFromAndToValues):
(WebCore::SVGAttributeAnimationController::calculateFromAndByValues):
(WebCore::SVGAttributeAnimationController::calculateToAtEndOfDurationValue):
(WebCore::SVGAttributeAnimationController::resetAnimatedType):
(WebCore::SVGAttributeAnimationController::calculateAnimatedValue):
(WebCore::SVGAttributeAnimationController::applyResultsToTarget):
(WebCore::SVGAttributeAnimationController::clearAnimatedType):
(WebCore::SVGAttributeAnimationController::calculateDistance):
* svg/SVGAttributeAnimationController.h: Added.
(WebCore::SVGAttributeAnimationController::animatorIfExists const):
* svg/SVGAttributeAnimationControllerBase.cpp: Added.
(WebCore::SVGAttributeAnimationControllerBase::SVGAttributeAnimationControllerBase):
(WebCore::SVGAttributeAnimationControllerBase::determineAnimatedPropertyType):
* svg/SVGAttributeAnimationControllerBase.h: Added.
* svg/SVGElement.cpp:
(WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
(WebCore::SVGElement::synchronizeAnimatedSVGAttribute const):
(WebCore::SVGElement::commitPropertyChange):
(WebCore::SVGElement::isAnimatedPropertyAttribute const):
(WebCore::SVGElement::isAnimatedAttribute const):
(WebCore::SVGElement::createAnimator):
* svg/SVGElement.h:
(WebCore::SVGElement::propertyRegistry const):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
(WebCore::SVGFEConvolveMatrixElement::registerAttributes):
(WebCore::SVGFEConvolveMatrixElement::parseAttribute):
(WebCore::SVGFEConvolveMatrixElement::setOrder):
(WebCore::SVGFEConvolveMatrixElement::orderXIdentifier): Deleted.
(WebCore::SVGFEConvolveMatrixElement::orderYIdentifier): Deleted.
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
(WebCore::SVGFETurbulenceElement::registerAttributes):
(WebCore::SVGFETurbulenceElement::parseAttribute):
(WebCore::SVGFETurbulenceElement::svgAttributeChanged):
* svg/SVGFETurbulenceElement.h:
* svg/SVGFilterElement.h:
* svg/SVGLegacyAttributeAnimationController.cpp: Added.
(WebCore::SVGLegacyAttributeAnimationController::SVGLegacyAttributeAnimationController):
(WebCore::SVGLegacyAttributeAnimationController::animatedTypeAnimator):
(WebCore::SVGLegacyAttributeAnimationController::isAdditive const):
(WebCore::SVGLegacyAttributeAnimationController::hasValidAttributeType const):
(WebCore::SVGLegacyAttributeAnimationController::calculateFromAndToValues):
(WebCore::SVGLegacyAttributeAnimationController::calculateFromAndByValues):
(WebCore::SVGLegacyAttributeAnimationController::calculateToAtEndOfDurationValue):
(WebCore::propertyTypesAreConsistent):
(WebCore::SVGLegacyAttributeAnimationController::resetAnimatedType):
(WebCore::SVGLegacyAttributeAnimationController::calculateAnimatedValue):
(WebCore::applyCSSPropertyToTarget):
(WebCore::removeCSSPropertyFromTarget):
(WebCore::applyCSSPropertyToTargetAndInstances):
(WebCore::removeCSSPropertyFromTargetAndInstances):
(WebCore::notifyTargetAboutAnimValChange):
(WebCore::notifyTargetAndInstancesAboutAnimValChange):
(WebCore::SVGLegacyAttributeAnimationController::applyResultsToTarget):
(WebCore::SVGLegacyAttributeAnimationController::clearAnimatedType):
(WebCore::SVGLegacyAttributeAnimationController::calculateDistance):
* svg/SVGLegacyAttributeAnimationController.h: Added.
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::hasValidAttributeName const):
(WebCore::SVGSMILElement::hasValidAttributeName): Deleted.
* svg/animation/SVGSMILElement.h:
* svg/properties/SVGAnimatedPrimitiveProperty.h: Added.
(WebCore::SVGAnimatedPrimitiveProperty::create):
(WebCore::SVGAnimatedPrimitiveProperty::setBaseVal):
(WebCore::SVGAnimatedPrimitiveProperty::setBaseValInternal):
(WebCore::SVGAnimatedPrimitiveProperty::baseVal const):
(WebCore::SVGAnimatedPrimitiveProperty::setAnimVal):
(WebCore::SVGAnimatedPrimitiveProperty::animVal const):
(WebCore::SVGAnimatedPrimitiveProperty::animVal):
(WebCore::SVGAnimatedPrimitiveProperty::currentValue const):
(WebCore::SVGAnimatedPrimitiveProperty::SVGAnimatedPrimitiveProperty):
* svg/properties/SVGAnimatedProperty.cpp: Added.
(WebCore::SVGAnimatedProperty::owner const):
(WebCore::SVGAnimatedProperty::commitPropertyChange):
* svg/properties/SVGAnimatedProperty.h: Added.
(WebCore::SVGAnimatedProperty::isAttached const):
(WebCore::SVGAnimatedProperty::detach):
(WebCore::SVGAnimatedProperty::contextElement const):
(WebCore::SVGAnimatedProperty::baseValAsString const):
(WebCore::SVGAnimatedProperty::animValAsString const):
(WebCore::SVGAnimatedProperty::isDirty const):
(WebCore::SVGAnimatedProperty::setDirty):
(WebCore::SVGAnimatedProperty::synchronize):
(WebCore::SVGAnimatedProperty::isAnimating const):
(WebCore::SVGAnimatedProperty::startAnimation):
(WebCore::SVGAnimatedProperty::stopAnimation):
(WebCore::SVGAnimatedProperty::instanceStartAnimation):
(WebCore::SVGAnimatedProperty::instanceStopAnimation):
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
* svg/properties/SVGAnimatedPropertyAccessor.h: Added.
* svg/properties/SVGAnimatedPropertyAccessorImpl.h: Added.
* svg/properties/SVGAnimatedPropertyAnimator.h: Added.
(WebCore::SVGAnimatedPropertyAnimator::appendAnimatedInstance):
(WebCore::SVGAnimatedPropertyAnimator::SVGAnimatedPropertyAnimator):
* svg/properties/SVGAnimatedPropertyAnimatorImpl.h: Added.
* svg/properties/SVGAnimatedPropertyImpl.h: Added.
* svg/properties/SVGAnimatedPropertyPairAccessor.h: Added.
(WebCore::SVGAnimatedPropertyPairAccessor::SVGAnimatedPropertyPairAccessor):
(WebCore::SVGAnimatedPropertyPairAccessor::singleton):
(WebCore::SVGAnimatedPropertyPairAccessor::property1 const):
(WebCore::SVGAnimatedPropertyPairAccessor::property2 const):
* svg/properties/SVGAnimatedPropertyPairAccessorImpl.h: Added.
* svg/properties/SVGAnimatedPropertyPairAnimator.h: Added.
(WebCore::SVGAnimatedPropertyPairAnimator::appendAnimatedInstance):
(WebCore::SVGAnimatedPropertyPairAnimator::SVGAnimatedPropertyPairAnimator):
* svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: Added.
* svg/properties/SVGAnimationAdditiveFunction.h: Added.
(WebCore::SVGAnimationAdditiveFunction::SVGAnimationAdditiveFunction):
(WebCore::SVGAnimationAdditiveFunction::progress):
* svg/properties/SVGAnimationAdditiveValueFunction.h: Added.
(WebCore::SVGAnimationAdditiveValueFunction::toAtEndOfDuration const):
* svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: Added.
(WebCore::SVGAnimationIntegerFunction::progress):
* svg/properties/SVGAnimationFunction.h: Added.
(WebCore::SVGAnimationFunction::isDiscrete const):
(WebCore::SVGAnimationFunction::calculateDistance const):
(WebCore::SVGAnimationFunction::SVGAnimationFunction):
(WebCore::SVGAnimationFunction::addFromAndToValues):
* svg/properties/SVGAttributeAnimator.cpp: Added.
(WebCore::SVGAttributeAnimator::applyAnimatedPropertyChange):
* svg/properties/SVGAttributeAnimator.h: Added.
(WebCore::SVGAttributeAnimator::SVGAttributeAnimator):
(WebCore::SVGAttributeAnimator::isDiscrete const):
(WebCore::SVGAttributeAnimator::setFromAndToValues):
(WebCore::SVGAttributeAnimator::setFromAndByValues):
(WebCore::SVGAttributeAnimator::setToAtEndOfDurationValue):
(WebCore::SVGAttributeAnimator::calculateDistance const):
* svg/properties/SVGAttributeOwnerProxy.cpp:
* svg/properties/SVGAttributeOwnerProxy.h:
* svg/properties/SVGAttributeRegistry.h:
* svg/properties/SVGMemberAccessor.h: Added.
(WebCore::SVGMemberAccessor::detach const):
(WebCore::SVGMemberAccessor::isAnimatedProperty const):
(WebCore::SVGMemberAccessor::isAnimatedLength const):
(WebCore::SVGMemberAccessor::matches const):
(WebCore::SVGMemberAccessor::synchronize const):
(WebCore::SVGMemberAccessor::createAnimator const):
(WebCore::SVGMemberAccessor::appendAnimatedInstance const):
* svg/properties/SVGPointerMemberAccessor.h: Added.
(WebCore::SVGPointerMemberAccessor::SVGPointerMemberAccessor):
(WebCore::SVGPointerMemberAccessor::property const):
(WebCore::SVGPointerMemberAccessor::singleton):
* svg/properties/SVGProperty.h: Added.
* svg/properties/SVGPropertyOwner.h: Added.
(WebCore::SVGPropertyOwner::owner const):
(WebCore::SVGPropertyOwner::attributeContextElement const):
(WebCore::SVGPropertyOwner::commitPropertyChange):
* svg/properties/SVGPropertyOwnerRegistry.h: Added.
(WebCore::SVGPropertyOwnerRegistry::SVGPropertyOwnerRegistry):
(WebCore::SVGPropertyOwnerRegistry::registerProperty):
(WebCore::SVGPropertyOwnerRegistry::enumerateRecursively):
(WebCore::SVGPropertyOwnerRegistry::isKnownAttribute):
(WebCore::SVGPropertyOwnerRegistry::enumerateRecursivelyBaseTypes):
(WebCore::SVGPropertyOwnerRegistry::findAccessor):
* svg/properties/SVGPropertyRegistry.h: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreSourcestxt">trunk/Source/WebCore/Sources.txt</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateElementBasecpp">trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateElementBaseh">trunk/Source/WebCore/svg/SVGAnimateElementBase.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateMotionElementcpp">trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateMotionElementh">trunk/Source/WebCore/svg/SVGAnimateMotionElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateTransformElementcpp">trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimateTransformElementh">trunk/Source/WebCore/svg/SVGAnimateTransformElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimatedPointListh">trunk/Source/WebCore/svg/SVGAnimatedPointList.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimationElementcpp">trunk/Source/WebCore/svg/SVGAnimationElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimationElementh">trunk/Source/WebCore/svg/SVGAnimationElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimatorFactoryh">trunk/Source/WebCore/svg/SVGAnimatorFactory.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementcpp">trunk/Source/WebCore/svg/SVGElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGElementh">trunk/Source/WebCore/svg/SVGElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFEConvolveMatrixElementcpp">trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFEConvolveMatrixElementh">trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFETurbulenceElementcpp">trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFETurbulenceElementh">trunk/Source/WebCore/svg/SVGFETurbulenceElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGFilterElementh">trunk/Source/WebCore/svg/SVGFilterElement.h</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementcpp">trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvganimationSVGSMILElementh">trunk/Source/WebCore/svg/animation/SVGSMILElement.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp">trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh">trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAttributeRegistryh">trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoresvgSVGAttributeAnimationControllercpp">trunk/Source/WebCore/svg/SVGAttributeAnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAttributeAnimationControllerh">trunk/Source/WebCore/svg/SVGAttributeAnimationController.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAttributeAnimationControllerBasecpp">trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAttributeAnimationControllerBaseh">trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLegacyAttributeAnimationControllercpp">trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGLegacyAttributeAnimationControllerh">trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPrimitivePropertyh">trunk/Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertycpp">trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyh">trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAccessorh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessor.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAccessorImplh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAnimatorh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimator.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAnimatorImplh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyImplh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyImpl.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAccessorh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAccessorImplh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessorImpl.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAnimatorh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimator.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAnimatorImplh">trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimationAdditiveFunctionh">trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveFunction.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimationAdditiveValueFunctionh">trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunction.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimationAdditiveValueFunctionImplh">trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAnimationFunctionh">trunk/Source/WebCore/svg/properties/SVGAnimationFunction.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAttributeAnimatorcpp">trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGAttributeAnimatorh">trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGMemberAccessorh">trunk/Source/WebCore/svg/properties/SVGMemberAccessor.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGPointerMemberAccessorh">trunk/Source/WebCore/svg/properties/SVGPointerMemberAccessor.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGPropertyh">trunk/Source/WebCore/svg/properties/SVGProperty.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGPropertyOwnerh">trunk/Source/WebCore/svg/properties/SVGPropertyOwner.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGPropertyOwnerRegistryh">trunk/Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h</a></li>
<li><a href="#trunkSourceWebCoresvgpropertiesSVGPropertyRegistryh">trunk/Source/WebCore/svg/properties/SVGPropertyRegistry.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoresvgSVGAnimatedIntegercpp">trunk/Source/WebCore/svg/SVGAnimatedInteger.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimatedIntegerh">trunk/Source/WebCore/svg/SVGAnimatedInteger.h</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimatedIntegerOptionalIntegercpp">trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGAnimatedIntegerOptionalIntegerh">trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/ChangeLog      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,3 +1,287 @@
</span><ins>+2019-03-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        Remove the SVG property tear off objects for SVGAnimatedInteger
+        https://bugs.webkit.org/show_bug.cgi?id=195722
+
+        Reviewed by Simon Fraser.
+
+        Instead of saving a raw integer value in the SVGElement and then wrapping
+        the pointer to this raw data in a tear off object, we will represent the
+        integer as Ref<SVGAnimatedInteger> in SVGElement. This will make the 
+        representation of the property in IDL file match the C++ header file.
+
+        When the DOM requests the SVGAnimatedInteger, we get return a reference
+        to the new animated property. When the rendering code asks for the current
+        value of the this animated property, we return the animVal() or the
+        baseVal() depending on whether the property is animating or not.
+
+        A pointer to a member in the SVGElement will be registered along with the
+        associated attribute name in SVGPropertyRegistry. Registering the property
+        creates an SVGMemberAccessor and links to the associated attribute. The
+        function of SVGMemberAccessor is to retrieve the value of the property
+        given a pointer to an SVGElement.
+
+        SVGPropertyRegistry manages all the properties of SVGElement. It takes
+        into account the inherited properties as well.
+
+        SVGElement will have a virtual method called propertyRegistry(). Every
+        superclass will override this method to return a reference to its registry
+        which includes all the registered properties of this class and its bases.
+
+        One important function of the SVGPropertyRegistry and SVGAccessor is they
+        create the appropriate SVGAttributeAnimator for this property.
+
+        SVGAttributeAnimator is just a connection between the animated property
+        and SVGAnimationFunction. SVGAnimationFunction calculates the values of
+        the animated property within a time interval. SVGAnimatedPropertyAnimator
+        updates animVal of the animated property and invalidates the associated
+        SVGElement and all the instances that references this element.
+
+        The plan is to remove all the SVG tear off objects like what this patch
+        does for SVGAnimatedInteger. So for a period of time the old code and the
+        new code will co-exist together. These things to consider when reviewing
+        this patch:
+
+        -- SVGAnimatedElementBase was re-factored to use SVGAttributeAnimationControllerBase
+        which is inherited by SVGLegacyAttributeAnimationController and
+        SVGAttributeAnimationController. The tear-off properties code which uses
+        SVGAnimatedType now lives in SVGLegacyAttributeAnimationController. The
+        new code was added to SVGAttributeAnimationController. The plan is to 
+        remove the three animation controllers and to move the code of
+        SVGAttributeAnimationController to SVGAnimatedElementBase when all the tear
+        off code is removed.
+
+        -- SVGElement now keeps two registries one for the tear-off world and the
+        other for the new world. Eventually we need to get rid of tear-off registry.
+
+        -- SVGElement will differentiate between the type of the property by the
+        the method isAnimatedAttribute().
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        * svg/SVGAnimateElementBase.cpp:
+        (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
+        (WebCore::SVGAnimateElementBase::attributeAnimationController):
+        (WebCore::SVGAnimateElementBase::attributeAnimationControllerIfExists):
+        (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
+        (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType const):
+        (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
+        (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
+        (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
+        (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
+        (WebCore::SVGAnimateElementBase::resetAnimatedType):
+        (WebCore::SVGAnimateElementBase::clearAnimatedType):
+        (WebCore::SVGAnimateElementBase::applyResultsToTarget):
+        (WebCore::SVGAnimateElementBase::isAdditive const):
+        (WebCore::SVGAnimateElementBase::calculateDistance):
+        (WebCore::SVGAnimateElementBase::setTargetElement):
+        (WebCore::SVGAnimateElementBase::setAttributeName):
+        (WebCore::SVGAnimateElementBase::resetAnimation):
+        (WebCore::SVGAnimateElementBase::hasInvalidCSSAttributeType const):
+        (WebCore::SVGAnimateElementBase::hasValidAttributeType): Deleted.
+        (WebCore::propertyTypesAreConsistent): Deleted.
+        (WebCore::applyCSSPropertyToTarget): Deleted.
+        (WebCore::removeCSSPropertyFromTarget): Deleted.
+        (WebCore::applyCSSPropertyToTargetAndInstances): Deleted.
+        (WebCore::removeCSSPropertyFromTargetAndInstances): Deleted.
+        (WebCore::notifyTargetAboutAnimValChange): Deleted.
+        (WebCore::notifyTargetAndInstancesAboutAnimValChange): Deleted.
+        (WebCore::SVGAnimateElementBase::animatedPropertyTypeSupportsAddition const): Deleted.
+        (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType): Deleted.
+        (WebCore::SVGAnimateElementBase::ensureAnimator): Deleted.
+        * svg/SVGAnimateElementBase.h:
+        * svg/SVGAnimateMotionElement.cpp:
+        (WebCore::SVGAnimateMotionElement::hasValidAttributeType const):
+        (WebCore::SVGAnimateMotionElement::hasValidAttributeName const):
+        (WebCore::SVGAnimateMotionElement::hasValidAttributeType): Deleted.
+        (WebCore::SVGAnimateMotionElement::hasValidAttributeName): Deleted.
+        * svg/SVGAnimateMotionElement.h:
+        * svg/SVGAnimateTransformElement.cpp:
+        (WebCore::SVGAnimateTransformElement::hasValidAttributeType const):
+        (WebCore::SVGAnimateTransformElement::hasValidAttributeType): Deleted.
+        * svg/SVGAnimateTransformElement.h:
+        * svg/SVGAnimatedInteger.cpp: Removed.
+        * svg/SVGAnimatedInteger.h: Removed.
+        * svg/SVGAnimatedIntegerOptionalInteger.cpp: Removed.
+        * svg/SVGAnimatedIntegerOptionalInteger.h: Removed.
+        * svg/SVGAnimatedPointList.h:
+        * svg/SVGAnimationElement.cpp:
+        (WebCore::SVGAnimationElement::setAttributeType):
+        (WebCore::SVGAnimationElement::resetAnimation):
+        (WebCore::SVGAnimationElement::resetAnimatedPropertyType): Deleted.
+        (WebCore::SVGAnimationElement::setTargetElement): Deleted.
+        (WebCore::SVGAnimationElement::checkInvalidCSSAttributeType): Deleted.
+        * svg/SVGAnimationElement.h:
+        (WebCore::SVGAnimationElement::attributeType const):
+        (WebCore::SVGAnimationElement::hasInvalidCSSAttributeType const): Deleted.
+        * svg/SVGAnimatorFactory.h:
+        (WebCore::SVGAnimatorFactory::create):
+        * svg/SVGAttributeAnimationController.cpp: Added.
+        (WebCore::SVGAttributeAnimationController::SVGAttributeAnimationController):
+        (WebCore::SVGAttributeAnimationController::animator const):
+        (WebCore::SVGAttributeAnimationController::isDiscreteAnimator const):
+        (WebCore::SVGAttributeAnimationController::isAdditive const):
+        (WebCore::SVGAttributeAnimationController::hasValidAttributeType const):
+        (WebCore::SVGAttributeAnimationController::calculateFromAndToValues):
+        (WebCore::SVGAttributeAnimationController::calculateFromAndByValues):
+        (WebCore::SVGAttributeAnimationController::calculateToAtEndOfDurationValue):
+        (WebCore::SVGAttributeAnimationController::resetAnimatedType):
+        (WebCore::SVGAttributeAnimationController::calculateAnimatedValue):
+        (WebCore::SVGAttributeAnimationController::applyResultsToTarget):
+        (WebCore::SVGAttributeAnimationController::clearAnimatedType):
+        (WebCore::SVGAttributeAnimationController::calculateDistance):
+        * svg/SVGAttributeAnimationController.h: Added.
+        (WebCore::SVGAttributeAnimationController::animatorIfExists const):
+        * svg/SVGAttributeAnimationControllerBase.cpp: Added.
+        (WebCore::SVGAttributeAnimationControllerBase::SVGAttributeAnimationControllerBase):
+        (WebCore::SVGAttributeAnimationControllerBase::determineAnimatedPropertyType):
+        * svg/SVGAttributeAnimationControllerBase.h: Added.
+        * svg/SVGElement.cpp:
+        (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
+        (WebCore::SVGElement::synchronizeAnimatedSVGAttribute const):
+        (WebCore::SVGElement::commitPropertyChange):
+        (WebCore::SVGElement::isAnimatedPropertyAttribute const):
+        (WebCore::SVGElement::isAnimatedAttribute const):
+        (WebCore::SVGElement::createAnimator):
+        * svg/SVGElement.h:
+        (WebCore::SVGElement::propertyRegistry const):
+        * svg/SVGFEConvolveMatrixElement.cpp:
+        (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
+        (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
+        (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
+        (WebCore::SVGFEConvolveMatrixElement::setOrder):
+        (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier): Deleted.
+        (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier): Deleted.
+        * svg/SVGFEConvolveMatrixElement.h:
+        * svg/SVGFETurbulenceElement.cpp:
+        (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
+        (WebCore::SVGFETurbulenceElement::registerAttributes):
+        (WebCore::SVGFETurbulenceElement::parseAttribute):
+        (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
+        * svg/SVGFETurbulenceElement.h:
+        * svg/SVGFilterElement.h:
+        * svg/SVGLegacyAttributeAnimationController.cpp: Added.
+        (WebCore::SVGLegacyAttributeAnimationController::SVGLegacyAttributeAnimationController):
+        (WebCore::SVGLegacyAttributeAnimationController::animatedTypeAnimator):
+        (WebCore::SVGLegacyAttributeAnimationController::isAdditive const):
+        (WebCore::SVGLegacyAttributeAnimationController::hasValidAttributeType const):
+        (WebCore::SVGLegacyAttributeAnimationController::calculateFromAndToValues):
+        (WebCore::SVGLegacyAttributeAnimationController::calculateFromAndByValues):
+        (WebCore::SVGLegacyAttributeAnimationController::calculateToAtEndOfDurationValue):
+        (WebCore::propertyTypesAreConsistent):
+        (WebCore::SVGLegacyAttributeAnimationController::resetAnimatedType):
+        (WebCore::SVGLegacyAttributeAnimationController::calculateAnimatedValue):
+        (WebCore::applyCSSPropertyToTarget):
+        (WebCore::removeCSSPropertyFromTarget):
+        (WebCore::applyCSSPropertyToTargetAndInstances):
+        (WebCore::removeCSSPropertyFromTargetAndInstances):
+        (WebCore::notifyTargetAboutAnimValChange):
+        (WebCore::notifyTargetAndInstancesAboutAnimValChange):
+        (WebCore::SVGLegacyAttributeAnimationController::applyResultsToTarget):
+        (WebCore::SVGLegacyAttributeAnimationController::clearAnimatedType):
+        (WebCore::SVGLegacyAttributeAnimationController::calculateDistance):
+        * svg/SVGLegacyAttributeAnimationController.h: Added.
+        * svg/animation/SVGSMILElement.cpp:
+        (WebCore::SVGSMILElement::hasValidAttributeName const):
+        (WebCore::SVGSMILElement::hasValidAttributeName): Deleted.
+        * svg/animation/SVGSMILElement.h:
+        * svg/properties/SVGAnimatedPrimitiveProperty.h: Added.
+        (WebCore::SVGAnimatedPrimitiveProperty::create):
+        (WebCore::SVGAnimatedPrimitiveProperty::setBaseVal):
+        (WebCore::SVGAnimatedPrimitiveProperty::setBaseValInternal):
+        (WebCore::SVGAnimatedPrimitiveProperty::baseVal const):
+        (WebCore::SVGAnimatedPrimitiveProperty::setAnimVal):
+        (WebCore::SVGAnimatedPrimitiveProperty::animVal const):
+        (WebCore::SVGAnimatedPrimitiveProperty::animVal):
+        (WebCore::SVGAnimatedPrimitiveProperty::currentValue const):
+        (WebCore::SVGAnimatedPrimitiveProperty::SVGAnimatedPrimitiveProperty):
+        * svg/properties/SVGAnimatedProperty.cpp: Added.
+        (WebCore::SVGAnimatedProperty::owner const):
+        (WebCore::SVGAnimatedProperty::commitPropertyChange):
+        * svg/properties/SVGAnimatedProperty.h: Added.
+        (WebCore::SVGAnimatedProperty::isAttached const):
+        (WebCore::SVGAnimatedProperty::detach):
+        (WebCore::SVGAnimatedProperty::contextElement const):
+        (WebCore::SVGAnimatedProperty::baseValAsString const):
+        (WebCore::SVGAnimatedProperty::animValAsString const):
+        (WebCore::SVGAnimatedProperty::isDirty const):
+        (WebCore::SVGAnimatedProperty::setDirty):
+        (WebCore::SVGAnimatedProperty::synchronize):
+        (WebCore::SVGAnimatedProperty::isAnimating const):
+        (WebCore::SVGAnimatedProperty::startAnimation):
+        (WebCore::SVGAnimatedProperty::stopAnimation):
+        (WebCore::SVGAnimatedProperty::instanceStartAnimation):
+        (WebCore::SVGAnimatedProperty::instanceStopAnimation):
+        (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
+        * svg/properties/SVGAnimatedPropertyAccessor.h: Added.
+        * svg/properties/SVGAnimatedPropertyAccessorImpl.h: Added.
+        * svg/properties/SVGAnimatedPropertyAnimator.h: Added.
+        (WebCore::SVGAnimatedPropertyAnimator::appendAnimatedInstance):
+        (WebCore::SVGAnimatedPropertyAnimator::SVGAnimatedPropertyAnimator):
+        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h: Added.
+        * svg/properties/SVGAnimatedPropertyImpl.h: Added.
+        * svg/properties/SVGAnimatedPropertyPairAccessor.h: Added.
+        (WebCore::SVGAnimatedPropertyPairAccessor::SVGAnimatedPropertyPairAccessor):
+        (WebCore::SVGAnimatedPropertyPairAccessor::singleton):
+        (WebCore::SVGAnimatedPropertyPairAccessor::property1 const):
+        (WebCore::SVGAnimatedPropertyPairAccessor::property2 const):
+        * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h: Added.
+        * svg/properties/SVGAnimatedPropertyPairAnimator.h: Added.
+        (WebCore::SVGAnimatedPropertyPairAnimator::appendAnimatedInstance):
+        (WebCore::SVGAnimatedPropertyPairAnimator::SVGAnimatedPropertyPairAnimator):
+        * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h: Added.
+        * svg/properties/SVGAnimationAdditiveFunction.h: Added.
+        (WebCore::SVGAnimationAdditiveFunction::SVGAnimationAdditiveFunction):
+        (WebCore::SVGAnimationAdditiveFunction::progress):
+        * svg/properties/SVGAnimationAdditiveValueFunction.h: Added.
+        (WebCore::SVGAnimationAdditiveValueFunction::toAtEndOfDuration const):
+        * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: Added.
+        (WebCore::SVGAnimationIntegerFunction::progress):
+        * svg/properties/SVGAnimationFunction.h: Added.
+        (WebCore::SVGAnimationFunction::isDiscrete const):
+        (WebCore::SVGAnimationFunction::calculateDistance const):
+        (WebCore::SVGAnimationFunction::SVGAnimationFunction):
+        (WebCore::SVGAnimationFunction::addFromAndToValues):
+        * svg/properties/SVGAttributeAnimator.cpp: Added.
+        (WebCore::SVGAttributeAnimator::applyAnimatedPropertyChange):
+        * svg/properties/SVGAttributeAnimator.h: Added.
+        (WebCore::SVGAttributeAnimator::SVGAttributeAnimator):
+        (WebCore::SVGAttributeAnimator::isDiscrete const):
+        (WebCore::SVGAttributeAnimator::setFromAndToValues):
+        (WebCore::SVGAttributeAnimator::setFromAndByValues):
+        (WebCore::SVGAttributeAnimator::setToAtEndOfDurationValue):
+        (WebCore::SVGAttributeAnimator::calculateDistance const):
+        * svg/properties/SVGAttributeOwnerProxy.cpp:
+        * svg/properties/SVGAttributeOwnerProxy.h:
+        * svg/properties/SVGAttributeRegistry.h:
+        * svg/properties/SVGMemberAccessor.h: Added.
+        (WebCore::SVGMemberAccessor::detach const):
+        (WebCore::SVGMemberAccessor::isAnimatedProperty const):
+        (WebCore::SVGMemberAccessor::isAnimatedLength const):
+        (WebCore::SVGMemberAccessor::matches const):
+        (WebCore::SVGMemberAccessor::synchronize const):
+        (WebCore::SVGMemberAccessor::createAnimator const):
+        (WebCore::SVGMemberAccessor::appendAnimatedInstance const):
+        * svg/properties/SVGPointerMemberAccessor.h: Added.
+        (WebCore::SVGPointerMemberAccessor::SVGPointerMemberAccessor):
+        (WebCore::SVGPointerMemberAccessor::property const):
+        (WebCore::SVGPointerMemberAccessor::singleton):
+        * svg/properties/SVGProperty.h: Added.
+        * svg/properties/SVGPropertyOwner.h: Added.
+        (WebCore::SVGPropertyOwner::owner const):
+        (WebCore::SVGPropertyOwner::attributeContextElement const):
+        (WebCore::SVGPropertyOwner::commitPropertyChange):
+        * svg/properties/SVGPropertyOwnerRegistry.h: Added.
+        (WebCore::SVGPropertyOwnerRegistry::SVGPropertyOwnerRegistry):
+        (WebCore::SVGPropertyOwnerRegistry::registerProperty):
+        (WebCore::SVGPropertyOwnerRegistry::enumerateRecursively):
+        (WebCore::SVGPropertyOwnerRegistry::isKnownAttribute):
+        (WebCore::SVGPropertyOwnerRegistry::enumerateRecursivelyBaseTypes):
+        (WebCore::SVGPropertyOwnerRegistry::findAccessor):
+        * svg/properties/SVGPropertyRegistry.h: Added.
+
</ins><span class="cx"> 2019-03-16  Ryosuke Niwa  <rniwa@webkit.org>
</span><span class="cx"> 
</span><span class="cx">         Remove LayoutAssertionDisableScope after r241289
</span></span></pre></div>
<a id="trunkSourceWebCoreSourcestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Sources.txt (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Sources.txt 2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/Sources.txt    2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -2273,8 +2273,6 @@
</span><span class="cx"> svg/SVGAnimatedBoolean.cpp
</span><span class="cx"> svg/SVGAnimatedColor.cpp
</span><span class="cx"> svg/SVGAnimatedEnumeration.cpp
</span><del>-svg/SVGAnimatedInteger.cpp
-svg/SVGAnimatedIntegerOptionalInteger.cpp
</del><span class="cx"> svg/SVGAnimatedLength.cpp
</span><span class="cx"> svg/SVGAnimatedLengthList.cpp
</span><span class="cx"> svg/SVGAnimatedNumber.cpp
</span><span class="lines">@@ -2288,6 +2286,8 @@
</span><span class="cx"> svg/SVGAnimatedTransformList.cpp
</span><span class="cx"> svg/SVGAnimatedTypeAnimator.cpp
</span><span class="cx"> svg/SVGAnimationElement.cpp
</span><ins>+svg/SVGAttributeAnimationController.cpp
+svg/SVGAttributeAnimationControllerBase.cpp
</ins><span class="cx"> svg/SVGCircleElement.cpp
</span><span class="cx"> svg/SVGClipPathElement.cpp
</span><span class="cx"> svg/SVGComponentTransferFunctionElement.cpp
</span><span class="lines">@@ -2345,6 +2345,7 @@
</span><span class="cx"> svg/SVGImageElement.cpp
</span><span class="cx"> svg/SVGImageLoader.cpp
</span><span class="cx"> svg/SVGLangSpace.cpp
</span><ins>+svg/SVGLegacyAttributeAnimationController.cpp
</ins><span class="cx"> svg/SVGLengthContext.cpp
</span><span class="cx"> svg/SVGLengthListValues.cpp
</span><span class="cx"> svg/SVGLengthValue.cpp
</span><span class="lines">@@ -2424,6 +2425,8 @@
</span><span class="cx"> svg/graphics/filters/SVGFilterBuilder.cpp
</span><span class="cx"> 
</span><span class="cx"> svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp
</span><ins>+svg/properties/SVGAnimatedProperty.cpp
+svg/properties/SVGAttributeAnimator.cpp
</ins><span class="cx"> svg/properties/SVGAttributeOwnerProxy.cpp
</span><span class="cx"> svg/properties/SVGLegacyAnimatedProperty.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -242,7 +242,6 @@
</span><span class="cx">          081668DA125603D5006F25DE /* SVGTextLayoutEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 081668D8125603D5006F25DE /* SVGTextLayoutEngine.h */; };
</span><span class="cx">          081AA8DA1111237E002AB06E /* SVGElementRareData.h in Headers */ = {isa = PBXBuildFile; fileRef = 081AA8D91111237E002AB06E /* SVGElementRareData.h */; };
</span><span class="cx">          081EBF3B0FD34F4100DA7559 /* SVGFilterBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081EBF390FD34F4100DA7559 /* SVGFilterBuilder.h */; };
</span><del>-               0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */; };
</del><span class="cx">           08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */ = {isa = PBXBuildFile; fileRef = 08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */; };
</span><span class="cx">          082DE42D1292621600D923DF /* SVGPathSegWithContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 082DE42C1292621600D923DF /* SVGPathSegWithContext.h */; };
</span><span class="cx">          083DAEA70F01A7FB00342754 /* RenderTextControlMultiLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 083DAEA30F01A7FB00342754 /* RenderTextControlMultiLine.h */; };
</span><span class="lines">@@ -2136,7 +2135,6 @@
</span><span class="cx">          71DCB7021568197600862271 /* JSSVGZoomAndPan.h in Headers */ = {isa = PBXBuildFile; fileRef = 71DCB7001568197600862271 /* JSSVGZoomAndPan.h */; };
</span><span class="cx">          71E2183A17359FB8006E6E4D /* PlugInsResources.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E2183817359FB8006E6E4D /* PlugInsResources.h */; };
</span><span class="cx">          71E2C42621C935280024F8C8 /* AnimationEffectPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E2C42421C9351D0024F8C8 /* AnimationEffectPhase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-               71E623D1151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 71E623CF151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h */; };
</del><span class="cx">           71EADCD822087E720065A45F /* PointerID.h in Headers */ = {isa = PBXBuildFile; fileRef = 71EADCD622087E6D0065A45F /* PointerID.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          71EFCEDC202B38A900D7C411 /* AnimationEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 71EFCED7202B388D00D7C411 /* AnimationEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          71FB967B1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 71FB967A1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h */; };
</span><span class="lines">@@ -5605,7 +5603,6 @@
</span><span class="cx">          081AA8D91111237E002AB06E /* SVGElementRareData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGElementRareData.h; sourceTree = "<group>"; };
</span><span class="cx">          081EBF380FD34F4100DA7559 /* SVGFilterBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFilterBuilder.cpp; sourceTree = "<group>"; };
</span><span class="cx">          081EBF390FD34F4100DA7559 /* SVGFilterBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFilterBuilder.h; sourceTree = "<group>"; };
</span><del>-               0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedInteger.h; sourceTree = "<group>"; };
</del><span class="cx">           08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTransformList.h; sourceTree = "<group>"; };
</span><span class="cx">          082DE42C1292621600D923DF /* SVGPathSegWithContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegWithContext.h; sourceTree = "<group>"; };
</span><span class="cx">          083DAEA20F01A7FB00342754 /* RenderTextControlMultiLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControlMultiLine.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -7692,7 +7689,6 @@
</span><span class="cx">          43D2597613C816F400608559 /* ImageBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageBuffer.cpp; sourceTree = "<group>"; };
</span><span class="cx">          43EDD67C1B485DBF00640E75 /* CombinedFiltersAlphabet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CombinedFiltersAlphabet.cpp; sourceTree = "<group>"; };
</span><span class="cx">          43EDD67D1B485DBF00640E75 /* CombinedFiltersAlphabet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CombinedFiltersAlphabet.h; sourceTree = "<group>"; };
</span><del>-               43F6FD9513BCD0B100224052 /* SVGAnimatedInteger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedInteger.cpp; sourceTree = "<group>"; };
</del><span class="cx">           4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPlugInImageElement.h; sourceTree = "<group>"; };
</span><span class="cx">          4415292D0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPlugInImageElement.cpp; sourceTree = "<group>"; };
</span><span class="cx">          442956CA218A6D300080DB54 /* DictionaryLookupLegacy.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DictionaryLookupLegacy.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -8672,11 +8668,35 @@
</span><span class="cx">          55A336F81D821E3C0022C4C7 /* ImageBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageBackingStore.h; sourceTree = "<group>"; };
</span><span class="cx">          55AF14E31EAAC59B0026EEAA /* UTIRegistry.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UTIRegistry.cpp; sourceTree = "<group>"; };
</span><span class="cx">          55AF14E41EAAC59B0026EEAA /* UTIRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UTIRegistry.h; sourceTree = "<group>"; };
</span><ins>+               55BE0257223B29C00032F08A /* SVGPropertyRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGPropertyRegistry.h; sourceTree = "<group>"; };
+               55BE0259223B29C10032F08A /* SVGAnimationAdditiveValueFunctionImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAnimationAdditiveValueFunctionImpl.h; sourceTree = "<group>"; };
+               55BE025A223B29C20032F08A /* SVGPointerMemberAccessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGPointerMemberAccessor.h; sourceTree = "<group>"; };
+               55BE025B223B29C20032F08A /* SVGAnimationFunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAnimationFunction.h; sourceTree = "<group>"; };
+               55BE025C223B29C30032F08A /* SVGPropertyOwnerRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGPropertyOwnerRegistry.h; sourceTree = "<group>"; };
+               55BE025D223B29C40032F08A /* SVGAnimatedProperty.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedProperty.cpp; sourceTree = "<group>"; };
+               55BE025E223B29C40032F08A /* SVGAnimatedPropertyPairAccessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyPairAccessor.h; sourceTree = "<group>"; };
+               55BE025F223B29C50032F08A /* SVGAnimationAdditiveFunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAnimationAdditiveFunction.h; sourceTree = "<group>"; };
</ins><span class="cx">           55D408F71A7C631800C78450 /* SVGImageClients.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGImageClients.h; sourceTree = "<group>"; };
</span><span class="cx">          55D70D20223B009100044B8E /* SVGLegacyAnimatedProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLegacyAnimatedProperty.h; sourceTree = "<group>"; };
</span><span class="cx">          55D70D21223B00BB00044B8E /* SVGLegacyAnimatedProperty.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLegacyAnimatedProperty.cpp; sourceTree = "<group>"; };
</span><span class="cx">          55D70D22223B00EA00044B8E /* SVGLegacyProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLegacyProperty.h; sourceTree = "<group>"; };
</span><span class="cx">          55EC95972069C92D007DD0A9 /* PaintFrequencyTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaintFrequencyTracker.h; sourceTree = "<group>"; };
</span><ins>+               55EE5354223B29E900FBA944 /* SVGMemberAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMemberAccessor.h; sourceTree = "<group>"; };
+               55EE5356223B29F700FBA944 /* SVGAnimatedPropertyAnimatorImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyAnimatorImpl.h; sourceTree = "<group>"; };
+               55EE5357223B29F800FBA944 /* SVGAnimatedPrimitiveProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPrimitiveProperty.h; sourceTree = "<group>"; };
+               55EE5358223B29F900FBA944 /* SVGAnimatedPropertyAccessorImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyAccessorImpl.h; sourceTree = "<group>"; };
+               55EE5359223B29FA00FBA944 /* SVGAnimatedPropertyAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyAccessor.h; sourceTree = "<group>"; };
+               55EE535A223B29FB00FBA944 /* SVGAnimatedPropertyAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyAnimator.h; sourceTree = "<group>"; };
+               55EE535B223B2A0C00FBA944 /* SVGAnimatedPropertyPairAnimatorImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyPairAnimatorImpl.h; sourceTree = "<group>"; };
+               55EE535C223B2A0D00FBA944 /* SVGAnimatedPropertyImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyImpl.h; sourceTree = "<group>"; };
+               55EE535D223B2A0D00FBA944 /* SVGAnimatedPropertyPairAccessorImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyPairAccessorImpl.h; sourceTree = "<group>"; };
+               55EE535E223B2A0E00FBA944 /* SVGAnimationAdditiveValueFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimationAdditiveValueFunction.h; sourceTree = "<group>"; };
+               55EE535F223B2A0F00FBA944 /* SVGAnimatedPropertyPairAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPropertyPairAnimator.h; sourceTree = "<group>"; };
+               55EE5360223B2A2100FBA944 /* SVGPropertyOwner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPropertyOwner.h; sourceTree = "<group>"; };
+               55EE5361223B2A2200FBA944 /* SVGAttributeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAttributeAnimator.cpp; sourceTree = "<group>"; };
+               55EE5362223B2A2300FBA944 /* SVGAnimatedProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedProperty.h; sourceTree = "<group>"; };
+               55EE5363223B2A2400FBA944 /* SVGProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGProperty.h; sourceTree = "<group>"; };
+               55EE5364223B2A2400FBA944 /* SVGAttributeAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAnimator.h; sourceTree = "<group>"; };
</ins><span class="cx">           55FA7FEF210FA386005AEFE7 /* SVGAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttribute.h; sourceTree = "<group>"; };
</span><span class="cx">          55FA7FF4210FB688005AEFE7 /* SVGAttributeAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAccessor.h; sourceTree = "<group>"; };
</span><span class="cx">          55FA7FF6210FBE3E005AEFE7 /* SVGAttributeRegistry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeRegistry.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -9479,8 +9499,6 @@
</span><span class="cx">          71E2183817359FB8006E6E4D /* PlugInsResources.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; name = PlugInsResources.h; path = DerivedSources/WebCore/PlugInsResources.h; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">          71E2183917359FB8006E6E4D /* PlugInsResourcesData.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; name = PlugInsResourcesData.cpp; path = DerivedSources/WebCore/PlugInsResourcesData.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
</span><span class="cx">          71E2C42421C9351D0024F8C8 /* AnimationEffectPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationEffectPhase.h; sourceTree = "<group>"; };
</span><del>-               71E623CE151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedIntegerOptionalInteger.cpp; sourceTree = "<group>"; };
-               71E623CF151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedIntegerOptionalInteger.h; sourceTree = "<group>"; };
</del><span class="cx">           71EADCD622087E6D0065A45F /* PointerID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PointerID.h; sourceTree = "<group>"; };
</span><span class="cx">          71EFCED6202B388C00D7C411 /* AnimationEffect.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnimationEffect.idl; sourceTree = "<group>"; };
</span><span class="cx">          71EFCED7202B388D00D7C411 /* AnimationEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationEffect.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -9488,6 +9506,12 @@
</span><span class="cx">          71EFCEDE202B39C700D7C411 /* JSAnimationEffectCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnimationEffectCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">          71F936F71DD4F99B00922CC7 /* tracks-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "tracks-support.js"; sourceTree = "<group>"; };
</span><span class="cx">          71FB967A1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedEnumerationPropertyTearOff.h; sourceTree = "<group>"; };
</span><ins>+               723F97BC2238EE08007F079C /* SVGAttributeAnimationController.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAttributeAnimationController.cpp; sourceTree = "<group>"; };
+               723F97BD2238EE08007F079C /* SVGAttributeAnimationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAnimationController.h; sourceTree = "<group>"; };
+               723F97BE2239512D007F079C /* SVGLegacyAttributeAnimationController.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLegacyAttributeAnimationController.cpp; sourceTree = "<group>"; };
+               723F97BF2239512D007F079C /* SVGLegacyAttributeAnimationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGLegacyAttributeAnimationController.h; sourceTree = "<group>"; };
+               723F97C022396B88007F079C /* SVGAttributeAnimationControllerBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAnimationControllerBase.h; sourceTree = "<group>"; };
+               723F97C122397725007F079C /* SVGAttributeAnimationControllerBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAttributeAnimationControllerBase.cpp; sourceTree = "<group>"; };
</ins><span class="cx">           724ED3291A3A7E5400F5F13C /* EXTBlendMinMax.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EXTBlendMinMax.cpp; sourceTree = "<group>"; };
</span><span class="cx">          724ED32A1A3A7E5400F5F13C /* EXTBlendMinMax.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXTBlendMinMax.h; sourceTree = "<group>"; };
</span><span class="cx">          724ED32B1A3A7E5400F5F13C /* EXTBlendMinMax.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EXTBlendMinMax.idl; sourceTree = "<group>"; };
</span><span class="lines">@@ -16186,13 +16210,31 @@
</span><span class="cx">                          088A0DFB126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h */,
</span><span class="cx">                          55FA7FFC2110F813005AEFE7 /* SVGAnimatedPathSegListPropertyTearOff.cpp */,
</span><span class="cx">                          089A8E06128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h */,
</span><ins>+                               55EE5357223B29F800FBA944 /* SVGAnimatedPrimitiveProperty.h */,
+                               55BE025D223B29C40032F08A /* SVGAnimatedProperty.cpp */,
+                               55EE5362223B2A2300FBA944 /* SVGAnimatedProperty.h */,
+                               55EE5359223B29FA00FBA944 /* SVGAnimatedPropertyAccessor.h */,
+                               55EE5358223B29F900FBA944 /* SVGAnimatedPropertyAccessorImpl.h */,
+                               55EE535A223B29FB00FBA944 /* SVGAnimatedPropertyAnimator.h */,
+                               55EE5356223B29F700FBA944 /* SVGAnimatedPropertyAnimatorImpl.h */,
</ins><span class="cx">                           088A0DFD126EF1DB00978F7A /* SVGAnimatedPropertyDescription.h */,
</span><ins>+                               55EE535C223B2A0D00FBA944 /* SVGAnimatedPropertyImpl.h */,
+                               55BE025E223B29C40032F08A /* SVGAnimatedPropertyPairAccessor.h */,
+                               55EE535D223B2A0D00FBA944 /* SVGAnimatedPropertyPairAccessorImpl.h */,
+                               55EE535F223B2A0F00FBA944 /* SVGAnimatedPropertyPairAnimator.h */,
+                               55EE535B223B2A0C00FBA944 /* SVGAnimatedPropertyPairAnimatorImpl.h */,
</ins><span class="cx">                           088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */,
</span><span class="cx">                          55FA7FFE21110E6E005AEFE7 /* SVGAnimatedPropertyType.h */,
</span><span class="cx">                          08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */,
</span><span class="cx">                          085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */,
</span><ins>+                               55BE025F223B29C50032F08A /* SVGAnimationAdditiveFunction.h */,
+                               55EE535E223B2A0E00FBA944 /* SVGAnimationAdditiveValueFunction.h */,
+                               55BE0259223B29C10032F08A /* SVGAnimationAdditiveValueFunctionImpl.h */,
+                               55BE025B223B29C20032F08A /* SVGAnimationFunction.h */,
</ins><span class="cx">                           55FA7FEF210FA386005AEFE7 /* SVGAttribute.h */,
</span><span class="cx">                          55FA7FF4210FB688005AEFE7 /* SVGAttributeAccessor.h */,
</span><ins>+                               55EE5361223B2A2200FBA944 /* SVGAttributeAnimator.cpp */,
+                               55EE5364223B2A2400FBA944 /* SVGAttributeAnimator.h */,
</ins><span class="cx">                           7A3EBEAC21BF0921000D043D /* SVGAttributeOwnerProxy.cpp */,
</span><span class="cx">                          55346AF021150FAF0059BCDD /* SVGAttributeOwnerProxy.h */,
</span><span class="cx">                          55346AFA2117FFAF0059BCDD /* SVGAttributeOwnerProxyImpl.h */,
</span><span class="lines">@@ -16203,6 +16245,12 @@
</span><span class="cx">                          0810764312828556007C63BA /* SVGListProperty.h */,
</span><span class="cx">                          088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
</span><span class="cx">                          08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */,
</span><ins>+                               55EE5354223B29E900FBA944 /* SVGMemberAccessor.h */,
+                               55BE025A223B29C20032F08A /* SVGPointerMemberAccessor.h */,
+                               55EE5363223B2A2400FBA944 /* SVGProperty.h */,
+                               55EE5360223B2A2100FBA944 /* SVGPropertyOwner.h */,
+                               55BE025C223B29C30032F08A /* SVGPropertyOwnerRegistry.h */,
+                               55BE0257223B29C00032F08A /* SVGPropertyRegistry.h */,
</ins><span class="cx">                           088A0E02126EF1DB00978F7A /* SVGPropertyTearOff.h */,
</span><span class="cx">                          088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */,
</span><span class="cx">                          0880F70D1282B46D00948505 /* SVGStaticListPropertyTearOff.h */,
</span><span class="lines">@@ -24073,11 +24121,7 @@
</span><span class="cx">                          71CC7A1F152A0BFE009EEAF9 /* SVGAnimatedEnumeration.cpp */,
</span><span class="cx">                          08D46CE2127AD5FC0089694B /* SVGAnimatedEnumeration.h */,
</span><span class="cx">                          B22277E80D00BF1F0071B782 /* SVGAnimatedEnumeration.idl */,
</span><del>-                               43F6FD9513BCD0B100224052 /* SVGAnimatedInteger.cpp */,
-                               0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */,
</del><span class="cx">                           B22277E90D00BF1F0071B782 /* SVGAnimatedInteger.idl */,
</span><del>-                               71E623CE151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.cpp */,
-                               71E623CF151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h */,
</del><span class="cx">                           4381763A13A697D4007D1187 /* SVGAnimatedLength.cpp */,
</span><span class="cx">                          089021A8126EF5DE0092D5EA /* SVGAnimatedLength.h */,
</span><span class="cx">                          B22277EA0D00BF1F0071B782 /* SVGAnimatedLength.idl */,
</span><span class="lines">@@ -24126,6 +24170,10 @@
</span><span class="cx">                          B22278020D00BF1F0071B782 /* SVGAnimationElement.h */,
</span><span class="cx">                          B22278030D00BF1F0071B782 /* SVGAnimationElement.idl */,
</span><span class="cx">                          439D334213A6911C00C20F4F /* SVGAnimatorFactory.h */,
</span><ins>+                               723F97BC2238EE08007F079C /* SVGAttributeAnimationController.cpp */,
+                               723F97BD2238EE08007F079C /* SVGAttributeAnimationController.h */,
+                               723F97C122397725007F079C /* SVGAttributeAnimationControllerBase.cpp */,
+                               723F97C022396B88007F079C /* SVGAttributeAnimationControllerBase.h */,
</ins><span class="cx">                           B22278040D00BF1F0071B782 /* svgattrs.in */,
</span><span class="cx">                          B22278050D00BF1F0071B782 /* SVGCircleElement.cpp */,
</span><span class="cx">                          B22278060D00BF1F0071B782 /* SVGCircleElement.h */,
</span><span class="lines">@@ -24295,6 +24343,8 @@
</span><span class="cx">                          B28C6A210D00C44800334AA4 /* SVGImageLoader.h */,
</span><span class="cx">                          B22278990D00BF200071B782 /* SVGLangSpace.cpp */,
</span><span class="cx">                          B222789A0D00BF200071B782 /* SVGLangSpace.h */,
</span><ins>+                               723F97BE2239512D007F079C /* SVGLegacyAttributeAnimationController.cpp */,
+                               723F97BF2239512D007F079C /* SVGLegacyAttributeAnimationController.h */,
</ins><span class="cx">                           7CE58D511DD7B09300128552 /* SVGLength.h */,
</span><span class="cx">                          B222789E0D00BF200071B782 /* SVGLength.idl */,
</span><span class="cx">                          7134496B146941B300720312 /* SVGLengthContext.cpp */,
</span><span class="lines">@@ -31862,8 +31912,6 @@
</span><span class="cx">                          43A625F813B3304000AC94B8 /* SVGAnimatedColor.h in Headers */,
</span><span class="cx">                          08D46CE3127AD5FC0089694B /* SVGAnimatedEnumeration.h in Headers */,
</span><span class="cx">                          71FB967B1383D64600AC8A4C /* SVGAnimatedEnumerationPropertyTearOff.h in Headers */,
</span><del>-                               0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */,
-                               71E623D1151F72A60036E2F4 /* SVGAnimatedIntegerOptionalInteger.h in Headers */,
</del><span class="cx">                           089021A9126EF5DE0092D5EA /* SVGAnimatedLength.h in Headers */,
</span><span class="cx">                          089021AD126EF5E90092D5EA /* SVGAnimatedLengthList.h in Headers */,
</span><span class="cx">                          088A0E04126EF1DB00978F7A /* SVGAnimatedListPropertyTearOff.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm    2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -2499,8 +2499,6 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    $headerIncludes{"$interfaceName.h"} = 1 if $hasParent && $interface->extendedAttributes->{JSGenerateToNativeObject};
-
</del><span class="cx">     $headerIncludes{"SVGElement.h"} = 1 if $className =~ /^JSSVG/;
</span><span class="cx"> 
</span><span class="cx">     my $implType = GetImplClassName($interface);
</span><span class="lines">@@ -2512,8 +2510,9 @@
</span><span class="cx">     push(@headerContent, "\nnamespace WebCore {\n\n");
</span><span class="cx"> 
</span><span class="cx">     if ($codeGenerator->IsSVGAnimatedType($interface->type)) {
</span><del>-        $headerIncludes{"$interfaceName.h"} = 1;
</del><ins>+        $headerIncludes{"SVGAnimatedPropertyImpl.h"} = 1;
</ins><span class="cx">     } else {
</span><ins>+        $headerIncludes{"$interfaceName.h"} = 1 if $hasParent && $interface->extendedAttributes->{JSGenerateToNativeObject};
</ins><span class="cx">         # Implementation class forward declaration
</span><span class="cx">         if (IsDOMGlobalObject($interface)) {
</span><span class="cx">             AddClassForwardIfNeeded($interface->type);
</span><span class="lines">@@ -2563,7 +2562,9 @@
</span><span class="cx">         push(@headerContent, "        return ptr;\n");
</span><span class="cx">         push(@headerContent, "    }\n\n");  
</span><span class="cx">     } else {
</span><del>-        AddIncludesForImplementationTypeInHeader($implType);
</del><ins>+        if (!$codeGenerator->IsSVGAnimatedType($interface->type)) {
+            AddIncludesForImplementationTypeInHeader($implType);
+        }
</ins><span class="cx">         push(@headerContent, "    static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<$implType>&& impl)\n");
</span><span class="cx">         push(@headerContent, "    {\n");
</span><span class="cx">         push(@headerContent, "        $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, *globalObject, WTFMove(impl));\n");
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateElementBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp       2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx">  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
</span><del>- * Copyright (C) 2008 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) Research In Motion Limited 2011. All rights reserved.
</span><span class="cx">  * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
</span><span class="cx">  *
</span><span class="lines">@@ -24,14 +24,11 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "SVGAnimateElementBase.h"
</span><span class="cx"> 
</span><del>-#include "CSSPropertyNames.h"
-#include "CSSPropertyParser.h"
</del><span class="cx"> #include "QualifiedName.h"
</span><del>-#include "RenderObject.h"
-#include "SVGAnimatorFactory.h"
</del><ins>+#include "SVGAttributeAnimationController.h"
</ins><span class="cx"> #include "SVGElement.h"
</span><ins>+#include "SVGLegacyAttributeAnimationController.h"
</ins><span class="cx"> #include "SVGNames.h"
</span><del>-#include "StyleProperties.h"
</del><span class="cx"> #include <wtf/IsoMallocInlines.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -40,7 +37,6 @@
</span><span class="cx"> 
</span><span class="cx"> SVGAnimateElementBase::SVGAnimateElementBase(const QualifiedName& tagName, Document& document)
</span><span class="cx">     : SVGAnimationElement(tagName, document)
</span><del>-    , m_animatedPropertyType(AnimatedString)
</del><span class="cx"> {
</span><span class="cx">     ASSERT(hasTagName(SVGNames::animateTag) || hasTagName(SVGNames::setTag) || hasTagName(SVGNames::animateColorTag) || hasTagName(SVGNames::animateTransformTag));
</span><span class="cx"> }
</span><span class="lines">@@ -47,115 +43,56 @@
</span><span class="cx"> 
</span><span class="cx"> SVGAnimateElementBase::~SVGAnimateElementBase() = default;
</span><span class="cx"> 
</span><del>-bool SVGAnimateElementBase::hasValidAttributeType()
</del><ins>+SVGAttributeAnimationControllerBase& SVGAnimateElementBase::attributeAnimationController()
</ins><span class="cx"> {
</span><del>-    if (!this->targetElement())
-        return false;
</del><ins>+    ASSERT(targetElement());
+    ASSERT(!hasInvalidCSSAttributeType());
</ins><span class="cx"> 
</span><del>-    return m_animatedPropertyType != AnimatedUnknown && !hasInvalidCSSAttributeType();
</del><ins>+    if (!m_attributeAnimationController) {
+        if (targetElement()->isAnimatedPropertyAttribute(attributeName()))
+            m_attributeAnimationController = std::make_unique<SVGAttributeAnimationController>(*this, *targetElement());
+        else
+            m_attributeAnimationController = std::make_unique<SVGLegacyAttributeAnimationController>(*this, *targetElement());
+    }
+
+    return *m_attributeAnimationController;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-AnimatedPropertyType SVGAnimateElementBase::determineAnimatedPropertyType(SVGElement& targetElement) const
</del><ins>+bool SVGAnimateElementBase::hasValidAttributeType() const
</ins><span class="cx"> {
</span><del>-    auto propertyTypes = targetElement.animatedPropertyTypesForAttribute(attributeName());
-    if (propertyTypes.isEmpty())
-        return AnimatedUnknown;
</del><ins>+    if (!targetElement() || hasInvalidCSSAttributeType())
+        return false;
</ins><span class="cx"> 
</span><del>-    ASSERT(propertyTypes.size() <= 2);
-    AnimatedPropertyType type = propertyTypes[0];
-    if (hasTagName(SVGNames::animateColorTag) && type != AnimatedColor)
-        return AnimatedUnknown;
</del><ins>+    if (determineAnimatedPropertyType(*targetElement()) != AnimatedUnknown)
+        return true;
</ins><span class="cx"> 
</span><del>-    // Animations of transform lists are not allowed for <animate> or <set>
-    // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties
-    if (type == AnimatedTransformList && !hasTagName(SVGNames::animateTransformTag))
-        return AnimatedUnknown;
</del><ins>+    return targetElement()->isAnimatedPropertyAttribute(attributeName());
+}
</ins><span class="cx"> 
</span><del>-    // Fortunately there's just one special case needed here: SVGMarkerElements orientAttr, which
-    // corresponds to SVGAnimatedAngle orientAngle and SVGAnimatedEnumeration orientType. We have to
-    // figure out whose value to change here.
-    if (targetElement.hasTagName(SVGNames::markerTag) && type == AnimatedAngle) {
-        ASSERT(propertyTypes.size() == 2);
-        ASSERT(propertyTypes[0] == AnimatedAngle);
-        ASSERT(propertyTypes[1] == AnimatedEnumeration);
-    } else if (propertyTypes.size() == 2)
-        ASSERT(propertyTypes[0] == propertyTypes[1]);
-
-    return type;
</del><ins>+AnimatedPropertyType SVGAnimateElementBase::determineAnimatedPropertyType(SVGElement& targetElement) const
+{
+    return SVGAttributeAnimationControllerBase::determineAnimatedPropertyType(*this, targetElement, attributeName());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGAnimateElementBase::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement)
</span><span class="cx"> {
</span><del>-    ASSERT(resultElement);
-    auto targetElement = makeRefPtr(this->targetElement());
-    if (!targetElement)
</del><ins>+    if (!targetElement())
</ins><span class="cx">         return;
</span><del>-
-    const QualifiedName& attributeName = this->attributeName();
-    ShouldApplyAnimation shouldApply = shouldApplyAnimation(targetElement.get(), attributeName);
-    
-    if (shouldApply == DontApplyAnimation)
-        return;
-
-    ASSERT(m_animatedPropertyType == determineAnimatedPropertyType(*targetElement));
-
-    ASSERT(percentage >= 0 && percentage <= 1);
-    ASSERT(m_animatedPropertyType != AnimatedTransformList || hasTagName(SVGNames::animateTransformTag));
-    ASSERT(m_animatedPropertyType != AnimatedUnknown);
-    ASSERT(m_animator);
-    ASSERT(m_animator->type() == m_animatedPropertyType);
-    ASSERT(m_fromType);
-    ASSERT(m_fromType->type() == m_animatedPropertyType);
-    ASSERT(m_toType);
-
-    if (shouldApply == ApplyXMLAnimation || shouldApply == ApplyXMLandCSSAnimation) {
-        // SVG DOM animVal animation code-path.
-        if (m_animator->findAnimatedPropertiesForAttributeName(*targetElement, attributeName).isEmpty())
-            return;
-    }
-
-    SVGAnimateElementBase& resultAnimationElement = downcast<SVGAnimateElementBase>(*resultElement);
-    ASSERT(resultAnimationElement.m_animatedType);
-    ASSERT(resultAnimationElement.m_animatedPropertyType == m_animatedPropertyType);
-
-    if (hasTagName(SVGNames::setTag))
-        percentage = 1;
-
-    if (calcMode() == CalcMode::Discrete)
-        percentage = percentage < 0.5 ? 0 : 1;
-
-    // Target element might have changed.
-    m_animator->setContextElement(targetElement.get());
-
-    // Be sure to detach list wrappers before we modfiy their underlying value. If we'd do
-    // if after calculateAnimatedValue() ran the cached pointers in the list propery tear
-    // offs would point nowhere, and we couldn't create copies of those values anymore,
-    // while detaching. This is covered by assertions, moving this down would fire them.
-    if (!m_animatedProperties.isEmpty())
-        m_animator->animValWillChange(m_animatedProperties);
-
-    // Values-animation accumulates using the last values entry corresponding to the end of duration time.
-    SVGAnimatedType* toAtEndOfDurationType = m_toAtEndOfDurationType ? m_toAtEndOfDurationType.get() : m_toType.get();
-    m_animator->calculateAnimatedValue(percentage, repeatCount, m_fromType.get(), m_toType.get(), toAtEndOfDurationType, resultAnimationElement.m_animatedType.get());
</del><ins>+    attributeAnimationController().calculateAnimatedValue(percentage, repeatCount, resultElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGAnimateElementBase::calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString)
</span><span class="cx"> {
</span><del>-    if (toAtEndOfDurationString.isEmpty())
</del><ins>+    if (!targetElement())
</ins><span class="cx">         return false;
</span><del>-    m_toAtEndOfDurationType = ensureAnimator()->constructFromString(toAtEndOfDurationString);
-    return true;
</del><ins>+    return attributeAnimationController().calculateToAtEndOfDurationValue(toAtEndOfDurationString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGAnimateElementBase::calculateFromAndToValues(const String& fromString, const String& toString)
</span><span class="cx"> {
</span><del>-    if (!this->targetElement())
</del><ins>+    if (!targetElement())
</ins><span class="cx">         return false;
</span><del>-
-    determinePropertyValueTypes(fromString, toString);
-    ensureAnimator()->calculateFromAndToValues(m_fromType, m_toType, fromString, toString);
-    ASSERT(m_animatedPropertyType == m_animator->type());
-    return true;
</del><ins>+    return attributeAnimationController().calculateFromAndToValues(fromString, toString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool SVGAnimateElementBase::calculateFromAndByValues(const String& fromString, const String& byString)
</span><span class="lines">@@ -162,259 +99,39 @@
</span><span class="cx"> {
</span><span class="cx">     if (!this->targetElement())
</span><span class="cx">         return false;
</span><del>-
-    if (animationMode() == AnimationMode::By && !isAdditive())
-        return false;
-
-    // from-by animation may only be used with attributes that support addition (e.g. most numeric attributes).
-    if (animationMode() == AnimationMode::FromBy && !animatedPropertyTypeSupportsAddition())
-        return false;
-
-    ASSERT(!hasTagName(SVGNames::setTag));
-
-    determinePropertyValueTypes(fromString, byString);
-    ensureAnimator()->calculateFromAndByValues(m_fromType, m_toType, fromString, byString);
-    ASSERT(m_animatedPropertyType == m_animator->type());
-    return true;
</del><ins>+    return attributeAnimationController().calculateFromAndByValues(fromString, byString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-#ifndef NDEBUG
-static inline bool propertyTypesAreConsistent(AnimatedPropertyType expectedPropertyType, const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    for (auto& type : animatedTypes) {
-        for (auto& property : type.properties) {
-            if (expectedPropertyType != property->animatedPropertyType()) {
-                // This is the only allowed inconsistency. SVGAnimatedAngleAnimator handles both SVGAnimatedAngle & SVGAnimatedEnumeration for markers orient attribute.
-                if (expectedPropertyType == AnimatedAngle && property->animatedPropertyType() == AnimatedEnumeration)
-                    return true;
-                return false;
-            }
-        }
-    }
-
-    return true;
-}
-#endif
-
</del><span class="cx"> void SVGAnimateElementBase::resetAnimatedType()
</span><span class="cx"> {
</span><del>-    SVGAnimatedTypeAnimator* animator = ensureAnimator();
-    ASSERT(m_animatedPropertyType == animator->type());
-
-    auto targetElement = makeRefPtr(this->targetElement());
-    if (!targetElement)
</del><ins>+    if (!targetElement())
</ins><span class="cx">         return;
</span><del>-
-    const QualifiedName& attributeName = this->attributeName();
-    ShouldApplyAnimation shouldApply = shouldApplyAnimation(targetElement.get(), attributeName);
-
-    if (shouldApply == DontApplyAnimation)
-        return;
-
-    if (shouldApply == ApplyXMLAnimation || shouldApply == ApplyXMLandCSSAnimation) {
-        // SVG DOM animVal animation code-path.
-        m_animatedProperties = animator->findAnimatedPropertiesForAttributeName(*targetElement, attributeName);
-        if (m_animatedProperties.isEmpty())
-            return;
-
-        ASSERT(propertyTypesAreConsistent(m_animatedPropertyType, m_animatedProperties));
-        if (!m_animatedType)
-            m_animatedType = animator->startAnimValAnimation(m_animatedProperties);
-        else {
-            animator->resetAnimValToBaseVal(m_animatedProperties, *m_animatedType);
-            animator->animValDidChange(m_animatedProperties);
-        }
-        return;
-    }
-
-    // CSS properties animation code-path.
-    ASSERT(m_animatedProperties.isEmpty());
-    String baseValue;
-
-    if (shouldApply == ApplyCSSAnimation) {
-        ASSERT(SVGAnimationElement::isTargetAttributeCSSProperty(targetElement.get(), attributeName));
-        computeCSSPropertyValue(targetElement.get(), cssPropertyID(attributeName.localName()), baseValue);
-    }
-
-    if (!m_animatedType)
-        m_animatedType = animator->constructFromString(baseValue);
-    else
-        m_animatedType->setValueAsString(attributeName, baseValue);
</del><ins>+    attributeAnimationController().resetAnimatedType();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline void applyCSSPropertyToTarget(SVGElement& targetElement, CSSPropertyID id, const String& value)
-{
-    ASSERT(!targetElement.m_deletionHasBegun);
-
-    if (!targetElement.ensureAnimatedSMILStyleProperties().setProperty(id, value, false))
-        return;
-
-    targetElement.invalidateStyle();
-}
-
-static inline void removeCSSPropertyFromTarget(SVGElement& targetElement, CSSPropertyID id)
-{
-    ASSERT(!targetElement.m_deletionHasBegun);
-    targetElement.ensureAnimatedSMILStyleProperties().removeProperty(id);
-    targetElement.invalidateStyle();
-}
-
-static inline void applyCSSPropertyToTargetAndInstances(SVGElement& targetElement, const QualifiedName& attributeName, const String& valueAsString)
-{
-    // FIXME: Do we really need to check both isConnected and !parentNode?
-    if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
-        return;
-
-    CSSPropertyID id = cssPropertyID(attributeName.localName());
-
-    SVGElement::InstanceUpdateBlocker blocker(targetElement);
-    applyCSSPropertyToTarget(targetElement, id, valueAsString);
-
-    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
-    for (auto* instance : targetElement.instances())
-        applyCSSPropertyToTarget(*instance, id, valueAsString);
-}
-
-static inline void removeCSSPropertyFromTargetAndInstances(SVGElement& targetElement, const QualifiedName& attributeName)
-{
-    // FIXME: Do we really need to check both isConnected and !parentNode?
-    if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
-        return;
-
-    CSSPropertyID id = cssPropertyID(attributeName.localName());
-
-    SVGElement::InstanceUpdateBlocker blocker(targetElement);
-    removeCSSPropertyFromTarget(targetElement, id);
-
-    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
-    for (auto* instance : targetElement.instances())
-        removeCSSPropertyFromTarget(*instance, id);
-}
-
-static inline void notifyTargetAboutAnimValChange(SVGElement& targetElement, const QualifiedName& attributeName)
-{
-    ASSERT(!targetElement.m_deletionHasBegun);
-    targetElement.svgAttributeChanged(attributeName);
-}
-
-static inline void notifyTargetAndInstancesAboutAnimValChange(SVGElement& targetElement, const QualifiedName& attributeName)
-{
-    if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
-        return;
-
-    SVGElement::InstanceUpdateBlocker blocker(targetElement);
-    notifyTargetAboutAnimValChange(targetElement, attributeName);
-
-    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
-    for (auto* instance : targetElement.instances())
-        notifyTargetAboutAnimValChange(*instance, attributeName);
-}
-
</del><span class="cx"> void SVGAnimateElementBase::clearAnimatedType(SVGElement* targetElement)
</span><span class="cx"> {
</span><del>-    if (!m_animatedType)
</del><ins>+    if (!targetElement)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    // If the SVGAnimatedType is a list type, e.g. SVGLengthListValues, the wrappers of the
-    // animated properties have to be detached from the items in the list before it's deleted.
-    if (!m_animatedProperties.isEmpty())
-        m_animator->animValWillChange(m_animatedProperties);
-
-    if (!targetElement) {
-        m_animatedType = nullptr;
-        return;
-    }
-
-    if (m_animatedProperties.isEmpty()) {
-        // CSS properties animation code-path.
-        removeCSSPropertyFromTargetAndInstances(*targetElement, attributeName());
-        m_animatedType = nullptr;
-        return;
-    }
-
-    ShouldApplyAnimation shouldApply = shouldApplyAnimation(targetElement, attributeName());
-    if (shouldApply == ApplyXMLandCSSAnimation)
-        removeCSSPropertyFromTargetAndInstances(*targetElement, attributeName());
-
-    // SVG DOM animVal animation code-path.
-    if (m_animator) {
-        m_animator->stopAnimValAnimation(m_animatedProperties);
-        notifyTargetAndInstancesAboutAnimValChange(*targetElement, attributeName());
-    }
-
-    m_animatedProperties.clear();
-    m_animatedType = nullptr;
</del><ins>+    if (auto* controller = attributeAnimationControllerIfExists())
+        controller->clearAnimatedType(targetElement);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGAnimateElementBase::applyResultsToTarget()
</span><span class="cx"> {
</span><del>-    ASSERT(m_animatedPropertyType != AnimatedTransformList || hasTagName(SVGNames::animateTransformTag));
-    ASSERT(m_animatedPropertyType != AnimatedUnknown);
-    ASSERT(m_animator);
-
-    // Early exit if our animated type got destroyed by a previous endedActiveInterval().
-    if (!m_animatedType)
</del><ins>+    if (!targetElement())
</ins><span class="cx">         return;
</span><del>-
-    auto targetElement = makeRefPtr(this->targetElement());
-    const QualifiedName& attributeName = this->attributeName();
-
-    ASSERT(targetElement);
-
-    if (m_animatedProperties.isEmpty()) {
-        // CSS properties animation code-path.
-        // Convert the result of the animation to a String and apply it as CSS property on the target & all instances.
-        applyCSSPropertyToTargetAndInstances(*targetElement, attributeName, m_animatedType->valueAsString());
-        return;
-    }
-
-    // We do update the style and the animation property independent of each other.
-    ShouldApplyAnimation shouldApply = shouldApplyAnimation(targetElement.get(), attributeName);
-    if (shouldApply == ApplyXMLandCSSAnimation)
-        applyCSSPropertyToTargetAndInstances(*targetElement, attributeName, m_animatedType->valueAsString());
-
-    // SVG DOM animVal animation code-path.
-    // At this point the SVG DOM values are already changed, unlike for CSS.
-    // We only have to trigger update notifications here.
-    m_animator->animValDidChange(m_animatedProperties);
-    notifyTargetAndInstancesAboutAnimValChange(*targetElement, attributeName);
</del><ins>+    attributeAnimationController().applyResultsToTarget();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGAnimateElementBase::animatedPropertyTypeSupportsAddition() const
-{
-    // Spec: http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties.
-    switch (m_animatedPropertyType) {
-    case AnimatedBoolean:
-    case AnimatedEnumeration:
-    case AnimatedPreserveAspectRatio:
-    case AnimatedString:
-    case AnimatedUnknown:
-        return false;
-    case AnimatedAngle:
-    case AnimatedColor:
-    case AnimatedInteger:
-    case AnimatedIntegerOptionalInteger:
-    case AnimatedLength:
-    case AnimatedLengthList:
-    case AnimatedNumber:
-    case AnimatedNumberList:
-    case AnimatedNumberOptionalNumber:
-    case AnimatedPath:
-    case AnimatedPoints:
-    case AnimatedRect:
-    case AnimatedTransformList:
-        return true;
-    default:
-        RELEASE_ASSERT_NOT_REACHED();
-        return true;
-    }
-}
-
</del><span class="cx"> bool SVGAnimateElementBase::isAdditive() const
</span><span class="cx"> {
</span><span class="cx">     if (animationMode() == AnimationMode::By || animationMode() == AnimationMode::FromBy) {
</span><del>-        if (!animatedPropertyTypeSupportsAddition())
-            return false;
</del><ins>+        if (auto* controller = attributeAnimationControllerIfExists()) {
+            if (!controller->isAdditive())
+                return false;
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return SVGAnimationElement::isAdditive();
</span><span class="lines">@@ -423,42 +140,40 @@
</span><span class="cx"> float SVGAnimateElementBase::calculateDistance(const String& fromString, const String& toString)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: A return value of float is not enough to support paced animations on lists.
</span><del>-    if (!this->targetElement())
</del><ins>+    if (!targetElement())
</ins><span class="cx">         return -1;
</span><span class="cx"> 
</span><del>-    return ensureAnimator()->calculateDistance(fromString, toString);
</del><ins>+    return attributeAnimationController().calculateDistance(fromString, toString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGAnimateElementBase::setTargetElement(SVGElement* target)
</span><span class="cx"> {
</span><span class="cx">     SVGAnimationElement::setTargetElement(target);
</span><del>-    resetAnimatedPropertyType();
</del><ins>+    resetAnimation();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGAnimateElementBase::setAttributeName(const QualifiedName& attributeName)
</span><span class="cx"> {
</span><span class="cx">     SVGSMILElement::setAttributeName(attributeName);
</span><del>-    checkInvalidCSSAttributeType(targetElement());
-    resetAnimatedPropertyType();
</del><ins>+    resetAnimation();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SVGAnimateElementBase::resetAnimatedPropertyType()
</del><ins>+void SVGAnimateElementBase::resetAnimation()
</ins><span class="cx"> {
</span><del>-    SVGAnimationElement::resetAnimatedPropertyType();
-    ASSERT(!m_animatedType);
-    m_fromType = nullptr;
-    m_toType = nullptr;
-    m_toAtEndOfDurationType = nullptr;
-    m_animator = nullptr;
-    m_animatedPropertyType = targetElement() ? determineAnimatedPropertyType(*targetElement()) : AnimatedString;
</del><ins>+    SVGAnimationElement::resetAnimation();
+    m_attributeAnimationController = nullptr;
+    m_hasInvalidCSSAttributeType = WTF::nullopt;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-SVGAnimatedTypeAnimator* SVGAnimateElementBase::ensureAnimator()
</del><ins>+bool SVGAnimateElementBase::hasInvalidCSSAttributeType() const
</ins><span class="cx"> {
</span><del>-    if (!m_animator)
-        m_animator = SVGAnimatorFactory::create(this, targetElement(), m_animatedPropertyType);
-    ASSERT(m_animatedPropertyType == m_animator->type());
-    return m_animator.get();
</del><ins>+    if (!targetElement())
+        return false;
+
+    if (!m_hasInvalidCSSAttributeType)
+        m_hasInvalidCSSAttributeType = hasValidAttributeName() && attributeType() == AttributeType::CSS && !isTargetAttributeCSSProperty(targetElement(), attributeName());
+
+    return m_hasInvalidCSSAttributeType.value();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateElementBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateElementBase.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateElementBase.h 2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimateElementBase.h    2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -23,23 +23,28 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include "SVGAnimatedType.h"
-#include "SVGAnimatedTypeAnimator.h"
</del><span class="cx"> #include "SVGAnimationElement.h"
</span><span class="cx"> #include "SVGNames.h"
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+class SVGAttributeAnimationControllerBase;
+
</ins><span class="cx"> class SVGAnimateElementBase : public SVGAnimationElement {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(SVGAnimateElementBase);
</span><span class="cx"> public:
</span><span class="cx">     virtual ~SVGAnimateElementBase();
</span><span class="cx"> 
</span><ins>+    SVGAttributeAnimationControllerBase& attributeAnimationController();
+    SVGAttributeAnimationControllerBase* attributeAnimationControllerIfExists() const { return m_attributeAnimationController.get(); }
+
</ins><span class="cx">     AnimatedPropertyType determineAnimatedPropertyType(SVGElement&) const;
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     SVGAnimateElementBase(const QualifiedName&, Document&);
</span><span class="cx"> 
</span><ins>+    bool hasValidAttributeType() const override;
+
</ins><span class="cx">     void resetAnimatedType() override;
</span><span class="cx">     void clearAnimatedType(SVGElement* targetElement) override;
</span><span class="cx"> 
</span><span class="lines">@@ -53,23 +58,13 @@
</span><span class="cx"> 
</span><span class="cx">     void setTargetElement(SVGElement*) override;
</span><span class="cx">     void setAttributeName(const QualifiedName&) override;
</span><del>-    void resetAnimatedPropertyType() override;
</del><ins>+    void resetAnimation() override;
</ins><span class="cx"> 
</span><del>-    AnimatedPropertyType m_animatedPropertyType;
-
</del><span class="cx"> private:
</span><del>-    SVGAnimatedTypeAnimator* ensureAnimator();
-    bool animatedPropertyTypeSupportsAddition() const;
</del><ins>+    bool hasInvalidCSSAttributeType() const;
</ins><span class="cx"> 
</span><del>-    bool hasValidAttributeType() override;
-
-    std::unique_ptr<SVGAnimatedType> m_fromType;
-    std::unique_ptr<SVGAnimatedType> m_toType;
-    std::unique_ptr<SVGAnimatedType> m_toAtEndOfDurationType;
-    std::unique_ptr<SVGAnimatedType> m_animatedType;
-
-    SVGElementAnimatedPropertyList m_animatedProperties;
-    std::unique_ptr<SVGAnimatedTypeAnimator> m_animator;
</del><ins>+    mutable Optional<bool> m_hasInvalidCSSAttributeType;
+    std::unique_ptr<SVGAttributeAnimationControllerBase> m_attributeAnimationController;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateMotionElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp     2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimateMotionElement.cpp        2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">     return adoptRef(*new SVGAnimateMotionElement(tagName, document));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGAnimateMotionElement::hasValidAttributeType()
</del><ins>+bool SVGAnimateMotionElement::hasValidAttributeType() const
</ins><span class="cx"> {
</span><span class="cx">     auto targetElement = makeRefPtr(this->targetElement());
</span><span class="cx">     if (!targetElement)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGAnimateMotionElement::hasValidAttributeName()
</del><ins>+bool SVGAnimateMotionElement::hasValidAttributeName() const
</ins><span class="cx"> {
</span><span class="cx">     // AnimateMotion does not use attributeName so it is always valid.
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateMotionElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateMotionElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateMotionElement.h       2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimateMotionElement.h  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -36,8 +36,8 @@
</span><span class="cx"> private:
</span><span class="cx">     SVGAnimateMotionElement(const QualifiedName&, Document&);
</span><span class="cx"> 
</span><del>-    bool hasValidAttributeType() override;
-    bool hasValidAttributeName() override;
</del><ins>+    bool hasValidAttributeType() const override;
+    bool hasValidAttributeName() const override;
</ins><span class="cx"> 
</span><span class="cx">     void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateTransformElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp  2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp     2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     return adoptRef(*new SVGAnimateTransformElement(tagName, document));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGAnimateTransformElement::hasValidAttributeType()
</del><ins>+bool SVGAnimateTransformElement::hasValidAttributeType() const
</ins><span class="cx"> {
</span><span class="cx">     if (!this->targetElement())
</span><span class="cx">         return false;
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     if (attributeType() == AttributeType::CSS)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return m_animatedPropertyType == AnimatedTransformList;
</del><ins>+    return SVGAnimateElementBase::hasValidAttributeType();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGAnimateTransformElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimateTransformElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimateTransformElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimateTransformElement.h    2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimateTransformElement.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> private:
</span><span class="cx">     SVGAnimateTransformElement(const QualifiedName&, Document&);
</span><span class="cx">     
</span><del>-    bool hasValidAttributeType() final;
</del><ins>+    bool hasValidAttributeType() const final;
</ins><span class="cx">     void parseAttribute(const QualifiedName&, const AtomicString&) final;
</span><span class="cx"> 
</span><span class="cx">     SVGTransformValue::SVGTransformType m_type;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatedIntegercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/svg/SVGAnimatedInteger.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatedInteger.cpp  2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimatedInteger.cpp     2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,101 +0,0 @@
</span><del>-/*
- * 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
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "SVGAnimatedInteger.h"
-
-#include "SVGAnimateElementBase.h"
-#include "SVGAnimatedNumber.h"
-#include <wtf/MathExtras.h>
-
-namespace WebCore {
-
-SVGAnimatedIntegerAnimator::SVGAnimatedIntegerAnimator(SVGAnimationElement* animationElement, SVGElement* contextElement)
-    : SVGAnimatedTypeAnimator(AnimatedInteger, animationElement, contextElement)
-{
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedIntegerAnimator::constructFromString(const String& string)
-{
-    return SVGAnimatedType::create(SVGPropertyTraits<int>::fromString(string));
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedIntegerAnimator::startAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    return constructFromBaseValue<SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerAnimator::stopAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    stopAnimValAnimationForType<SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType& type)
-{
-    resetFromBaseValue<SVGAnimatedInteger>(animatedTypes, type);
-}
-
-void SVGAnimatedIntegerAnimator::animValWillChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValWillChangeForType<SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerAnimator::animValDidChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValDidChangeForType<SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGAnimatedType* to)
-{
-    ASSERT(from->type() == AnimatedInteger);
-    ASSERT(from->type() == to->type());
-
-    to->as<int>() += from->as<int>();
-}
-
-void SVGAnimatedIntegerAnimator::calculateAnimatedInteger(SVGAnimationElement* animationElement, float percentage, unsigned repeatCount, int fromInteger, int toInteger, int toAtEndOfDurationInteger, int& animatedInteger)
-{
-    float animatedNumber = animatedInteger;
-    animationElement->animateAdditiveNumber(percentage, repeatCount, fromInteger, toInteger, toAtEndOfDurationInteger, animatedNumber);
-    animatedInteger = static_cast<int>(roundf(animatedNumber));
-}
-
-void SVGAnimatedIntegerAnimator::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType* from, SVGAnimatedType* to, SVGAnimatedType* toAtEndOfDuration, SVGAnimatedType* animated)
-{
-    ASSERT(m_animationElement);
-    ASSERT(m_contextElement);
-
-    const auto fromInteger = (m_animationElement->animationMode() == AnimationMode::To ? animated : from)->as<int>();
-    const auto toInteger = to->as<int>();
-    const auto toAtEndOfDurationInteger = toAtEndOfDuration->as<int>();
-    auto& animatedInteger = animated->as<int>();
-
-    calculateAnimatedInteger(m_animationElement, percentage, repeatCount, fromInteger, toInteger, toAtEndOfDurationInteger, animatedInteger);
-}
-
-float SVGAnimatedIntegerAnimator::calculateDistance(const String& fromString, const String& toString)
-{
-    ASSERT(m_contextElement);
-    int from = fromString.toIntStrict();
-    int to = toString.toIntStrict();
-    return abs(to - from);
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatedIntegerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/svg/SVGAnimatedInteger.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatedInteger.h    2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimatedInteger.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,58 +0,0 @@
</span><del>-/*
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "SVGAnimatedStaticPropertyTearOff.h"
-#include "SVGAnimatedTypeAnimator.h"
-#include "SVGAttributeAccessor.h"
-
-namespace WebCore {
-
-class SVGAnimationElement;
-
-using SVGAnimatedInteger = SVGAnimatedStaticPropertyTearOff<int>;
-using SVGAnimatedIntegerAttribute = SVGAnimatedAttribute<SVGAnimatedInteger>;
-
-template<typename OwnerType>
-using SVGAnimatedIntegerAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedIntegerAttribute, AnimatedInteger>;
-
-template<typename OwnerType>
-using SVGAnimatedOptionalIntegerAttributeAccessor = SVGAnimatedOptionalAttributeAccessor<OwnerType, SVGAnimatedIntegerAttribute, AnimatedIntegerOptionalInteger>;
-
-class SVGAnimatedIntegerAnimator final : public SVGAnimatedTypeAnimator {
-public:
-    SVGAnimatedIntegerAnimator(SVGAnimationElement*, SVGElement*);
-
-    static void calculateAnimatedInteger(SVGAnimationElement*, float percentage, unsigned repeatCount, int fromInteger, int toInteger, int toAtEndOfDurationInteger, int& animatedInteger);
-
-    std::unique_ptr<SVGAnimatedType> constructFromString(const String&) override;
-    std::unique_ptr<SVGAnimatedType> startAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void stopAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void resetAnimValToBaseVal(const SVGElementAnimatedPropertyList&, SVGAnimatedType&) override;
-    void animValWillChange(const SVGElementAnimatedPropertyList&) override;
-    void animValDidChange(const SVGElementAnimatedPropertyList&) override;
-
-    void addAnimatedTypes(SVGAnimatedType*, SVGAnimatedType*) override;
-    void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*) override;
-    float calculateDistance(const String& fromString, const String& toString) override;
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatedIntegerOptionalIntegercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.cpp   2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.cpp      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,96 +0,0 @@
</span><del>-/*
- * Copyright (C) Research In Motion Limited 2012. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "SVGAnimatedIntegerOptionalInteger.h"
-
-#include "SVGAnimateElementBase.h"
-#include "SVGAnimatedInteger.h"
-#include "SVGParserUtilities.h"
-
-namespace WebCore {
-
-SVGAnimatedIntegerOptionalIntegerAnimator::SVGAnimatedIntegerOptionalIntegerAnimator(SVGAnimationElement* animationElement, SVGElement* contextElement)
-    : SVGAnimatedTypeAnimator(AnimatedIntegerOptionalInteger, animationElement, contextElement)
-{
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString(const String& string)
-{
-    return SVGAnimatedType::create(SVGPropertyTraits<std::pair<int, int>>::fromString(string));
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    return constructFromBaseValues<SVGAnimatedInteger, SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    stopAnimValAnimationForTypes<SVGAnimatedInteger, SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType& type)
-{
-    resetFromBaseValues<SVGAnimatedInteger, SVGAnimatedInteger>(animatedTypes, type);
-}
-
-void SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValWillChangeForTypes<SVGAnimatedInteger, SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValDidChangeForTypes<SVGAnimatedInteger, SVGAnimatedInteger>(animatedTypes);
-}
-
-void SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGAnimatedType* to)
-{
-    ASSERT(from->type() == AnimatedIntegerOptionalInteger);
-    ASSERT(from->type() == to->type());
-
-    const auto& fromIntegerPair = from->as<std::pair<int, int>>();
-    auto& toIntegerPair = to->as<std::pair<int, int>>();
-
-    toIntegerPair.first += fromIntegerPair.first;
-    toIntegerPair.second += fromIntegerPair.second;
-}
-
-void SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType* from, SVGAnimatedType* to, SVGAnimatedType* toAtEndOfDuration, SVGAnimatedType* animated)
-{
-    ASSERT(m_animationElement);
-    ASSERT(m_contextElement);
-
-    const auto& fromIntegerPair = (m_animationElement->animationMode() == AnimationMode::To ? animated : from)->as<std::pair<int, int>>();
-    const auto& toIntegerPair = to->as<std::pair<int, int>>();
-    const auto& toAtEndOfDurationIntegerPair = toAtEndOfDuration->as<std::pair<int, int>>();
-    auto& animatedIntegerPair = animated->as<std::pair<int, int>>();
-
-    SVGAnimatedIntegerAnimator::calculateAnimatedInteger(m_animationElement, percentage, repeatCount, fromIntegerPair.first, toIntegerPair.first, toAtEndOfDurationIntegerPair.first, animatedIntegerPair.first);
-    SVGAnimatedIntegerAnimator::calculateAnimatedInteger(m_animationElement, percentage, repeatCount, fromIntegerPair.second, toIntegerPair.second, toAtEndOfDurationIntegerPair.second, animatedIntegerPair.second);
-}
-
-float SVGAnimatedIntegerOptionalIntegerAnimator::calculateDistance(const String&, const String&)
-{
-    // FIXME: Distance calculation is not possible for SVGIntegerOptionalInteger right now. We need the distance for every single value.
-    return -1;
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatedIntegerOptionalIntegerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.h     2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimatedIntegerOptionalInteger.h        2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-/*
- * Copyright (C) Research In Motion Limited 2012. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "SVGAnimatedTypeAnimator.h"
-
-namespace WebCore {
-
-class SVGAnimationElement;
-
-class SVGAnimatedIntegerOptionalIntegerAnimator final : public SVGAnimatedTypeAnimator {
-public:
-    SVGAnimatedIntegerOptionalIntegerAnimator(SVGAnimationElement*, SVGElement*);
-
-    std::unique_ptr<SVGAnimatedType> constructFromString(const String&) override;
-    std::unique_ptr<SVGAnimatedType> startAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void stopAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void resetAnimValToBaseVal(const SVGElementAnimatedPropertyList&, SVGAnimatedType&) override;
-    void animValWillChange(const SVGElementAnimatedPropertyList&) override;
-    void animValDidChange(const SVGElementAnimatedPropertyList&) override;
-
-    void addAnimatedTypes(SVGAnimatedType*, SVGAnimatedType*) override;
-    void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*) override;
-    float calculateDistance(const String& fromString, const String& toString) override;
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatedPointListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimatedPointList.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatedPointList.h  2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimatedPointList.h     2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -22,6 +22,8 @@
</span><span class="cx"> 
</span><span class="cx"> #include "SVGAnimatedListPropertyTearOff.h"
</span><span class="cx"> #include "SVGAnimatedTypeAnimator.h"
</span><ins>+#include "SVGAttribute.h"
+#include "SVGAttributeAccessor.h"
</ins><span class="cx"> #include "SVGPointList.h"
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimationElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimationElement.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimationElement.cpp 2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.cpp    2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -305,7 +305,6 @@
</span><span class="cx">         m_attributeType = AttributeType::XML;
</span><span class="cx">     else
</span><span class="cx">         m_attributeType = AttributeType::Auto;
</span><del>-    checkInvalidCSSAttributeType(targetElement());
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String SVGAnimationElement::toValue() const
</span><span class="lines">@@ -667,21 +666,10 @@
</span><span class="cx">     if (inheritsFromProperty(targetElement.get(), attributeName, to))
</span><span class="cx">         m_toPropertyValueType = InheritValue;
</span><span class="cx"> }
</span><del>-void SVGAnimationElement::resetAnimatedPropertyType()
</del><ins>+void SVGAnimationElement::resetAnimation()
</ins><span class="cx"> {
</span><span class="cx">     m_lastValuesAnimationFrom = String();
</span><span class="cx">     m_lastValuesAnimationTo = String();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SVGAnimationElement::setTargetElement(SVGElement* target)
-{
-    SVGSMILElement::setTargetElement(target);
-    checkInvalidCSSAttributeType(target);
</del><span class="cx"> }
</span><del>-
-void SVGAnimationElement::checkInvalidCSSAttributeType(SVGElement* target)
-{
-    m_hasInvalidCSSAttributeType = target && hasValidAttributeName() && attributeType() == AttributeType::CSS && !isTargetAttributeCSSProperty(target, attributeName());
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimationElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimationElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimationElement.h   2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimationElement.h      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -36,22 +36,10 @@
</span><span class="cx"> class SVGAnimatedType;
</span><span class="cx"> class TimeContainer;
</span><span class="cx"> 
</span><del>-enum class AnimationMode : uint8_t {
-    None,
-    FromTo,
-    FromBy,
-    To,
-    By,
-    Values,
-    Path // Used by AnimateMotion.
-};
-
</del><span class="cx"> // If we have 'currentColor' or 'inherit' as animation value, we need to grab
</span><span class="cx"> // the value during the animation since the value can be animated itself.
</span><span class="cx"> enum AnimatedPropertyValueType { RegularPropertyValue, CurrentColorValue, InheritValue };
</span><span class="cx"> 
</span><del>-enum class CalcMode : uint8_t { Discrete, Linear, Paced, Spline };
-
</del><span class="cx"> class SVGAnimationElement : public SVGSMILElement, public SVGExternalResourcesRequired, public SVGTests {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(SVGAnimationElement);
</span><span class="cx"> public:
</span><span class="lines">@@ -146,6 +134,12 @@
</span><span class="cx">             animatedNumber = number;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    enum class AttributeType : uint8_t { CSS, XML, Auto };
+    AttributeType attributeType() const { return m_attributeType; }
+
+    void computeCSSPropertyValue(SVGElement*, CSSPropertyID, String& value);
+    virtual void determinePropertyValueTypes(const String& from, const String& to);
+
</ins><span class="cx"> protected:
</span><span class="cx">     SVGAnimationElement(const QualifiedName&, Document&);
</span><span class="cx"> 
</span><span class="lines">@@ -153,17 +147,12 @@
</span><span class="cx">     static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
</span><span class="cx">     const SVGAttributeOwnerProxy& attributeOwnerProxy() const override { return m_attributeOwnerProxy; }
</span><span class="cx"> 
</span><del>-    void computeCSSPropertyValue(SVGElement*, CSSPropertyID, String& value);
-    virtual void determinePropertyValueTypes(const String& from, const String& to);
-    virtual void resetAnimatedPropertyType();
</del><ins>+    virtual void resetAnimation();
</ins><span class="cx"> 
</span><span class="cx">     static bool isSupportedAttribute(const QualifiedName&);
</span><span class="cx">     void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="cx">     void svgAttributeChanged(const QualifiedName&) override;
</span><span class="cx"> 
</span><del>-    enum class AttributeType { CSS, XML, Auto };
-    AttributeType attributeType() const { return m_attributeType; }
-
</del><span class="cx">     String toValue() const;
</span><span class="cx">     String byValue() const;
</span><span class="cx">     String fromValue() const;
</span><span class="lines">@@ -177,10 +166,7 @@
</span><span class="cx">     AnimatedPropertyValueType m_fromPropertyValueType { RegularPropertyValue };
</span><span class="cx">     AnimatedPropertyValueType m_toPropertyValueType { RegularPropertyValue };
</span><span class="cx"> 
</span><del>-    void setTargetElement(SVGElement*) override;
</del><span class="cx">     void setAttributeName(const QualifiedName&) override { }
</span><del>-    bool hasInvalidCSSAttributeType() const { return m_hasInvalidCSSAttributeType; }
-    void checkInvalidCSSAttributeType(SVGElement*);
</del><span class="cx"> 
</span><span class="cx">     virtual void updateAnimationMode();
</span><span class="cx">     void setAnimationMode(AnimationMode animationMode) { m_animationMode = animationMode; }
</span><span class="lines">@@ -218,7 +204,6 @@
</span><span class="cx">     Vector<UnitBezier> m_keySplines;
</span><span class="cx">     String m_lastValuesAnimationFrom;
</span><span class="cx">     String m_lastValuesAnimationTo;
</span><del>-    bool m_hasInvalidCSSAttributeType { false };
</del><span class="cx">     CalcMode m_calcMode { CalcMode::Linear };
</span><span class="cx">     AnimationMode m_animationMode { AnimationMode::None };
</span><span class="cx">     AttributeOwnerProxy m_attributeOwnerProxy { *this };
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAnimatorFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGAnimatorFactory.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAnimatorFactory.h    2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGAnimatorFactory.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -23,8 +23,6 @@
</span><span class="cx"> #include "SVGAnimatedBoolean.h"
</span><span class="cx"> #include "SVGAnimatedColor.h"
</span><span class="cx"> #include "SVGAnimatedEnumeration.h"
</span><del>-#include "SVGAnimatedInteger.h"
-#include "SVGAnimatedIntegerOptionalInteger.h"
</del><span class="cx"> #include "SVGAnimatedLength.h"
</span><span class="cx"> #include "SVGAnimatedLengthList.h"
</span><span class="cx"> #include "SVGAnimatedNumber.h"
</span><span class="lines">@@ -58,9 +56,9 @@
</span><span class="cx">         case AnimatedEnumeration:
</span><span class="cx">             return std::make_unique<SVGAnimatedEnumerationAnimator>(animationElement, contextElement);
</span><span class="cx">         case AnimatedInteger:
</span><del>-            return std::make_unique<SVGAnimatedIntegerAnimator>(animationElement, contextElement);
</del><ins>+            return nullptr;
</ins><span class="cx">         case AnimatedIntegerOptionalInteger:
</span><del>-            return std::make_unique<SVGAnimatedIntegerOptionalIntegerAnimator>(animationElement, contextElement);
</del><ins>+            return nullptr;
</ins><span class="cx">         case AnimatedLength:
</span><span class="cx">             return std::make_unique<SVGAnimatedLengthAnimator>(animationElement, contextElement);
</span><span class="cx">         case AnimatedLengthList:
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAttributeAnimationControllercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/SVGAttributeAnimationController.cpp (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAttributeAnimationController.cpp                             (rev 0)
+++ trunk/Source/WebCore/svg/SVGAttributeAnimationController.cpp        2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,142 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SVGAttributeAnimationController.h"
+
+#include "QualifiedName.h"
+#include "SVGAnimationElement.h"
+#include "SVGAttributeAnimator.h"
+#include "SVGElement.h"
+
+namespace WebCore {
+
+SVGAttributeAnimationController::SVGAttributeAnimationController(SVGAnimationElement& animationElement, SVGElement& targetElement)
+    : SVGAttributeAnimationControllerBase(animationElement, targetElement)
+{
+}
+
+SVGAttributeAnimator* SVGAttributeAnimationController::animator() const
+{
+    if (!m_animator)
+        m_animator = m_targetElement.createAnimator(m_animationElement.attributeName(), m_animationElement.animationMode(), m_animationElement.calcMode(), m_animationElement.isAccumulated(), m_animationElement.isAdditive());
+
+    return m_animator.get();
+}
+
+bool SVGAttributeAnimationController::isDiscreteAnimator() const
+{
+    return hasValidAttributeType() && m_animator && m_animator->isDiscrete();
+}
+
+bool SVGAttributeAnimationController::isAdditive() const
+{
+    return !isDiscreteAnimator();
+}
+    
+bool SVGAttributeAnimationController::hasValidAttributeType() const
+{
+    return m_targetElement.isAnimatedAttribute(m_animationElement.attributeName());
+}
+
+bool SVGAttributeAnimationController::calculateFromAndToValues(const String& from, const String& to)
+{
+    if (auto* animator = this->animator()) {
+        animator->setFromAndToValues(&m_targetElement, from, to);
+        return true;
+    }
+    return false;
+}
+
+bool SVGAttributeAnimationController::calculateFromAndByValues(const String& from, const String& by)
+{
+    if (m_animationElement.animationMode() == AnimationMode::By && (!isAdditive() || isDiscreteAnimator()))
+        return false;
+    
+    if (m_animationElement.animationMode() == AnimationMode::FromBy && isDiscreteAnimator())
+        return false;
+
+    if (auto* animator = this->animator()) {
+        animator->setFromAndByValues(&m_targetElement, from, by);
+        return true;
+    }
+    return false;
+}
+
+bool SVGAttributeAnimationController::calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString)
+{
+    if (toAtEndOfDurationString.isEmpty())
+        return false;
+
+    if (isDiscreteAnimator())
+        return true;
+
+    if (auto* animator = this->animator()) {
+        animator->setToAtEndOfDurationValue(toAtEndOfDurationString);
+        return true;
+    }
+    return false;
+}
+
+void SVGAttributeAnimationController::resetAnimatedType()
+{
+    if (auto* animator = this->animator())
+        animator->start(&m_targetElement);
+}
+
+void SVGAttributeAnimationController::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement*)
+{
+    ASSERT(percentage >= 0 && percentage <= 1);
+    if (m_targetElement.hasTagName(SVGNames::setTag))
+        percentage = 1;
+
+    if (m_animationElement.calcMode() == CalcMode::Discrete)
+        percentage = percentage < 0.5 ? 0 : 1;
+
+    if (auto* animator = this->animator())
+        animator->progress(&m_targetElement, percentage, repeatCount);
+}
+
+void SVGAttributeAnimationController::applyResultsToTarget()
+{
+    if (auto* animator = this->animator())
+        animator->apply(&m_targetElement);
+}
+
+void SVGAttributeAnimationController::clearAnimatedType(SVGElement* targetElement)
+{
+    if (auto* animator = this->animatorIfExists())
+        animator->stop(targetElement);
+}
+
+float SVGAttributeAnimationController::calculateDistance(const String& from, const String& to)
+{
+    // FIXME: A return value of float is not enough to support paced animations on lists.
+    if (auto* animator = this->animator())
+        return animator->calculateDistance(&m_targetElement, from, to);
+    return -1;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAttributeAnimationControllerhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/SVGAttributeAnimationController.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAttributeAnimationController.h                               (rev 0)
+++ trunk/Source/WebCore/svg/SVGAttributeAnimationController.h  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAttributeAnimationControllerBase.h"
+
+namespace WebCore {
+
+class SVGAnimationElement;
+class SVGElement;
+class SVGSMILElement;
+
+class SVGAttributeAnimationController : public SVGAttributeAnimationControllerBase {
+public:
+    SVGAttributeAnimationController(SVGAnimationElement&, SVGElement&);
+    
+private:
+    SVGAttributeAnimator* animator() const;
+    SVGAttributeAnimator* animatorIfExists() const { return m_animator.get(); }
+
+    void resetAnimatedType() override;
+    void clearAnimatedType(SVGElement* targetElement) override;
+    
+    bool calculateFromAndToValues(const String& fromString, const String& toString) override;
+    bool calculateFromAndByValues(const String& fromString, const String& byString) override;
+    bool calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString) override;
+
+    void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) override;
+
+    void applyResultsToTarget() override;
+    float calculateDistance(const String& fromString, const String& toString) override;
+    
+    bool isAdditive() const override;
+    bool hasValidAttributeType() const override;
+
+    bool isDiscreteAnimator() const;
+
+    mutable std::unique_ptr<SVGAttributeAnimator> m_animator;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAttributeAnimationControllerBasecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.cpp (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.cpp                         (rev 0)
+++ trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.cpp    2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SVGAttributeAnimationControllerBase.h"
+
+#include "SVGAnimationElement.h"
+#include "SVGElement.h"
+
+namespace WebCore {
+
+SVGAttributeAnimationControllerBase::SVGAttributeAnimationControllerBase(SVGAnimationElement& animationElement, SVGElement& targetElement)
+    : m_animationElement(animationElement)
+    , m_targetElement(targetElement)
+{
+}
+
+AnimatedPropertyType SVGAttributeAnimationControllerBase::determineAnimatedPropertyType(const SVGAnimationElement& animationElement, SVGElement& targetElement, const QualifiedName& attributeName)
+{
+    auto propertyTypes = targetElement.animatedPropertyTypesForAttribute(attributeName);
+    if (propertyTypes.isEmpty())
+        return AnimatedUnknown;
+
+    ASSERT(propertyTypes.size() <= 2);
+    AnimatedPropertyType type = propertyTypes[0];
+    if (animationElement.hasTagName(SVGNames::animateColorTag) && type != AnimatedColor)
+        return AnimatedUnknown;
+
+    // Animations of transform lists are not allowed for <animate> or <set>
+    // http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties
+    if (type == AnimatedTransformList && !animationElement.hasTagName(SVGNames::animateTransformTag))
+        return AnimatedUnknown;
+
+    // Fortunately there's just one special case needed here: SVGMarkerElements orientAttr, which
+    // corresponds to SVGAnimatedAngle orientAngle and SVGAnimatedEnumeration orientType. We have to
+    // figure out whose value to change here.
+    if (targetElement.hasTagName(SVGNames::markerTag) && type == AnimatedAngle) {
+        ASSERT(propertyTypes.size() == 2);
+        ASSERT(propertyTypes[0] == AnimatedAngle);
+        ASSERT(propertyTypes[1] == AnimatedEnumeration);
+    } else if (propertyTypes.size() == 2)
+        ASSERT(propertyTypes[0] == propertyTypes[1]);
+
+    return type;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgSVGAttributeAnimationControllerBasehfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.h                           (rev 0)
+++ trunk/Source/WebCore/svg/SVGAttributeAnimationControllerBase.h      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+class SVGAnimationElement;
+class SVGElement;
+class SVGSMILElement;
+
+class SVGAttributeAnimationControllerBase {
+public:
+    SVGAttributeAnimationControllerBase(SVGAnimationElement&, SVGElement&);
+    virtual ~SVGAttributeAnimationControllerBase() = default;
+
+    static AnimatedPropertyType determineAnimatedPropertyType(const SVGAnimationElement&, SVGElement&, const QualifiedName&);
+
+    virtual bool isAdditive() const = 0;
+    virtual bool hasValidAttributeType() const = 0;
+    
+    virtual void resetAnimatedType() = 0;
+    virtual void clearAnimatedType(SVGElement* targetElement) = 0;
+    
+    virtual bool calculateFromAndToValues(const String& fromString, const String& toString) = 0;
+    virtual bool calculateFromAndByValues(const String& fromString, const String& byString) = 0;
+    virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString) = 0;
+
+    virtual void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) = 0;
+    virtual void applyResultsToTarget() = 0;
+    
+    virtual float calculateDistance(const String& fromString, const String& toString) = 0;
+    
+protected:
+    SVGAnimationElement& m_animationElement;
+    SVGElement& m_targetElement;
+};
+
+} // namespace WebCore
+
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.cpp  2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGElement.cpp     2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -700,6 +700,14 @@
</span><span class="cx"> 
</span><span class="cx">     svgElement->synchronizeAttributes();
</span><span class="cx">     svgElement->elementData()->setAnimatedSVGAttributesAreDirty(false);
</span><ins>+    
+    // FIXME: Delete the SVG tear off properties code from this function
+    
+    // SVGPropertyRegistry::synchronizeAllAttributes() returns the new values of
+    // the properties which have changed but not committed yet.
+    auto map = svgElement->propertyRegistry().synchronizeAllAttributes();
+    for (const auto& entry : map)
+        svgElement->setSynchronizedLazyAttribute(entry.key, entry.value);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void SVGElement::synchronizeAnimatedSVGAttribute(const QualifiedName& name) const
</span><span class="lines">@@ -707,13 +715,48 @@
</span><span class="cx">     if (!elementData() || !elementData()->animatedSVGAttributesAreDirty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    // FIXME: Delete the SVG tear off properties code from this function
+
</ins><span class="cx">     SVGElement* nonConstThis = const_cast<SVGElement*>(this);
</span><span class="cx">     if (name == anyQName())
</span><span class="cx">         synchronizeAllAnimatedSVGAttribute(nonConstThis);
</span><del>-    else
</del><ins>+    else if (isAnimatedPropertyAttribute(name)) {
+        // If the value of the property has changed, serialize the new value to the attribute.
+        if (auto value = propertyRegistry().synchronize(name))
+            nonConstThis->setSynchronizedLazyAttribute(name, *value);
+    } else
</ins><span class="cx">         nonConstThis->synchronizeAttribute(name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void SVGElement::commitPropertyChange(SVGAnimatedProperty& animatedProperty)
+{
+    QualifiedName attributeName = propertyRegistry().animatedPropertyAttributeName(animatedProperty);
+    setSynchronizedLazyAttribute(attributeName, animatedProperty.baseValAsString());
+
+    invalidateSVGAttributes();
+    svgAttributeChanged(attributeName);
+}
+
+bool SVGElement::isAnimatedPropertyAttribute(const QualifiedName& attributeName) const
+{
+    return propertyRegistry().isAnimatedPropertyAttribute(attributeName);
+}
+
+bool SVGElement::isAnimatedAttribute(const QualifiedName& attributeName) const
+{
+    return isAnimatedPropertyAttribute(attributeName);
+}
+
+std::unique_ptr<SVGAttributeAnimator> SVGElement::createAnimator(const QualifiedName& attributeName, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+{
+    auto animator = propertyRegistry().createAnimator(attributeName, animationMode, calcMode, isAccumulated, isAdditive);
+    if (!animator)
+        return animator;
+    for (auto* instance : instances())
+        instance->propertyRegistry().appendAnimatedInstance(attributeName, *animator);
+    return animator;
+}
+
</ins><span class="cx"> Optional<ElementStyle> SVGElement::resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle*)
</span><span class="cx"> {
</span><span class="cx">     // If the element is in a <use> tree we get the style from the definition tree.
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGElement.h    2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGElement.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -22,12 +22,13 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include "SVGAnimatedString.h"
</del><ins>+#include "SVGAnimatedPropertyImpl.h"
</ins><span class="cx"> #include "SVGAttributeOwnerProxy.h"
</span><span class="cx"> #include "SVGLangSpace.h"
</span><span class="cx"> #include "SVGLocatable.h"
</span><span class="cx"> #include "SVGNames.h"
</span><span class="cx"> #include "SVGParsingError.h"
</span><ins>+#include "SVGPropertyOwnerRegistry.h"
</ins><span class="cx"> #include "StyledElement.h"
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="lines">@@ -46,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> void mapAttributeToCSSProperty(HashMap<AtomicStringImpl*, CSSPropertyID>* propertyNameToIdMap, const QualifiedName& attrName);
</span><span class="cx"> 
</span><del>-class SVGElement : public StyledElement, public SVGLangSpace, public CanMakeWeakPtr<SVGElement> {
</del><ins>+class SVGElement : public StyledElement, public SVGLangSpace, public SVGPropertyOwner, public CanMakeWeakPtr<SVGElement> {
</ins><span class="cx">     WTF_MAKE_ISO_ALLOCATED(SVGElement);
</span><span class="cx"> public:
</span><span class="cx">     bool isOutermostSVGSVGElement() const;
</span><span class="lines">@@ -150,6 +151,18 @@
</span><span class="cx">     RefPtr<SVGLegacyAnimatedProperty> lookupOrCreateAnimatedProperty(const SVGAttribute& attribute) { return attributeOwnerProxy().lookupOrCreateAnimatedProperty(attribute); }
</span><span class="cx">     Vector<RefPtr<SVGLegacyAnimatedProperty>> lookupOrCreateAnimatedProperties(const QualifiedName& name) { return attributeOwnerProxy().lookupOrCreateAnimatedProperties(name); }
</span><span class="cx"> 
</span><ins>+    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGElement>;
+    virtual const SVGPropertyRegistry& propertyRegistry() const { return m_propertyRegistry; }
+
+    bool isAnimatedPropertyAttribute(const QualifiedName&) const;
+    bool isAnimatedAttribute(const QualifiedName&) const;
+
+    void commitPropertyChange() override { }
+    void commitPropertyChange(SVGAnimatedProperty&);
+
+    const SVGElement* attributeContextElement() const override { return this; }
+    std::unique_ptr<SVGAttributeAnimator> createAnimator(const QualifiedName&, AnimationMode, CalcMode, bool isAccumulated, bool isAdditive);
+
</ins><span class="cx">     // These are needed for the RenderTree, animation and DOM.
</span><span class="cx">     const auto& className() const { return m_className.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     auto classNameAnimated() { return m_className.animatedProperty(attributeOwnerProxy()); }
</span><span class="lines">@@ -204,6 +217,8 @@
</span><span class="cx"> 
</span><span class="cx">     AttributeOwnerProxy m_attributeOwnerProxy { *this };
</span><span class="cx">     SVGAnimatedStringAttribute m_className;
</span><ins>+    
+    PropertyRegistry m_propertyRegistry { *this };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class SVGElement::InstanceInvalidationGuard {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFEConvolveMatrixElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp  2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp     2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
</span><del>- * Copyright (C) 2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * This library is free software; you can redistribute it and/or
</span><span class="cx">  * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -40,6 +40,13 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(hasTagName(SVGNames::feConvolveMatrixTag));
</span><span class="cx">     registerAttributes();
</span><ins>+
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::orderAttr, &SVGFEConvolveMatrixElement::m_orderX, &SVGFEConvolveMatrixElement::m_orderY>();
+        PropertyRegistry::registerProperty<SVGNames::targetXAttr, &SVGFEConvolveMatrixElement::m_targetX>();
+        PropertyRegistry::registerProperty<SVGNames::targetYAttr, &SVGFEConvolveMatrixElement::m_targetY>();
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref<SVGFEConvolveMatrixElement> SVGFEConvolveMatrixElement::create(const QualifiedName& tagName, Document& document)
</span><span class="lines">@@ -59,18 +66,6 @@
</span><span class="cx">     return s_identifier;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const AtomicString& SVGFEConvolveMatrixElement::orderXIdentifier()
-{
-    static NeverDestroyed<AtomicString> s_identifier("SVGOrderX", AtomicString::ConstructFromLiteral);
-    return s_identifier;
-}
-
-const AtomicString& SVGFEConvolveMatrixElement::orderYIdentifier()
-{
-    static NeverDestroyed<AtomicString> s_identifier("SVGOrderY", AtomicString::ConstructFromLiteral);
-    return s_identifier;
-}
-
</del><span class="cx"> void SVGFEConvolveMatrixElement::registerAttributes()
</span><span class="cx"> {
</span><span class="cx">     auto& registry = attributeRegistry();
</span><span class="lines">@@ -77,14 +72,9 @@
</span><span class="cx">     if (!registry.isEmpty())
</span><span class="cx">         return;
</span><span class="cx">     registry.registerAttribute<SVGNames::inAttr, &SVGFEConvolveMatrixElement::m_in1>();
</span><del>-    registry.registerAttribute<SVGNames::orderAttr,
-        &SVGFEConvolveMatrixElement::orderXIdentifier, &SVGFEConvolveMatrixElement::m_orderX,
-        &SVGFEConvolveMatrixElement::orderYIdentifier, &SVGFEConvolveMatrixElement::m_orderY>();
</del><span class="cx">     registry.registerAttribute<SVGNames::kernelMatrixAttr, &SVGFEConvolveMatrixElement::m_kernelMatrix>();
</span><span class="cx">     registry.registerAttribute<SVGNames::divisorAttr, &SVGFEConvolveMatrixElement::m_divisor>();
</span><span class="cx">     registry.registerAttribute<SVGNames::biasAttr, &SVGFEConvolveMatrixElement::m_bias>();
</span><del>-    registry.registerAttribute<SVGNames::targetXAttr, &SVGFEConvolveMatrixElement::m_targetX>();
-    registry.registerAttribute<SVGNames::targetYAttr, &SVGFEConvolveMatrixElement::m_targetY>();
</del><span class="cx">     registry.registerAttribute<SVGNames::edgeModeAttr, EdgeModeType, &SVGFEConvolveMatrixElement::m_edgeMode>();
</span><span class="cx">     registry.registerAttribute<SVGNames::kernelUnitLengthAttr,
</span><span class="cx">         &SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier, &SVGFEConvolveMatrixElement::m_kernelUnitLengthX,
</span><span class="lines">@@ -102,8 +92,8 @@
</span><span class="cx">     if (name == SVGNames::orderAttr) {
</span><span class="cx">         float x, y;
</span><span class="cx">         if (parseNumberOptionalNumber(value, x, y) && x >= 1 && y >= 1) {
</span><del>-            m_orderX.setValue(x);
-            m_orderY.setValue(y);
</del><ins>+            m_orderX->setBaseValInternal(x);
+            m_orderY->setBaseValInternal(y);
</ins><span class="cx">         } else
</span><span class="cx">             document().accessSVGExtensions().reportWarning("feConvolveMatrix: problem parsing order=\"" + value + "\". Filtered element will not be displayed.");
</span><span class="cx">         return;
</span><span class="lines">@@ -141,12 +131,12 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (name == SVGNames::targetXAttr) {
</span><del>-        m_targetX.setValue(value.string().toUIntStrict());
</del><ins>+        m_targetX->setBaseValInternal(value.string().toUIntStrict());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (name == SVGNames::targetYAttr) {
</span><del>-        m_targetY.setValue(value.string().toUIntStrict());
</del><ins>+        m_targetY->setBaseValInternal(value.string().toUIntStrict());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -197,8 +187,8 @@
</span><span class="cx"> 
</span><span class="cx"> void SVGFEConvolveMatrixElement::setOrder(float x, float y)
</span><span class="cx"> {
</span><del>-    m_orderX.setValue(x);
-    m_orderY.setValue(y);
</del><ins>+    m_orderX->setBaseValInternal(x);
+    m_orderY->setBaseValInternal(y);
</ins><span class="cx">     invalidate();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFEConvolveMatrixElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.h    2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGFEConvolveMatrixElement.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -21,11 +21,6 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include "FEConvolveMatrix.h"
</span><del>-#include "SVGAnimatedBoolean.h"
-#include "SVGAnimatedEnumeration.h"
-#include "SVGAnimatedInteger.h"
-#include "SVGAnimatedNumber.h"
-#include "SVGAnimatedNumberList.h"
</del><span class="cx"> #include "SVGFilterPrimitiveStandardAttributes.h"
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -73,13 +68,13 @@
</span><span class="cx">     void setKernelUnitLength(float kernelUnitLengthX, float kernelUnitLengthY);
</span><span class="cx"> 
</span><span class="cx">     String in1() const { return m_in1.currentValue(attributeOwnerProxy()); }
</span><del>-    int orderX() const { return m_orderX.currentValue(attributeOwnerProxy()); }
-    int orderY() const { return m_orderY.currentValue(attributeOwnerProxy()); }
</del><ins>+    int orderX() const { return m_orderX->currentValue(); }
+    int orderY() const { return m_orderY->currentValue(); }
</ins><span class="cx">     const SVGNumberListValues& kernelMatrix() const { return m_kernelMatrix.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     float divisor() const { return m_divisor.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     float bias() const { return m_bias.currentValue(attributeOwnerProxy()); }
</span><del>-    int targetX() const { return m_targetX.currentValue(attributeOwnerProxy()); }
-    int targetY() const { return m_targetY.currentValue(attributeOwnerProxy()); }
</del><ins>+    int targetX() const { return m_targetX->currentValue(); }
+    int targetY() const { return m_targetY->currentValue(); }
</ins><span class="cx">     EdgeModeType edgeMode() const { return m_edgeMode.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     float kernelUnitLengthX() const { return m_kernelUnitLengthX.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     float kernelUnitLengthY() const { return m_kernelUnitLengthY.currentValue(attributeOwnerProxy()); }
</span><span class="lines">@@ -86,13 +81,13 @@
</span><span class="cx">     bool preserveAlpha() const { return m_preserveAlpha.currentValue(attributeOwnerProxy()); }
</span><span class="cx"> 
</span><span class="cx">     RefPtr<SVGAnimatedString> in1Animated() { return m_in1.animatedProperty(attributeOwnerProxy()); }
</span><del>-    RefPtr<SVGAnimatedInteger> orderXAnimated() { return m_orderX.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedInteger> orderYAnimated() { return m_orderY.animatedProperty(attributeOwnerProxy()); }
</del><ins>+    SVGAnimatedInteger& orderXAnimated() { return m_orderX; }
+    SVGAnimatedInteger& orderYAnimated() { return m_orderY; }
</ins><span class="cx">     RefPtr<SVGAnimatedNumberList> kernelMatrixAnimated() { return m_kernelMatrix.animatedProperty(attributeOwnerProxy()); }
</span><span class="cx">     RefPtr<SVGAnimatedNumber> divisorAnimated() { return m_divisor.animatedProperty(attributeOwnerProxy()); }
</span><span class="cx">     RefPtr<SVGAnimatedNumber> biasAnimated() { return m_bias.animatedProperty(attributeOwnerProxy()); }
</span><del>-    RefPtr<SVGAnimatedInteger> targetXAnimated() { return m_targetX.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedInteger> targetYAnimated() { return m_targetY.animatedProperty(attributeOwnerProxy()); }
</del><ins>+    SVGAnimatedInteger& targetXAnimated() { return m_targetX; }
+    SVGAnimatedInteger& targetYAnimated() { return m_targetY; }
</ins><span class="cx">     RefPtr<SVGAnimatedEnumeration> edgeModeAnimated() { return m_edgeMode.animatedProperty(attributeOwnerProxy()); }
</span><span class="cx">     RefPtr<SVGAnimatedNumber> kernelUnitLengthXAnimated() { return m_kernelUnitLengthX.animatedProperty(attributeOwnerProxy()); }
</span><span class="cx">     RefPtr<SVGAnimatedNumber> kernelUnitLengthYAnimated() { return m_kernelUnitLengthY.animatedProperty(attributeOwnerProxy()); }
</span><span class="lines">@@ -105,6 +100,9 @@
</span><span class="cx">     static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
</span><span class="cx">     static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
</span><span class="cx">     static void registerAttributes();
</span><ins>+    
+    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEConvolveMatrixElement, SVGFilterPrimitiveStandardAttributes>;
+    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
</ins><span class="cx"> 
</span><span class="cx">     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
</span><span class="cx">     void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="lines">@@ -113,20 +111,20 @@
</span><span class="cx">     bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) override;
</span><span class="cx">     RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
</span><span class="cx"> 
</span><del>-    static const AtomicString& orderXIdentifier();
-    static const AtomicString& orderYIdentifier();
</del><span class="cx">     static const AtomicString& kernelUnitLengthXIdentifier();
</span><span class="cx">     static const AtomicString& kernelUnitLengthYIdentifier();
</span><span class="cx"> 
</span><span class="cx">     AttributeOwnerProxy m_attributeOwnerProxy { *this };
</span><ins>+    PropertyRegistry m_propertyRegistry { *this };
+
</ins><span class="cx">     SVGAnimatedStringAttribute m_in1;
</span><del>-    SVGAnimatedIntegerAttribute m_orderX;
-    SVGAnimatedIntegerAttribute m_orderY;
</del><ins>+    Ref<SVGAnimatedInteger> m_orderX { SVGAnimatedInteger::create(this) };
+    Ref<SVGAnimatedInteger> m_orderY { SVGAnimatedInteger::create(this) };
</ins><span class="cx">     SVGAnimatedNumberListAttribute m_kernelMatrix;
</span><span class="cx">     SVGAnimatedNumberAttribute m_divisor;
</span><span class="cx">     SVGAnimatedNumberAttribute m_bias;
</span><del>-    SVGAnimatedIntegerAttribute m_targetX;
-    SVGAnimatedIntegerAttribute m_targetY;
</del><ins>+    Ref<SVGAnimatedInteger> m_targetX { SVGAnimatedInteger::create(this) };
+    Ref<SVGAnimatedInteger> m_targetY { SVGAnimatedInteger::create(this) };
</ins><span class="cx">     SVGAnimatedEnumerationAttribute<EdgeModeType> m_edgeMode { EDGEMODE_DUPLICATE };
</span><span class="cx">     SVGAnimatedNumberAttribute m_kernelUnitLengthX;
</span><span class="cx">     SVGAnimatedNumberAttribute m_kernelUnitLengthY;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFETurbulenceElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp      2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGFETurbulenceElement.cpp 2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -35,6 +35,11 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(hasTagName(SVGNames::feTurbulenceTag));
</span><span class="cx">     registerAttributes();
</span><ins>+    
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::numOctavesAttr, &SVGFETurbulenceElement::m_numOctaves>();
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref<SVGFETurbulenceElement> SVGFETurbulenceElement::create(const QualifiedName& tagName, Document& document)
</span><span class="lines">@@ -62,7 +67,6 @@
</span><span class="cx">     registry.registerAttribute<SVGNames::baseFrequencyAttr,
</span><span class="cx">         &SVGFETurbulenceElement::baseFrequencyXIdentifier, &SVGFETurbulenceElement::m_baseFrequencyX,
</span><span class="cx">         &SVGFETurbulenceElement::baseFrequencyYIdentifier, &SVGFETurbulenceElement::m_baseFrequencyY>();
</span><del>-    registry.registerAttribute<SVGNames::numOctavesAttr, &SVGFETurbulenceElement::m_numOctaves>();
</del><span class="cx">     registry.registerAttribute<SVGNames::seedAttr, &SVGFETurbulenceElement::m_seed>();
</span><span class="cx">     registry.registerAttribute<SVGNames::stitchTilesAttr, SVGStitchOptions, &SVGFETurbulenceElement::m_stitchTiles>();
</span><span class="cx">     registry.registerAttribute<SVGNames::typeAttr, TurbulenceType, &SVGFETurbulenceElement::m_type>();
</span><span class="lines">@@ -99,7 +103,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (name == SVGNames::numOctavesAttr) {
</span><del>-        m_numOctaves.setValue(value.string().toUIntStrict());
</del><ins>+        m_numOctaves->setBaseValInternal(value.string().toUIntStrict());
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -126,7 +130,7 @@
</span><span class="cx"> 
</span><span class="cx"> void SVGFETurbulenceElement::svgAttributeChanged(const QualifiedName& attrName)
</span><span class="cx"> {
</span><del>-    if (isKnownAttribute(attrName)) {
</del><ins>+    if (isKnownAttribute(attrName) || PropertyRegistry::isKnownAttribute(attrName)) {
</ins><span class="cx">         InstanceInvalidationGuard guard(*this);
</span><span class="cx">         primitiveAttributeChanged(attrName);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFETurbulenceElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFETurbulenceElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFETurbulenceElement.h        2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGFETurbulenceElement.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
</span><span class="cx">  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
</span><del>- * Copyright (C) 2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * This library is free software; you can redistribute it and/or
</span><span class="cx">  * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include "FETurbulence.h"
</span><span class="cx"> #include "SVGAnimatedEnumeration.h"
</span><del>-#include "SVGAnimatedInteger.h"
</del><span class="cx"> #include "SVGAnimatedNumber.h"
</span><span class="cx"> #include "SVGFilterPrimitiveStandardAttributes.h"
</span><span class="cx"> 
</span><span class="lines">@@ -100,7 +99,7 @@
</span><span class="cx"> 
</span><span class="cx">     float baseFrequencyX() const { return m_baseFrequencyX.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     float baseFrequencyY() const { return m_baseFrequencyY.currentValue(attributeOwnerProxy()); }
</span><del>-    int numOctaves() const { return m_numOctaves.currentValue(attributeOwnerProxy()); }
</del><ins>+    int numOctaves() const { return m_numOctaves->currentValue(); }
</ins><span class="cx">     float seed() const { return m_seed.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     SVGStitchOptions stitchTiles() const { return m_stitchTiles.currentValue(attributeOwnerProxy()); }
</span><span class="cx">     TurbulenceType type() const { return m_type.currentValue(attributeOwnerProxy()); }
</span><span class="lines">@@ -107,7 +106,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr<SVGAnimatedNumber> baseFrequencyXAnimated() { return m_baseFrequencyX.animatedProperty(attributeOwnerProxy()); }
</span><span class="cx">     RefPtr<SVGAnimatedNumber> baseFrequencyYAnimated() { return m_baseFrequencyY.animatedProperty(attributeOwnerProxy()); }
</span><del>-    RefPtr<SVGAnimatedInteger> numOctavesAnimated() { return m_numOctaves.animatedProperty(attributeOwnerProxy()); }
</del><ins>+    SVGAnimatedInteger& numOctavesAnimated() { return m_numOctaves; }
</ins><span class="cx">     RefPtr<SVGAnimatedNumber> seedAnimated() { return m_seed.animatedProperty(attributeOwnerProxy()); }
</span><span class="cx">     RefPtr<SVGAnimatedEnumeration> stitchTilesAnimated() { return m_stitchTiles.animatedProperty(attributeOwnerProxy()); }
</span><span class="cx">     RefPtr<SVGAnimatedEnumeration> typeAnimated() { return m_type.animatedProperty(attributeOwnerProxy()); }
</span><span class="lines">@@ -119,6 +118,9 @@
</span><span class="cx">     static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
</span><span class="cx">     static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
</span><span class="cx">     static void registerAttributes();
</span><ins>+    
+    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFETurbulenceElement, SVGFilterPrimitiveStandardAttributes>;
+    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
</ins><span class="cx"> 
</span><span class="cx">     const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
</span><span class="cx">     void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="lines">@@ -131,9 +133,10 @@
</span><span class="cx">     static const AtomicString& baseFrequencyYIdentifier();
</span><span class="cx"> 
</span><span class="cx">     AttributeOwnerProxy m_attributeOwnerProxy { *this };
</span><ins>+    PropertyRegistry m_propertyRegistry { *this };
</ins><span class="cx">     SVGAnimatedNumberAttribute m_baseFrequencyX;
</span><span class="cx">     SVGAnimatedNumberAttribute m_baseFrequencyY;
</span><del>-    SVGAnimatedIntegerAttribute m_numOctaves { 1 };
</del><ins>+    Ref<SVGAnimatedInteger> m_numOctaves { SVGAnimatedInteger::create(this, 1) };
</ins><span class="cx">     SVGAnimatedNumberAttribute m_seed;
</span><span class="cx">     SVGAnimatedEnumerationAttribute<SVGStitchOptions> m_stitchTiles { SVG_STITCHTYPE_NOSTITCH };
</span><span class="cx">     SVGAnimatedEnumerationAttribute<TurbulenceType> m_type { TurbulenceType::Turbulence };
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGFilterElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGFilterElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGFilterElement.h      2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/SVGFilterElement.h 2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include "SVGAnimatedEnumeration.h"
</span><del>-#include "SVGAnimatedInteger.h"
</del><span class="cx"> #include "SVGAnimatedLength.h"
</span><span class="cx"> #include "SVGElement.h"
</span><span class="cx"> #include "SVGExternalResourcesRequired.h"
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLegacyAttributeAnimationControllercppfromrev243035trunkSourceWebCoresvgSVGAnimateElementBasecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.cpp (from rev 243035, trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.cpp                               (rev 0)
+++ trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.cpp  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,379 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SVGLegacyAttributeAnimationController.h"
+
+#include "CSSPropertyNames.h"
+#include "CSSPropertyParser.h"
+#include "QualifiedName.h"
+#include "SVGAnimateElementBase.h"
+#include "SVGAnimationElement.h"
+#include "SVGAnimatorFactory.h"
+#include "SVGElement.h"
+#include "SVGNames.h"
+#include "StyleProperties.h"
+#include <wtf/IsoMallocInlines.h>
+
+namespace WebCore {
+
+SVGLegacyAttributeAnimationController::SVGLegacyAttributeAnimationController(SVGAnimationElement& animationElement, SVGElement& targetElement)
+    : SVGAttributeAnimationControllerBase(animationElement, targetElement)
+    , m_animatedPropertyType(determineAnimatedPropertyType(animationElement, targetElement, animationElement.attributeName()))
+{
+}
+
+SVGAnimatedTypeAnimator& SVGLegacyAttributeAnimationController::animatedTypeAnimator()
+{
+    if (!m_animator)
+        m_animator = SVGAnimatorFactory::create(&m_animationElement, &m_targetElement, m_animatedPropertyType);
+    ASSERT(m_animatedPropertyType == m_animator->type());
+    return *m_animator;
+}
+
+bool SVGLegacyAttributeAnimationController::isAdditive() const
+{
+    // Spec: http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties.
+    switch (m_animatedPropertyType) {
+    case AnimatedBoolean:
+    case AnimatedEnumeration:
+    case AnimatedPreserveAspectRatio:
+    case AnimatedString:
+    case AnimatedUnknown:
+        return false;
+    case AnimatedAngle:
+    case AnimatedColor:
+    case AnimatedInteger:
+    case AnimatedIntegerOptionalInteger:
+    case AnimatedLength:
+    case AnimatedLengthList:
+    case AnimatedNumber:
+    case AnimatedNumberList:
+    case AnimatedNumberOptionalNumber:
+    case AnimatedPath:
+    case AnimatedPoints:
+    case AnimatedRect:
+    case AnimatedTransformList:
+        return true;
+    default:
+        RELEASE_ASSERT_NOT_REACHED();
+        return true;
+    }
+}
+
+bool SVGLegacyAttributeAnimationController::hasValidAttributeType() const
+{
+    return m_animatedPropertyType != AnimatedUnknown;
+}
+
+bool SVGLegacyAttributeAnimationController::calculateFromAndToValues(const String& fromString, const String& toString)
+{
+    m_animationElement.determinePropertyValueTypes(fromString, toString);
+    animatedTypeAnimator().calculateFromAndToValues(m_fromType, m_toType, fromString, toString);
+    ASSERT(m_animatedPropertyType == m_animator->type());
+    return true;
+}
+
+bool SVGLegacyAttributeAnimationController::calculateFromAndByValues(const String& fromString, const String& byString)
+{
+    if (m_animationElement.animationMode() == AnimationMode::By && !isAdditive())
+        return false;
+
+    // from-by animation may only be used with attributes that support addition (e.g. most numeric attributes).
+    if (m_animationElement.animationMode() == AnimationMode::FromBy && !isAdditive())
+        return false;
+
+    m_animationElement.determinePropertyValueTypes(fromString, byString);
+    animatedTypeAnimator().calculateFromAndByValues(m_fromType, m_toType, fromString, byString);
+    ASSERT(m_animatedPropertyType == m_animator->type());
+    return true;
+}
+
+bool SVGLegacyAttributeAnimationController::calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString)
+{
+    if (toAtEndOfDurationString.isEmpty())
+        return false;
+    m_toAtEndOfDurationType = animatedTypeAnimator().constructFromString(toAtEndOfDurationString);
+    return true;
+}
+
+#ifndef NDEBUG
+static inline bool propertyTypesAreConsistent(AnimatedPropertyType expectedPropertyType, const SVGElementAnimatedPropertyList& animatedTypes)
+{
+    for (auto& type : animatedTypes) {
+        for (auto& property : type.properties) {
+            if (expectedPropertyType != property->animatedPropertyType()) {
+                // This is the only allowed inconsistency. SVGAnimatedAngleAnimator handles both SVGAnimatedAngle & SVGAnimatedEnumeration for markers orient attribute.
+                if (expectedPropertyType == AnimatedAngle && property->animatedPropertyType() == AnimatedEnumeration)
+                    return true;
+                return false;
+            }
+        }
+    }
+
+    return true;
+}
+#endif
+
+void SVGLegacyAttributeAnimationController::resetAnimatedType()
+{
+    SVGAnimatedTypeAnimator& animator = animatedTypeAnimator();
+    ASSERT(m_animatedPropertyType == animator.type());
+
+    const QualifiedName& attributeName = m_animationElement.attributeName();
+    SVGAnimationElement::ShouldApplyAnimation shouldApply = m_animationElement.shouldApplyAnimation(&m_targetElement, attributeName);
+
+    if (shouldApply == SVGAnimationElement::DontApplyAnimation)
+        return;
+
+    if (shouldApply == SVGAnimationElement::ApplyXMLAnimation || shouldApply == SVGAnimationElement::ApplyXMLandCSSAnimation) {
+        // SVG DOM animVal animation code-path.
+        m_animatedProperties = animator.findAnimatedPropertiesForAttributeName(m_targetElement, attributeName);
+        if (m_animatedProperties.isEmpty())
+            return;
+
+        ASSERT(propertyTypesAreConsistent(m_animatedPropertyType, m_animatedProperties));
+        if (!m_animatedType)
+            m_animatedType = animator.startAnimValAnimation(m_animatedProperties);
+        else {
+            animator.resetAnimValToBaseVal(m_animatedProperties, *m_animatedType);
+            animator.animValDidChange(m_animatedProperties);
+        }
+        return;
+    }
+
+    // CSS properties animation code-path.
+    ASSERT(m_animatedProperties.isEmpty());
+    String baseValue;
+
+    if (shouldApply == SVGAnimationElement::ApplyCSSAnimation) {
+        ASSERT(SVGAnimationElement::isTargetAttributeCSSProperty(&m_targetElement, attributeName));
+        m_animationElement.computeCSSPropertyValue(&m_targetElement, cssPropertyID(attributeName.localName()), baseValue);
+    }
+
+    if (!m_animatedType)
+        m_animatedType = animator.constructFromString(baseValue);
+    else
+        m_animatedType->setValueAsString(attributeName, baseValue);
+}
+
+void SVGLegacyAttributeAnimationController::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement)
+{
+    ASSERT(resultElement);
+
+    const QualifiedName& attributeName = m_animationElement.attributeName();
+    SVGAnimationElement::ShouldApplyAnimation shouldApply = m_animationElement.shouldApplyAnimation(&m_targetElement, attributeName);
+    
+    if (shouldApply == SVGAnimationElement::DontApplyAnimation)
+        return;
+
+    ASSERT(m_animatedPropertyType == determineAnimatedPropertyType(m_animationElement, m_targetElement, attributeName));
+
+    ASSERT(percentage >= 0 && percentage <= 1);
+    ASSERT(m_animatedPropertyType != AnimatedTransformList || m_animationElement.hasTagName(SVGNames::animateTransformTag));
+    ASSERT(m_animatedPropertyType != AnimatedUnknown);
+    ASSERT(m_animator);
+    ASSERT(m_animator->type() == m_animatedPropertyType);
+    ASSERT(m_fromType);
+    ASSERT(m_fromType->type() == m_animatedPropertyType);
+    ASSERT(m_toType);
+
+    if (shouldApply == SVGAnimationElement::ApplyXMLAnimation || shouldApply == SVGAnimationElement::ApplyXMLandCSSAnimation) {
+        // SVG DOM animVal animation code-path.
+        if (m_animator->findAnimatedPropertiesForAttributeName(m_targetElement, attributeName).isEmpty())
+            return;
+    }
+
+    SVGAnimateElementBase& resultAnimationElement = downcast<SVGAnimateElementBase>(*resultElement);
+    SVGLegacyAttributeAnimationController& resultAnimationController = static_cast<SVGLegacyAttributeAnimationController&>(resultAnimationElement.attributeAnimationController());
+    
+    ASSERT(resultAnimationController.m_animatedType);
+    ASSERT(resultAnimationController.m_animatedPropertyType == m_animatedPropertyType);
+
+    if (m_animationElement.hasTagName(SVGNames::setTag))
+        percentage = 1;
+
+    if (m_animationElement.calcMode() == CalcMode::Discrete)
+        percentage = percentage < 0.5 ? 0 : 1;
+
+    // Target element might have changed.
+    m_animator->setContextElement(&m_targetElement);
+
+    // Be sure to detach list wrappers before we modfiy their underlying value. If we'd do
+    // if after calculateAnimatedValue() ran the cached pointers in the list propery tear
+    // offs would point nowhere, and we couldn't create copies of those values anymore,
+    // while detaching. This is covered by assertions, moving this down would fire them.
+    if (!m_animatedProperties.isEmpty())
+        m_animator->animValWillChange(m_animatedProperties);
+
+    // Values-animation accumulates using the last values entry corresponding to the end of duration time.
+    SVGAnimatedType* toAtEndOfDurationType = m_toAtEndOfDurationType ? m_toAtEndOfDurationType.get() : m_toType.get();
+    m_animator->calculateAnimatedValue(percentage, repeatCount, m_fromType.get(), m_toType.get(), toAtEndOfDurationType, resultAnimationController.m_animatedType.get());
+}
+
+static inline void applyCSSPropertyToTarget(SVGElement& targetElement, CSSPropertyID id, const String& value)
+{
+    ASSERT(!targetElement.m_deletionHasBegun);
+
+    if (!targetElement.ensureAnimatedSMILStyleProperties().setProperty(id, value, false))
+        return;
+
+    targetElement.invalidateStyle();
+}
+
+static inline void removeCSSPropertyFromTarget(SVGElement& targetElement, CSSPropertyID id)
+{
+    ASSERT(!targetElement.m_deletionHasBegun);
+    targetElement.ensureAnimatedSMILStyleProperties().removeProperty(id);
+    targetElement.invalidateStyle();
+}
+
+static inline void applyCSSPropertyToTargetAndInstances(SVGElement& targetElement, const QualifiedName& attributeName, const String& valueAsString)
+{
+    // FIXME: Do we really need to check both isConnected and !parentNode?
+    if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
+        return;
+
+    CSSPropertyID id = cssPropertyID(attributeName.localName());
+
+    SVGElement::InstanceUpdateBlocker blocker(targetElement);
+    applyCSSPropertyToTarget(targetElement, id, valueAsString);
+
+    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
+    for (auto* instance : targetElement.instances())
+        applyCSSPropertyToTarget(*instance, id, valueAsString);
+}
+
+static inline void removeCSSPropertyFromTargetAndInstances(SVGElement& targetElement, const QualifiedName& attributeName)
+{
+    // FIXME: Do we really need to check both isConnected and !parentNode?
+    if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
+        return;
+
+    CSSPropertyID id = cssPropertyID(attributeName.localName());
+
+    SVGElement::InstanceUpdateBlocker blocker(targetElement);
+    removeCSSPropertyFromTarget(targetElement, id);
+
+    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
+    for (auto* instance : targetElement.instances())
+        removeCSSPropertyFromTarget(*instance, id);
+}
+
+static inline void notifyTargetAboutAnimValChange(SVGElement& targetElement, const QualifiedName& attributeName)
+{
+    ASSERT(!targetElement.m_deletionHasBegun);
+    targetElement.svgAttributeChanged(attributeName);
+}
+
+static inline void notifyTargetAndInstancesAboutAnimValChange(SVGElement& targetElement, const QualifiedName& attributeName)
+{
+    if (attributeName == anyQName() || !targetElement.isConnected() || !targetElement.parentNode())
+        return;
+
+    SVGElement::InstanceUpdateBlocker blocker(targetElement);
+    notifyTargetAboutAnimValChange(targetElement, attributeName);
+
+    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
+    for (auto* instance : targetElement.instances())
+        notifyTargetAboutAnimValChange(*instance, attributeName);
+}
+
+void SVGLegacyAttributeAnimationController::applyResultsToTarget()
+{
+    ASSERT(m_animatedPropertyType != AnimatedTransformList || m_animationElement.hasTagName(SVGNames::animateTransformTag));
+    ASSERT(m_animatedPropertyType != AnimatedUnknown);
+    ASSERT(m_animator);
+
+    // Early exit if our animated type got destroyed by a previous endedActiveInterval().
+    if (!m_animatedType)
+        return;
+
+    const QualifiedName& attributeName = m_animationElement.attributeName();
+
+    if (m_animatedProperties.isEmpty()) {
+        // CSS properties animation code-path.
+        // Convert the result of the animation to a String and apply it as CSS property on the target & all instances.
+        applyCSSPropertyToTargetAndInstances(m_targetElement, attributeName, m_animatedType->valueAsString());
+        return;
+    }
+
+    // We do update the style and the animation property independent of each other.
+    SVGAnimationElement::ShouldApplyAnimation shouldApply = m_animationElement.shouldApplyAnimation(&m_targetElement, attributeName);
+    if (shouldApply == SVGAnimationElement::ApplyXMLandCSSAnimation)
+        applyCSSPropertyToTargetAndInstances(m_targetElement, attributeName, m_animatedType->valueAsString());
+
+    // SVG DOM animVal animation code-path.
+    // At this point the SVG DOM values are already changed, unlike for CSS.
+    // We only have to trigger update notifications here.
+    m_animator->animValDidChange(m_animatedProperties);
+    notifyTargetAndInstancesAboutAnimValChange(m_targetElement, attributeName);
+}
+
+void SVGLegacyAttributeAnimationController::clearAnimatedType(SVGElement* targetElement)
+{
+    if (!m_animatedType)
+        return;
+
+    // If the SVGAnimatedType is a list type, e.g. SVGLengthListValues, the wrappers of the
+    // animated properties have to be detached from the items in the list before it's deleted.
+    if (!m_animatedProperties.isEmpty())
+        m_animator->animValWillChange(m_animatedProperties);
+
+    if (!targetElement) {
+        m_animatedType = nullptr;
+        return;
+    }
+
+    const QualifiedName& attributeName = m_animationElement.attributeName();
+
+    if (m_animatedProperties.isEmpty()) {
+        // CSS properties animation code-path.
+        removeCSSPropertyFromTargetAndInstances(*targetElement, m_animationElement.attributeName());
+        m_animatedType = nullptr;
+        return;
+    }
+
+    SVGAnimationElement::ShouldApplyAnimation shouldApply = m_animationElement.shouldApplyAnimation(targetElement, attributeName);
+    if (shouldApply == SVGAnimationElement::ApplyXMLandCSSAnimation)
+        removeCSSPropertyFromTargetAndInstances(*targetElement, attributeName);
+
+    // SVG DOM animVal animation code-path.
+    if (m_animator) {
+        m_animator->stopAnimValAnimation(m_animatedProperties);
+        notifyTargetAndInstancesAboutAnimValChange(*targetElement, attributeName);
+    }
+
+    m_animatedProperties.clear();
+    m_animatedType = nullptr;
+}
+
+float SVGLegacyAttributeAnimationController::calculateDistance(const String& fromString, const String& toString)
+{
+    return animatedTypeAnimator().calculateDistance(fromString, toString);
+}
+
+}
+
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgSVGLegacyAttributeAnimationControllerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.h                         (rev 0)
+++ trunk/Source/WebCore/svg/SVGLegacyAttributeAnimationController.h    2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedType.h"
+#include "SVGAnimatedTypeAnimator.h"
+#include "SVGAttributeAnimationControllerBase.h"
+
+namespace WebCore {
+
+class SVGAnimationElement;
+class SVGElement;
+class SVGSMILElement;
+
+class SVGLegacyAttributeAnimationController : public SVGAttributeAnimationControllerBase {
+public:
+    SVGLegacyAttributeAnimationController(SVGAnimationElement&, SVGElement&);
+
+private:
+    SVGAnimatedTypeAnimator& animatedTypeAnimator();
+
+    void resetAnimatedType() override;
+    void clearAnimatedType(SVGElement* targetElement) override;
+    
+    bool calculateFromAndToValues(const String& fromString, const String& toString) override;
+    bool calculateFromAndByValues(const String& fromString, const String& byString) override;
+    bool calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString) override;
+
+    void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) override;
+
+    void applyResultsToTarget() override;
+    float calculateDistance(const String& fromString, const String& toString) override;
+    
+    bool isAdditive() const override;
+    bool hasValidAttributeType() const override;
+
+    const AnimatedPropertyType m_animatedPropertyType;
+
+    std::unique_ptr<SVGAnimatedType> m_fromType;
+    std::unique_ptr<SVGAnimatedType> m_toType;
+    std::unique_ptr<SVGAnimatedType> m_toAtEndOfDurationType;
+    std::unique_ptr<SVGAnimatedType> m_animatedType;
+
+    SVGElementAnimatedPropertyList m_animatedProperties;
+    std::unique_ptr<SVGAnimatedTypeAnimator> m_animator;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp    2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -309,7 +309,7 @@
</span><span class="cx">     SVGElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool SVGSMILElement::hasValidAttributeName()
</del><ins>+bool SVGSMILElement::hasValidAttributeName() const
</ins><span class="cx"> {
</span><span class="cx">     return attributeName() != anyQName();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoresvganimationSVGSMILElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/animation/SVGSMILElement.h      2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.h 2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx">     InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) override;
</span><span class="cx">     void removedFromAncestor(RemovalType, ContainerNode&) override;
</span><span class="cx">     
</span><del>-    virtual bool hasValidAttributeType() = 0;
-    virtual bool hasValidAttributeName();
</del><ins>+    virtual bool hasValidAttributeType() const = 0;
+    virtual bool hasValidAttributeName() const;
</ins><span class="cx">     virtual void animationAttributeChanged() = 0;
</span><span class="cx"> 
</span><span class="cx">     SMILTimeContainer* timeContainer() { return m_timeContainer.get(); }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPrimitivePropertyh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h                               (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPrimitiveProperty.h  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,142 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedProperty.h"
+#include "SVGProperty.h"
+
+namespace WebCore {
+
+template<typename PropertyType>
+class SVGAnimatedPrimitiveProperty : public SVGAnimatedProperty {
+public:
+    using ValueType = PropertyType;
+
+    static Ref<SVGAnimatedPrimitiveProperty> create(SVGElement* contextElement)
+    {
+        return adoptRef(*new SVGAnimatedPrimitiveProperty(contextElement));
+    }
+
+    static Ref<SVGAnimatedPrimitiveProperty> create(SVGElement* contextElement, const PropertyType& value)
+    {
+        return adoptRef(*new SVGAnimatedPrimitiveProperty(contextElement, value));
+    }
+
+    // Used by the DOM.
+    ExceptionOr<void> setBaseVal(const PropertyType& baseVal)
+    {
+        m_baseVal = baseVal;
+        commitPropertyChange();
+        return { };
+    }
+
+    // Used by SVGElement::parseAttribute().
+    void setBaseValInternal(const PropertyType& baseVal) { m_baseVal = baseVal; }
+    const PropertyType& baseVal() const { return m_baseVal; }
+
+    // Used by SVGAttributeAnimator::progress.
+    void setAnimVal(const PropertyType& animVal)
+    {
+        ASSERT(isAnimating());
+        m_animVal = animVal;
+    }
+
+    const PropertyType& animVal() const
+    {
+        ASSERT_IMPLIES(isAnimating(), m_animVal);
+        return isAnimating() ? *m_animVal : m_baseVal;
+    }
+
+    PropertyType& animVal()
+    {
+        ASSERT_IMPLIES(isAnimating(), m_animVal);
+        return isAnimating() ? *m_animVal : m_baseVal;
+    }
+
+    // Used when committing a change from the SVGAnimatedProperty to the attribute.
+    String baseValAsString() const override { return SVGPropertyTraits<PropertyType>::toString(m_baseVal); }
+
+    // Used to apply the SVGAttributeAnimator change to the target element.
+    String animValAsString() const override
+    {
+        ASSERT(isAnimating() && !!m_animVal);
+        return SVGPropertyTraits<PropertyType>::toString(*m_animVal);
+    }
+
+    // Managing the relationship with the owner.
+    void setDirty() override { m_state = SVGPropertyState::Dirty; }
+    bool isDirty() const override { return m_state == SVGPropertyState::Dirty; }
+    Optional<String> synchronize() override
+    {
+        if (m_state == SVGPropertyState::Clean)
+            return WTF::nullopt;
+        m_state = SVGPropertyState::Clean;
+        return baseValAsString();
+    }
+
+    // Used by RenderSVGElements and DumpRenderTree.
+    const PropertyType& currentValue() const
+    {
+        ASSERT_IMPLIES(isAnimating(), m_animVal);
+        return isAnimating() ? *m_animVal : m_baseVal;
+    }
+
+    // Controlling the animation.
+    void startAnimation() override
+    {
+        if (isAnimating())
+            return;
+        m_animVal = m_baseVal;
+        SVGAnimatedProperty::startAnimation();
+    }
+
+    void stopAnimation() override
+    {
+        if (!isAnimating())
+            return;
+        m_animVal = WTF::nullopt;
+        SVGAnimatedProperty::stopAnimation();
+    }
+
+protected:
+    SVGAnimatedPrimitiveProperty(SVGElement* contextElement)
+        : SVGAnimatedProperty(contextElement)
+        , m_baseVal(SVGPropertyTraits<PropertyType>::initialValue())
+    {
+    }
+
+    SVGAnimatedPrimitiveProperty(SVGElement* contextElement, const PropertyType& value)
+        : SVGAnimatedProperty(contextElement)
+        , m_baseVal(value)
+    {
+    }
+
+    PropertyType m_baseVal;
+    mutable Optional<PropertyType> m_animVal;
+    SVGPropertyState m_state { SVGPropertyState::Clean };
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertycppfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp                              (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.cpp 2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SVGAnimatedProperty.h"
+
+#include "SVGElement.h"
+
+namespace WebCore {
+
+SVGPropertyOwner* SVGAnimatedProperty::owner() const
+{
+    return m_contextElement;
+}
+
+void SVGAnimatedProperty::commitPropertyChange()
+{
+    if (!m_contextElement)
+        return;
+    m_contextElement->commitPropertyChange(*this);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h                                (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedProperty.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGPropertyOwner.h"
+
+namespace WebCore {
+
+class SVGAnimatedProperty : public RefCounted<SVGAnimatedProperty>, public SVGPropertyOwner {
+public:
+    virtual ~SVGAnimatedProperty() = default;
+    
+    // Manage the relationship with the owner.
+    bool isAttached() const { return m_contextElement; }
+    void detach() { m_contextElement = nullptr; }
+    SVGElement* contextElement() const { return m_contextElement; }
+    
+    virtual String baseValAsString() const { return emptyString(); }
+    virtual String animValAsString() const { return emptyString(); }
+    
+    // Control the synchronization between the attribute and its reflection in baseVal.
+    virtual bool isDirty() const { return false; }
+    virtual void setDirty() { }
+    virtual Optional<String> synchronize() { return WTF::nullopt; }
+    
+    // Control the animation life cycle.
+    bool isAnimating() const { return m_isAnimating; }
+    virtual void startAnimation() { m_isAnimating = true; }
+    virtual void stopAnimation() { m_isAnimating = false; }
+    
+    // Attach/Detach the animVal of the traget element's property by the instance element's property.
+    virtual void instanceStartAnimation(SVGAnimatedProperty&) { m_isAnimating = true; }
+    virtual void instanceStopAnimation() { m_isAnimating = false; }
+    
+protected:
+    SVGAnimatedProperty(SVGElement* contextElement)
+        : m_contextElement(contextElement)
+    {
+    }
+    
+    SVGPropertyOwner* owner() const override;
+    void commitPropertyChange() override;
+    
+    SVGElement* m_contextElement { nullptr };
+    bool m_isAnimating { false };
+};
+
+} // namespace WebCore
+
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAccessorhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessor.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessor.h                                (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessor.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,51 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGPointerMemberAccessor.h"
+
+namespace WebCore {
+
+template<typename OwnerType, typename AnimatedPropertyType>
+class SVGAnimatedPropertyAccessor : public SVGPointerMemberAccessor<OwnerType, AnimatedPropertyType> {
+    using Base = SVGPointerMemberAccessor<OwnerType, AnimatedPropertyType>;
+
+public:
+    using Base::Base;
+    using Base::singleton;
+    using Base::property;
+    using AnimatedProperty = AnimatedPropertyType;
+
+    bool matches(const OwnerType& owner, const SVGAnimatedProperty& animatedProperty) const override
+    {
+        return property(owner).ptr() == &animatedProperty;
+    }
+
+private:
+    bool isAnimatedProperty() const override { return true; }
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAccessorImplhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h                            (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedPropertyAccessor.h"
+#include "SVGAnimatedPropertyAnimatorImpl.h"
+#include "SVGAnimatedPropertyImpl.h"
+#include "SVGNames.h"
+
+namespace WebCore {
+
+template<typename OwnerType>
+class SVGAnimatedIntegerAccessor final : public SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedInteger> {
+    using Base = SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedInteger>;
+
+public:
+    using Base::Base;
+    using Base::property;
+    template<Ref<SVGAnimatedInteger> OwnerType::*property>
+    constexpr static const SVGMemberAccessor<OwnerType>& singleton() { return Base::template singleton<SVGAnimatedIntegerAccessor, property>(); }
+
+private:
+    std::unique_ptr<SVGAttributeAnimator> createAnimator(OwnerType& owner, const QualifiedName& attributeName, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive) const final
+    {
+        return SVGAnimatedIntegerAnimator::create(attributeName, property(owner), animationMode, calcMode, isAccumulated, isAdditive);
+    }
+
+    void appendAnimatedInstance(OwnerType& owner, SVGAttributeAnimator& animator) const final
+    {
+        static_cast<SVGAnimatedIntegerAnimator&>(animator).appendAnimatedInstance(property(owner));
+    }
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAnimatorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimator.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimator.h                                (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimator.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,104 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAttributeAnimator.h"
+
+namespace WebCore {
+
+class SVGElement;
+
+template<typename AnimatedProperty, typename AnimationFunction>
+class SVGAnimatedPropertyAnimator : public SVGAttributeAnimator {
+public:
+    using AnimatorAnimatedProperty = AnimatedProperty;
+
+    void appendAnimatedInstance(Ref<AnimatedProperty>& animated)
+    {
+        m_animatedInstances.append(animated.copyRef());
+    }
+
+    bool isDiscrete() const override { return m_function.isDiscrete(); }
+
+    void setFromAndToValues(SVGElement* targetElement, const String& from, const String& to) override
+    {
+        m_function.setFromAndToValues(targetElement, from, to);
+    }
+
+    void setFromAndByValues(SVGElement* targetElement, const String& from, const String& by) override
+    {
+        m_function.setFromAndByValues(targetElement, from, by);
+    }
+
+    void setToAtEndOfDurationValue(const String& toAtEndOfDuration) override
+    {
+        m_function.setToAtEndOfDurationValue(toAtEndOfDuration);
+    }
+
+    void start(SVGElement*) override
+    {
+        m_animated->startAnimation();
+        for (auto& instance : m_animatedInstances)
+            instance->instanceStartAnimation(m_animated);
+    }
+
+    void apply(SVGElement* targetElement) override
+    {
+        applyAnimatedPropertyChange(targetElement);
+    }
+
+    void stop(SVGElement* targetElement) override
+    {
+        if (!m_animated->isAnimating())
+            return;
+
+        m_animated->stopAnimation();
+        for (auto& instance : m_animatedInstances)
+            instance->instanceStopAnimation();
+
+        applyAnimatedPropertyChange(targetElement);
+    }
+
+    float calculateDistance(SVGElement* targetElement, const String& from, const String& to) const override
+    {
+        return m_function.calculateDistance(targetElement, from, to);
+    }
+
+protected:
+    template<typename... Arguments>
+    SVGAnimatedPropertyAnimator(const QualifiedName& attributeName, Ref<AnimatedProperty>& animated, Arguments&&... arguments)
+        : SVGAttributeAnimator(attributeName)
+        , m_animated(animated.copyRef())
+        , m_function(std::forward<Arguments>(arguments)...)
+    {
+    }
+
+    Ref<AnimatedProperty> m_animated;
+    Vector<Ref<AnimatedProperty>> m_animatedInstances;
+    AnimationFunction m_function;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyAnimatorImplhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h                            (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedPropertyAnimator.h"
+#include "SVGAnimatedPropertyImpl.h"
+#include "SVGAnimationAdditiveValueFunctionImpl.h"
+
+namespace WebCore {
+
+class SVGAnimatedIntegerPairAnimator;
+
+template<typename AnimatedPropertyAnimator1, typename AnimatedPropertyAnimator2>
+class SVGAnimatedPropertyPairAnimator;
+
+class SVGAnimatedIntegerAnimator final : public SVGAnimatedPropertyAnimator<SVGAnimatedInteger, SVGAnimationIntegerFunction> {
+    friend class SVGAnimatedPropertyPairAnimator<SVGAnimatedIntegerAnimator, SVGAnimatedIntegerAnimator>;
+    friend class SVGAnimatedIntegerPairAnimator;
+    using Base = SVGAnimatedPropertyAnimator<SVGAnimatedInteger, SVGAnimationIntegerFunction>;
+    using Base::Base;
+
+public:
+    static auto create(const QualifiedName& attributeName, Ref<SVGAnimatedInteger>& animated, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+    {
+        return std::unique_ptr<SVGAnimatedIntegerAnimator>(new SVGAnimatedIntegerAnimator(attributeName, animated, animationMode, calcMode, isAccumulated, isAdditive));
+    }
+
+private:
+    void progress(SVGElement* targetElement, float percentage, unsigned repeatCount) final
+    {
+        m_function.progress(targetElement, percentage, repeatCount, m_animated->animVal());
+    }
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyImplhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyImpl.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyImpl.h                            (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyImpl.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,46 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedAngle.h"
+#include "SVGAnimatedBoolean.h"
+#include "SVGAnimatedEnumeration.h"
+#include "SVGAnimatedLength.h"
+#include "SVGAnimatedLengthList.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGAnimatedNumberList.h"
+#include "SVGAnimatedPointList.h"
+#include "SVGAnimatedPreserveAspectRatio.h"
+#include "SVGAnimatedPrimitiveProperty.h"
+#include "SVGAnimatedRect.h"
+#include "SVGAnimatedString.h"
+#include "SVGAnimatedTransformList.h"
+
+namespace WebCore {
+
+using SVGAnimatedInteger = SVGAnimatedPrimitiveProperty<int>;
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAccessorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h                            (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessor.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGMemberAccessor.h"
+
+namespace WebCore {
+
+template<typename OwnerType, typename AccessorType1, typename AccessorType2>
+class SVGAnimatedPropertyPairAccessor : public SVGMemberAccessor<OwnerType> {
+    using AnimatedPropertyType1 = typename AccessorType1::AnimatedProperty;
+    using AnimatedPropertyType2 = typename AccessorType2::AnimatedProperty;
+    using Base = SVGMemberAccessor<OwnerType>;
+
+public:
+    SVGAnimatedPropertyPairAccessor(Ref<AnimatedPropertyType1> OwnerType::*property1, Ref<AnimatedPropertyType2> OwnerType::*property2)
+        : m_accessor1(property1)
+        , m_accessor2(property2)
+    {
+    }
+
+protected:
+    template<typename AccessorType, Ref<AnimatedPropertyType1> OwnerType::*property1, Ref<AnimatedPropertyType2> OwnerType::*property2>
+    static SVGMemberAccessor<OwnerType>& singleton()
+    {
+        static NeverDestroyed<AccessorType> propertyAccessor { property1, property2 };
+        return propertyAccessor;
+    }
+
+    bool isAnimatedProperty() const override { return true; }
+
+    Ref<AnimatedPropertyType1>& property1(OwnerType& owner) const { return m_accessor1.property(owner); }
+    const Ref<AnimatedPropertyType1>& property1(const OwnerType& owner) const { return m_accessor1.property(owner); }
+
+    Ref<AnimatedPropertyType2>& property2(OwnerType& owner) const { return m_accessor2.property(owner); }
+    const Ref<AnimatedPropertyType2>& property2(const OwnerType& owner) const { return m_accessor2.property(owner); }
+
+    bool matches(const OwnerType& owner, const SVGAnimatedProperty& animatedProperty) const override
+    {
+        return m_accessor1.matches(owner, animatedProperty) || m_accessor2.matches(owner, animatedProperty);
+    }
+
+    AccessorType1 m_accessor1;
+    AccessorType2 m_accessor2;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAccessorImplh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessorImpl.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessorImpl.h                                (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAccessorImpl.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedPropertyAccessorImpl.h"
+#include "SVGAnimatedPropertyAnimatorImpl.h"
+#include "SVGAnimatedPropertyImpl.h"
+#include "SVGAnimatedPropertyPairAccessor.h"
+#include "SVGAnimatedPropertyPairAnimatorImpl.h"
+#include "SVGNames.h"
+
+namespace WebCore {
+
+template<typename OwnerType>
+class SVGAnimatedIntegerPairAccessor final : public SVGAnimatedPropertyPairAccessor<OwnerType, SVGAnimatedIntegerAccessor<OwnerType>, SVGAnimatedIntegerAccessor<OwnerType>> {
+    using Base = SVGAnimatedPropertyPairAccessor<OwnerType, SVGAnimatedIntegerAccessor<OwnerType>, SVGAnimatedIntegerAccessor<OwnerType>>;
+    using Base::property1;
+    using Base::property2;
+
+public:
+    using Base::Base;
+    template<Ref<SVGAnimatedInteger> OwnerType::*property1, Ref<SVGAnimatedInteger> OwnerType::*property2>
+    constexpr static const SVGMemberAccessor<OwnerType>& singleton() { return Base::template singleton<SVGAnimatedIntegerPairAccessor, property1, property2>(); }
+
+private:
+    Optional<String> synchronize(const OwnerType& owner) const final
+    {
+        bool dirty1 = property1(owner)->isDirty();
+        bool dirty2 = property2(owner)->isDirty();
+        if (!(dirty1 || dirty2))
+            return WTF::nullopt;
+
+        String string1 = dirty1 ? *property1(owner)->synchronize() : property1(owner)->baseValAsString();
+        String string2 = dirty2 ? *property2(owner)->synchronize() : property2(owner)->baseValAsString();
+        return string1 == string2 ? string1 : string1 + ", " + string2;
+    }
+
+    std::unique_ptr<SVGAttributeAnimator> createAnimator(OwnerType& owner, const QualifiedName& attributeName, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive) const final
+    {
+        return SVGAnimatedIntegerPairAnimator::create(attributeName, property1(owner), property2(owner), animationMode, calcMode, isAccumulated, isAdditive);
+    }
+
+    void appendAnimatedInstance(OwnerType& owner, SVGAttributeAnimator& animator) const final
+    {
+        static_cast<SVGAnimatedIntegerPairAnimator&>(animator).appendAnimatedInstance(property1(owner), property2(owner));
+    }
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAnimatorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimator.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimator.h                            (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimator.h       2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAttributeAnimator.h"
+
+namespace WebCore {
+
+class SVGElement;
+
+template<typename AnimatedPropertyAnimator1, typename AnimatedPropertyAnimator2>
+class SVGAnimatedPropertyPairAnimator : public SVGAttributeAnimator {
+public:
+    using AnimatedProperty1 = typename AnimatedPropertyAnimator1::AnimatorAnimatedProperty;
+    using AnimatedProperty2 = typename AnimatedPropertyAnimator2::AnimatorAnimatedProperty;
+
+    void appendAnimatedInstance(Ref<AnimatedProperty1>& animated1, Ref<AnimatedProperty2>& animated2)
+    {
+        m_animatedPropertyAnimator1->appendAnimatedInstance(animated1);
+        m_animatedPropertyAnimator2->appendAnimatedInstance(animated2);
+    }
+
+protected:
+    SVGAnimatedPropertyPairAnimator(const QualifiedName& attributeName, Ref<AnimatedProperty1>& animated1, Ref<AnimatedProperty2>& animated2, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+        : SVGAttributeAnimator(attributeName)
+        , m_animatedPropertyAnimator1(AnimatedPropertyAnimator1::create(attributeName, animated1, animationMode, calcMode, isAccumulated, isAdditive))
+        , m_animatedPropertyAnimator2(AnimatedPropertyAnimator2::create(attributeName, animated2, animationMode, calcMode, isAccumulated, isAdditive))
+    {
+    }
+
+    void start(SVGElement* targetElement) override
+    {
+        m_animatedPropertyAnimator1->start(targetElement);
+        m_animatedPropertyAnimator2->start(targetElement);
+    }
+
+    void progress(SVGElement* targetElement, float percentage, unsigned repeatCount) override
+    {
+        m_animatedPropertyAnimator1->progress(targetElement, percentage, repeatCount);
+        m_animatedPropertyAnimator2->progress(targetElement, percentage, repeatCount);
+    }
+
+    void apply(SVGElement* targetElement) override
+    {
+        applyAnimatedPropertyChange(targetElement);
+    }
+
+    void stop(SVGElement* targetElement) override
+    {
+        m_animatedPropertyAnimator1->stop(targetElement);
+        m_animatedPropertyAnimator2->stop(targetElement);
+    }
+
+    std::unique_ptr<AnimatedPropertyAnimator1> m_animatedPropertyAnimator1;
+    std::unique_ptr<AnimatedPropertyAnimator2> m_animatedPropertyAnimator2;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimatedPropertyPairAnimatorImplh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h                                (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedPropertyImpl.h"
+#include "SVGAnimatedPropertyPairAnimator.h"
+#include "SVGMarkerTypes.h"
+
+namespace WebCore {
+
+class SVGElement;
+
+class SVGAnimatedIntegerPairAnimator final : public SVGAnimatedPropertyPairAnimator<SVGAnimatedIntegerAnimator, SVGAnimatedIntegerAnimator> {
+    using Base = SVGAnimatedPropertyPairAnimator<SVGAnimatedIntegerAnimator, SVGAnimatedIntegerAnimator>;
+    using Base::Base;
+
+public:
+    static auto create(const QualifiedName& attributeName, Ref<SVGAnimatedInteger>& animated1, Ref<SVGAnimatedInteger>& animated2, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+    {
+        return std::unique_ptr<SVGAnimatedIntegerPairAnimator>(new SVGAnimatedIntegerPairAnimator(attributeName, animated1, animated2, animationMode, calcMode, isAccumulated, isAdditive));
+    }
+
+private:
+    void setFromAndToValues(SVGElement*, const String& from, const String& to) final
+    {
+        auto pairFrom = SVGPropertyTraits<std::pair<int, int>>::fromString(from);
+        auto pairTo = SVGPropertyTraits<std::pair<int, int>>::fromString(to);
+
+        m_animatedPropertyAnimator1->m_function.m_from = pairFrom.first;
+        m_animatedPropertyAnimator1->m_function.m_to = pairTo.first;
+
+        m_animatedPropertyAnimator2->m_function.m_from = pairFrom.second;
+        m_animatedPropertyAnimator2->m_function.m_to = pairTo.second;
+    }
+
+    void setFromAndByValues(SVGElement*, const String& from, const String& by) final
+    {
+        auto pairFrom = SVGPropertyTraits<std::pair<int, int>>::fromString(from);
+        auto pairBy = SVGPropertyTraits<std::pair<int, int>>::fromString(by);
+
+        m_animatedPropertyAnimator1->m_function.m_from = pairFrom.first;
+        m_animatedPropertyAnimator1->m_function.m_to = pairFrom.first + pairBy.first;
+
+        m_animatedPropertyAnimator2->m_function.m_from = pairFrom.second;
+        m_animatedPropertyAnimator2->m_function.m_to = pairFrom.second + pairBy.second;
+    }
+
+    void setToAtEndOfDurationValue(const String& toAtEndOfDuration) final
+    {
+        auto pairToAtEndOfDuration = SVGPropertyTraits<std::pair<int, int>>::fromString(toAtEndOfDuration);
+        m_animatedPropertyAnimator1->m_function.m_toAtEndOfDuration = pairToAtEndOfDuration.first;
+        m_animatedPropertyAnimator2->m_function.m_toAtEndOfDuration = pairToAtEndOfDuration.second;
+    }
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimationAdditiveFunctionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveFunction.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveFunction.h                               (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveFunction.h  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,76 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimationFunction.h"
+
+namespace WebCore {
+
+class SVGAnimationAdditiveFunction : public SVGAnimationFunction {
+public:
+    SVGAnimationAdditiveFunction(AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+        : SVGAnimationFunction(animationMode)
+        , m_calcMode(calcMode)
+        , m_isAccumulated(isAccumulated)
+        , m_isAdditive(isAdditive)
+    {
+    }
+
+    void setFromAndByValues(SVGElement* targetElement, const String& from, const String& by) override
+    {
+        setFromAndToValues(targetElement, from, by);
+        addFromAndToValues(targetElement);
+    }
+
+    void setToAtEndOfDurationValue(const String&) override
+    {
+        ASSERT_NOT_REACHED();
+    }
+
+protected:
+    float progress(float percentage, unsigned repeatCount, float from, float to, float toAtEndOfDuration, float animated)
+    {
+        float number;
+        if (m_calcMode == CalcMode::Discrete)
+            number = percentage < 0.5 ? from : to;
+        else
+            number = (to - from) * percentage + from;
+
+        if (m_isAccumulated && repeatCount)
+            number += toAtEndOfDuration * repeatCount;
+
+        if (m_isAdditive && m_animationMode != AnimationMode::To)
+            number += animated;
+
+        return number;
+    }
+
+    CalcMode m_calcMode;
+    bool m_isAccumulated;
+    bool m_isAdditive;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimationAdditiveValueFunctionhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunction.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunction.h                          (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunction.h     2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimationAdditiveFunction.h"
+
+namespace WebCore {
+
+template<typename ValueType>
+class SVGAnimationAdditiveValueFunction : public SVGAnimationAdditiveFunction {
+public:
+    using SVGAnimationAdditiveFunction::SVGAnimationAdditiveFunction;
+    
+protected:
+    ValueType toAtEndOfDuration() const { return m_toAtEndOfDuration ? *m_toAtEndOfDuration : m_to; }
+
+    ValueType m_from;
+    ValueType m_to;
+    Optional<ValueType> m_toAtEndOfDuration;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimationAdditiveValueFunctionImplhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.h                              (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.h 2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimationAdditiveValueFunction.h"
+#include "SVGPropertyTraits.h"
+
+namespace WebCore {
+
+class SVGAnimationIntegerFunction : public SVGAnimationAdditiveValueFunction<int> {
+    friend class SVGAnimatedIntegerPairAnimator;
+
+public:
+    using Base = SVGAnimationAdditiveValueFunction<int>;
+    using Base::Base;
+
+    void setFromAndToValues(SVGElement*, const String& from, const String& to) override
+    {
+        m_from = SVGPropertyTraits<int>::fromString(from);
+        m_to = SVGPropertyTraits<int>::fromString(to);
+    }
+
+    void setToAtEndOfDurationValue(const String& toAtEndOfDuration) override
+    {
+        m_toAtEndOfDuration = SVGPropertyTraits<int>::fromString(toAtEndOfDuration);
+    }
+
+    void progress(SVGElement*, float percentage, unsigned repeatCount, int& animated)
+    {
+        animated = static_cast<int>(roundf(Base::progress(percentage, repeatCount, m_from, m_to, toAtEndOfDuration(), animated)));
+    }
+
+    float calculateDistance(SVGElement*, const String& from, const String& to) const override
+    {
+        return std::abs(to.toIntStrict() - from.toIntStrict());
+    }
+
+private:
+    void addFromAndToValues(SVGElement*) override
+    {
+        m_to += m_from;
+    }
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAnimationFunctionhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAnimationFunction.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAnimationFunction.h                               (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAnimationFunction.h  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+class SVGAnimationFunction {
+public:
+    virtual ~SVGAnimationFunction() = default;
+
+    virtual bool isDiscrete() const { return false; }
+
+    virtual void setFromAndToValues(SVGElement* targetElement, const String&, const String&) = 0;
+    virtual void setFromAndByValues(SVGElement* targetElement, const String&, const String&) = 0;
+    virtual void setToAtEndOfDurationValue(const String&) = 0;
+
+    virtual float calculateDistance(SVGElement*, const String&, const String&) const { return -1; }
+protected:
+    SVGAnimationFunction(AnimationMode animationMode)
+        : m_animationMode(animationMode)
+    {
+    }
+
+    virtual void addFromAndToValues(SVGElement*) { }
+
+    AnimationMode m_animationMode;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAttributeAnimatorcppfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp                             (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.cpp        2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SVGAttributeAnimator.h"
+
+#include "CSSComputedStyleDeclaration.h"
+#include "CSSPropertyParser.h"
+#include "SVGElement.h"
+
+namespace WebCore {
+
+void SVGAttributeAnimator::applyAnimatedPropertyChange(SVGElement* element, const QualifiedName& attributeName)
+{
+    ASSERT(!element->m_deletionHasBegun);
+    element->svgAttributeChanged(attributeName);
+}
+
+void SVGAttributeAnimator::applyAnimatedPropertyChange(SVGElement* targetElement)
+{
+    ASSERT(targetElement);
+    ASSERT(m_attributeName != anyQName());
+
+    // FIXME: Do we really need to check both isConnected and !parentNode?
+    if (!targetElement->isConnected() || !targetElement->parentNode())
+        return;
+
+    SVGElement::InstanceUpdateBlocker blocker(*targetElement);
+    applyAnimatedPropertyChange(targetElement, m_attributeName);
+
+    // If the target element has instances, update them as well, w/o requiring the <use> tree to be rebuilt.
+    for (auto* instance : targetElement->instances())
+        applyAnimatedPropertyChange(instance, m_attributeName);
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAttributeAnimatorhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.h                               (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeAnimator.h  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "CSSPropertyNames.h"
+#include "QualifiedName.h"
+#include <wtf/RefCounted.h>
+#include <wtf/StdLibExtras.h>
+
+namespace WebCore {
+
+class SVGElement;
+
+enum class AnimationMode : uint8_t {
+    None,
+    FromTo,
+    FromBy,
+    To,
+    By,
+    Values,
+    Path
+};
+
+enum class CalcMode : uint8_t {
+    Discrete,
+    Linear,
+    Paced,
+    Spline
+};
+
+class SVGAttributeAnimator {
+public:
+    SVGAttributeAnimator(const QualifiedName& attributeName)
+        : m_attributeName(attributeName)
+    {
+    }
+
+    virtual ~SVGAttributeAnimator() = default;
+
+    virtual bool isDiscrete() const { return false; }
+
+    virtual void setFromAndToValues(SVGElement*, const String&, const String&) { }
+    virtual void setFromAndByValues(SVGElement*, const String&, const String&) { }
+    virtual void setToAtEndOfDurationValue(const String&) { }
+
+    virtual void start(SVGElement*) = 0;
+    virtual void progress(SVGElement*, float, unsigned) = 0;
+    virtual void apply(SVGElement*) = 0;
+    virtual void stop(SVGElement* targetElement) = 0;
+
+    virtual float calculateDistance(SVGElement*, const String&, const String&) const { return -1; }
+
+protected:
+    static void applyAnimatedPropertyChange(SVGElement*, const QualifiedName&);
+
+    void applyAnimatedPropertyChange(SVGElement*);
+
+    const QualifiedName& m_attributeName;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp   2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "SVGAttributeOwnerProxy.h"
</span><span class="cx"> 
</span><ins>+#include "SVGElement.h"
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> SVGAttributeOwnerProxy::SVGAttributeOwnerProxy(SVGElement& element)
</span></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h     2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h        2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#include "QualifiedName.h"
</ins><span class="cx"> #include "SVGAnimatedPropertyType.h"
</span><span class="cx"> #include <wtf/WeakPtr.h>
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGAttributeRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h (243035 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h       2019-03-16 07:37:24 UTC (rev 243035)
+++ trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h  2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include "SVGAnimatedBoolean.h"
</span><span class="cx"> #include "SVGAnimatedEnumeration.h"
</span><del>-#include "SVGAnimatedInteger.h"
</del><span class="cx"> #include "SVGAnimatedLength.h"
</span><span class="cx"> #include "SVGAnimatedLengthList.h"
</span><span class="cx"> #include "SVGAnimatedNumber.h"
</span><span class="lines">@@ -80,20 +79,6 @@
</span><span class="cx">         registerAttribute(SVGAnimatedEnumerationAttributeAccessor<OwnerType, EnumType>::template singleton<attributeName, attribute>());
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGAnimatedIntegerAttribute OwnerType::*attribute>
-    void registerAttribute()
-    {
-        registerAttribute(SVGAnimatedIntegerAttributeAccessor<OwnerType>::template singleton<attributeName, attribute>());
-    }
-
-    template<const LazyNeverDestroyed<const QualifiedName>& attributeName,
-        const AtomicString& (*identifier)(), SVGAnimatedIntegerAttribute OwnerType::*attribute,
-        const AtomicString& (*optionalIdentifier)(), SVGAnimatedIntegerAttribute OwnerType::*optionalAttribute>
-    void registerAttribute()
-    {
-        registerAttribute(SVGAnimatedOptionalIntegerAttributeAccessor<OwnerType>::template singleton<attributeName, identifier, attribute, optionalIdentifier, optionalAttribute>());
-    }
-
</del><span class="cx">     template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGAnimatedLengthAttribute OwnerType::*attribute>
</span><span class="cx">     void registerAttribute()
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGMemberAccessorhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGMemberAccessor.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGMemberAccessor.h                          (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGMemberAccessor.h     2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "QualifiedName.h"
+#include "SVGAttributeAnimator.h"
+
+namespace WebCore {
+
+class SVGAnimatedProperty;
+
+template<typename OwnerType>
+class SVGMemberAccessor {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    virtual ~SVGMemberAccessor() = default;
+
+    virtual void detach(const OwnerType&) const { }
+    virtual bool isAnimatedProperty() const { return false; }
+    virtual bool isAnimatedLength() const { return false; }
+
+    virtual bool matches(const OwnerType&, const SVGAnimatedProperty&) const { return false; }
+    virtual Optional<String> synchronize(const OwnerType&) const { return WTF::nullopt; }
+
+    virtual std::unique_ptr<SVGAttributeAnimator> createAnimator(OwnerType&, const QualifiedName&, AnimationMode, CalcMode, bool, bool) const { return nullptr; }
+    virtual void appendAnimatedInstance(OwnerType&, SVGAttributeAnimator&) const { }
+
+protected:
+    SVGMemberAccessor() = default;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGPointerMemberAccessorhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxyh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGPointerMemberAccessor.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGPointerMemberAccessor.h                           (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGPointerMemberAccessor.h      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGMemberAccessor.h"
+
+namespace WebCore {
+
+template<typename OwnerType, typename PropertyType>
+class SVGPointerMemberAccessor : public SVGMemberAccessor<OwnerType> {
+    using Base = SVGMemberAccessor<OwnerType>;
+
+public:
+    SVGPointerMemberAccessor(Ref<PropertyType> OwnerType::*property)
+        : m_property(property)
+    {
+    }
+
+    Ref<PropertyType>& property(OwnerType& owner) const { return owner.*m_property; }
+    const Ref<PropertyType>& property(const OwnerType& owner) const { return owner.*m_property; }
+
+    void detach(const OwnerType& owner) const override
+    {
+        property(owner)->detach();
+    }
+
+    Optional<String> synchronize(const OwnerType& owner) const override
+    {
+        return property(owner)->synchronize();
+    }
+
+protected:
+    template<typename AccessorType, Ref<PropertyType> OwnerType::*property>
+    static const SVGMemberAccessor<OwnerType>& singleton()
+    {
+        static NeverDestroyed<AccessorType> propertyAccessor { property };
+        return propertyAccessor;
+    }
+
+    Ref<PropertyType> OwnerType::*m_property;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGPropertyh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGProperty.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGProperty.h                                (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGProperty.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+/*
+ * Copyright (C) Research In Motion Limited 2010. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class SVGPropertyAccess : uint8_t { ReadWrite, ReadOnly };
+enum class SVGPropertyState : uint8_t { Clean, Dirty };
+
+} // namespace WebCore
+
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGPropertyOwnerhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGPropertyOwner.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGPropertyOwner.h                           (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGPropertyOwner.h      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+class SVGPropertyOwner {
+public:
+    virtual ~SVGPropertyOwner() = default;
+
+    virtual SVGPropertyOwner* owner() const { return nullptr; }
+    
+    virtual const SVGElement* attributeContextElement() const
+    {
+        if (!owner())
+            return nullptr;
+        return owner()->attributeContextElement();
+    }
+    
+    virtual void commitPropertyChange()
+    {
+        if (!owner())
+            return;
+        owner()->commitPropertyChange();
+    }
+    
+protected:
+    SVGPropertyOwner() = default;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGPropertyOwnerRegistryh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h                           (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h      2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,201 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAnimatedPropertyAccessorImpl.h"
+#include "SVGAnimatedPropertyPairAccessorImpl.h"
+#include "SVGPropertyRegistry.h"
+#include <wtf/HashMap.h>
+
+namespace WebCore {
+
+class SVGAttributeAnimator;
+
+template<typename OwnerType, typename... BaseTypes>
+class SVGPropertyOwnerRegistry : public SVGPropertyRegistry {
+public:
+    SVGPropertyOwnerRegistry(OwnerType& owner)
+        : m_owner(owner)
+    {
+    }
+
+    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedInteger> OwnerType::*property>
+    static void registerProperty()
+    {
+        registerProperty(attributeName, SVGAnimatedIntegerAccessor<OwnerType>::template singleton<property>());
+    }
+
+    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedInteger> OwnerType::*property1, Ref<SVGAnimatedInteger> OwnerType::*property2>
+    static void registerProperty()
+    {
+        registerProperty(attributeName, SVGAnimatedIntegerPairAccessor<OwnerType>::template singleton<property1, property2>());
+    }
+    // Enumerate all the SVGMemberAccessors recursively. The functor will be called and will
+    // be given the pair<QualifiedName, SVGMemberAccessor> till the functor returns false.
+    template<typename Functor>
+    static bool enumerateRecursively(const Functor& functor)
+    {
+        for (const auto& entry : attributeNameToAccessorMap()) {
+            if (!functor(entry))
+                return false;
+        }
+        return enumerateRecursivelyBaseTypes(functor);
+    }
+
+    // Returns true if OwnerType owns a property whose name is attributeName.
+    static bool isKnownAttribute(const QualifiedName& attributeName)
+    {
+        return findAccessor(attributeName);
+    }
+
+    QualifiedName animatedPropertyAttributeName(const SVGAnimatedProperty& animatedProperty) const override
+    {
+        QualifiedName attributeName = nullQName();
+        enumerateRecursively([&](const auto& entry) -> bool {
+            if (!entry.value->matches(m_owner, animatedProperty))
+                return true;
+            attributeName = entry.key;
+            return false;
+        });
+        return attributeName;
+    }
+
+    // Detach all the properties recursively from their OwnerTypes.
+    void detachAllProperties() const override
+    {
+        enumerateRecursively([&](const auto& entry) -> bool {
+            entry.value->detach(m_owner);
+            return true;
+        });
+    }
+
+    // Finds the property whose name is attributeName and returns the synchronize
+    // string through the associated SVGMemberAccessor.
+    Optional<String> synchronize(const QualifiedName& attributeName) const override
+    {
+        Optional<String> value;
+        enumerateRecursively([&](const auto& entry) -> bool {
+            if (!entry.key.matches(attributeName))
+                return true;
+            value = entry.value->synchronize(m_owner);
+            return false;
+        });
+        return value;
+    }
+
+    // Enumerate recursively the SVGMemberAccessors of the OwnerType and all its BaseTypes.
+    // Collect all the pairs <AttributeName, String> only for the dirty properties.
+    HashMap<QualifiedName, String> synchronizeAllAttributes() const override
+    {
+        HashMap<QualifiedName, String> map;
+        enumerateRecursively([&](const auto& entry) -> bool {
+            if (auto string = entry.value->synchronize(m_owner))
+                map.add(entry.key, *string);
+            return true;
+        });
+        return map;
+    }
+
+    bool isAnimatedPropertyAttribute(const QualifiedName& attributeName) const override
+    {
+        bool isAnimatedPropertyAttribute = false;
+        enumerateRecursively([&attributeName, &isAnimatedPropertyAttribute](const auto& entry) -> bool {
+            if (!entry.key.matches(attributeName))
+                return true;
+            isAnimatedPropertyAttribute = entry.value->isAnimatedProperty();
+            return false;
+        });
+        return isAnimatedPropertyAttribute;
+    }
+
+    std::unique_ptr<SVGAttributeAnimator> createAnimator(const QualifiedName& attributeName, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive) const override
+    {
+        std::unique_ptr<SVGAttributeAnimator> animator;
+        enumerateRecursively([&](const auto& entry) -> bool {
+            if (!entry.key.matches(attributeName))
+                return true;
+            animator = entry.value->createAnimator(m_owner, attributeName, animationMode, calcMode, isAccumulated, isAdditive);
+            return false;
+        });
+        return animator;
+    }
+
+    void appendAnimatedInstance(const QualifiedName& attributeName, SVGAttributeAnimator& animator) const override
+    {
+        enumerateRecursively([&](const auto& entry) -> bool {
+            if (!entry.key.matches(attributeName))
+                return true;
+            entry.value->appendAnimatedInstance(m_owner, animator);
+            return false;
+        });
+    }
+
+private:
+    // Singleton map for every OwnerType.
+    static HashMap<QualifiedName, const SVGMemberAccessor<OwnerType>*>& attributeNameToAccessorMap()
+    {
+        static NeverDestroyed<HashMap<QualifiedName, const SVGMemberAccessor<OwnerType>*>> attributeNameToAccessorMap;
+        return attributeNameToAccessorMap;
+    }
+
+    static void registerProperty(const QualifiedName& attributeName, const SVGMemberAccessor<OwnerType>& propertyAccessor)
+    {
+        attributeNameToAccessorMap().add(attributeName, &propertyAccessor);
+    }
+
+    // This is a template function with parameter 'I' whose default value = 0. So you can call it without any parameter
+    // from enumerateRecursively(). It returns true and is enable_if<I == sizeof...(BaseTypes)>. So it is mainly for
+    // breaking the recursion.
+    template<typename Functor, size_t I = 0>
+    static typename std::enable_if<I == sizeof...(BaseTypes), bool>::type enumerateRecursivelyBaseTypes(const Functor&) { return true; }
+
+    // This version of animatedTypesBaseTypes() is enable_if<I < sizeof...(BaseTypes)>.
+    template<typename Functor, size_t I = 0>
+    static typename std::enable_if<I < sizeof...(BaseTypes), bool>::type enumerateRecursivelyBaseTypes(const Functor& functor)
+    {
+        // Get the base type at index 'I' using std::tuple and std::tuple_element.
+        using BaseType = typename std::tuple_element<I, typename std::tuple<BaseTypes...>>::type;
+        if (!BaseType::PropertyRegistry::enumerateRecursively(functor))
+            return false;
+        // BaseType does not want to break the recursion. So recurse to the next BaseType.
+        return enumerateRecursivelyBaseTypes<Functor, I + 1>(functor);
+    }
+
+    static const SVGMemberAccessor<OwnerType>* findAccessor(const QualifiedName& attributeName)
+    {
+        // Here we need to loop through the entries in the map and use matches() to compare them with attributeName.
+        // m_map.contains() uses QualifiedName::operator==() which compares the impl pointers only while matches()
+        // compares the contents if the impl pointers differ.
+        auto it = std::find_if(attributeNameToAccessorMap().begin(), attributeNameToAccessorMap().end(), [&attributeName](const auto& entry) -> bool {
+            return entry.key.matches(attributeName);
+        });
+        return it != attributeNameToAccessorMap().end() ? it->value : nullptr;
+    }
+
+    OwnerType& m_owner;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoresvgpropertiesSVGPropertyRegistryhfromrev243035trunkSourceWebCoresvgpropertiesSVGAttributeOwnerProxycpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/svg/properties/SVGPropertyRegistry.h (from rev 243035, trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp) (0 => 243036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/properties/SVGPropertyRegistry.h                                (rev 0)
+++ trunk/Source/WebCore/svg/properties/SVGPropertyRegistry.h   2019-03-16 07:42:41 UTC (rev 243036)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2018-2019 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "SVGAttributeAnimator.h"
+
+namespace WebCore {
+
+class SVGAnimatedProperty;
+
+class SVGPropertyRegistry {
+public:
+    SVGPropertyRegistry() = default;
+    virtual ~SVGPropertyRegistry() = default;
+
+    virtual void detachAllProperties() const = 0;
+    virtual QualifiedName animatedPropertyAttributeName(const SVGAnimatedProperty&) const = 0;
+    virtual Optional<String> synchronize(const QualifiedName&) const = 0;
+    virtual HashMap<QualifiedName, String> synchronizeAllAttributes() const = 0;
+
+    virtual bool isAnimatedPropertyAttribute(const QualifiedName&) const = 0;
+    virtual std::unique_ptr<SVGAttributeAnimator> createAnimator(const QualifiedName&, AnimationMode, CalcMode, bool isAccumulated, bool isAdditive) const = 0;
+    virtual void appendAnimatedInstance(const QualifiedName& attributeName, SVGAttributeAnimator&) const = 0;
+};
+
+}
</ins></span></pre>
</div>
</div>

</body>
</html>