Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h

Issue 1416273002: Remove SVGPathElement.pathSegList and related interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698