Index: third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h |
diff --git a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h |
index 00326e27106821512503e97f0f5969f89ad559f2..4fe552ffe8ff0568de7e23dcc601b9e18f442b3c 100644 |
--- a/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h |
+++ b/third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h |
@@ -326,6 +326,30 @@ private: |
RefPtrWillBeMember<TearOffType> m_animValTearOff; |
}; |
+// Implementation of SVGAnimatedProperty which doesn't use tear-off value types. |
+// This class has "void" for its TearOffType. |
+// Currently only used for SVGAnimatedPath. |
+template <typename Property> |
+class SVGAnimatedProperty<Property, void, void> : public SVGAnimatedPropertyCommon<Property> { |
+public: |
+ static PassRefPtrWillBeRawPtr<SVGAnimatedProperty<Property>> create(SVGElement* contextElement, const QualifiedName& attributeName, PassRefPtrWillBeRawPtr<Property> initialValue) |
+ { |
+ return adoptRefWillBeNoop(new SVGAnimatedProperty<Property>(contextElement, attributeName, initialValue)); |
+ } |
+ |
+ bool needsSynchronizeAttribute() override |
+ { |
+ // DOM attribute synchronization is only needed if the property is being animated. |
+ return this->isAnimating(); |
+ } |
+ |
+protected: |
+ SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, PassRefPtrWillBeRawPtr<Property> initialValue) |
+ : SVGAnimatedPropertyCommon<Property>(contextElement, attributeName, initialValue) |
+ { |
+ } |
+}; |
+ |
} // namespace blink |
#endif // SVGAnimatedProperty_h |