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

Unified Diff: Source/core/svg/properties/SVGAnimatedPropertyMacros.h

Issue 177803003: [SVG] Make all C-macros used in the old property implementation NOOP. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: styles Created 6 years, 10 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 | « Source/core/svg/SVGViewElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/properties/SVGAnimatedPropertyMacros.h
diff --git a/Source/core/svg/properties/SVGAnimatedPropertyMacros.h b/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
index b0116e12a99ff2a523b09dea126c41b65520b64d..4999246a0387347d7f61e7aabb7021b9db09d50f 100644
--- a/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
+++ b/Source/core/svg/properties/SVGAnimatedPropertyMacros.h
@@ -30,93 +30,16 @@
namespace WebCore {
-// SVGSynchronizableAnimatedProperty implementation
-template<typename PropertyType>
-struct SVGSynchronizableAnimatedProperty {
- SVGSynchronizableAnimatedProperty()
- : value(SVGPropertyTraits<PropertyType>::initialValue())
- , shouldSynchronize(false)
- {
- }
-
- template<typename ConstructorParameter1>
- SVGSynchronizableAnimatedProperty(const ConstructorParameter1& value1)
- : value(value1)
- , shouldSynchronize(false)
- {
- }
-
- template<typename ConstructorParameter1, typename ConstructorParameter2>
- SVGSynchronizableAnimatedProperty(const ConstructorParameter1& value1, const ConstructorParameter2& value2)
- : value(value1, value2)
- , shouldSynchronize(false)
- {
- }
-
- void synchronize(Element* ownerElement, const QualifiedName& attrName, const AtomicString& value)
- {
- ownerElement->setSynchronizedLazyAttribute(attrName, value);
- }
-
- PropertyType value;
- bool shouldSynchronize : 1;
-};
-
// Property registration helpers
-#define BEGIN_REGISTER_ANIMATED_PROPERTIES(OwnerType) \
-SVGAttributeToPropertyMap& OwnerType::attributeToPropertyMap() \
-{ \
- DEFINE_STATIC_LOCAL(SVGAttributeToPropertyMap, s_attributeToPropertyMap, ()); \
- return s_attributeToPropertyMap; \
-} \
-\
-SVGAttributeToPropertyMap& OwnerType::localAttributeToPropertyMap() const \
-{ \
- return attributeToPropertyMap(); \
-} \
-\
-void OwnerType::registerAnimatedPropertiesFor##OwnerType() \
-{ \
- OwnerType::m_cleanupAnimatedPropertiesCaller.setOwner(this); \
- SVGAttributeToPropertyMap& map = OwnerType::attributeToPropertyMap(); \
- if (!map.isEmpty()) \
- return; \
- typedef OwnerType UseOwnerType;
-
-#define REGISTER_LOCAL_ANIMATED_PROPERTY(LowerProperty) \
- map.addProperty(UseOwnerType::LowerProperty##PropertyInfo());
-
-#define REGISTER_PARENT_ANIMATED_PROPERTIES(ClassName) \
- map.addProperties(ClassName::attributeToPropertyMap()); \
-
-#define END_REGISTER_ANIMATED_PROPERTIES }
+#define BEGIN_REGISTER_ANIMATED_PROPERTIES(OwnerType)
+#define REGISTER_LOCAL_ANIMATED_PROPERTY(LowerProperty)
+#define REGISTER_PARENT_ANIMATED_PROPERTIES(ClassName)
+#define END_REGISTER_ANIMATED_PROPERTIES
// Property declaration helpers (used in SVG*.h files)
-#define BEGIN_DECLARE_ANIMATED_PROPERTIES(OwnerType) \
-public: \
- static SVGAttributeToPropertyMap& attributeToPropertyMap(); \
- virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap() const; \
- void registerAnimatedPropertiesFor##OwnerType(); \
- typedef OwnerType UseOwnerType;
-
-#define DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerProperty) \
-public: \
- static const SVGPropertyInfo* LowerProperty##PropertyInfo(); \
- bool LowerProperty##Specified() const; \
- PropertyType& LowerProperty##CurrentValue() const; \
- PropertyType& LowerProperty##BaseValue() const; \
- void set##UpperProperty##BaseValue(const PropertyType& type); \
- PassRefPtr<TearOffType> LowerProperty(); \
-\
-private: \
- void synchronize##UpperProperty(); \
- static PassRefPtr<SVGAnimatedProperty> lookupOrCreate##UpperProperty##Wrapper(SVGElement* maskedOwnerType); \
- static void synchronize##UpperProperty(SVGElement* maskedOwnerType); \
-\
- mutable SVGSynchronizableAnimatedProperty<PropertyType> m_##LowerProperty;
-
-#define END_DECLARE_ANIMATED_PROPERTIES \
- CleanUpAnimatedPropertiesCaller m_cleanupAnimatedPropertiesCaller;
+#define BEGIN_DECLARE_ANIMATED_PROPERTIES(OwnerType)
+#define DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerProperty)
+#define END_DECLARE_ANIMATED_PROPERTIES
}
« no previous file with comments | « Source/core/svg/SVGViewElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698