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

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

Issue 180243018: Remove SVGAnimatedProperty::animatedPropertyCache (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/SVGElement.cpp ('k') | Source/core/svg/properties/SVGAnimatedProperty.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/properties/SVGAnimatedProperty.h
diff --git a/Source/core/svg/properties/SVGAnimatedProperty.h b/Source/core/svg/properties/SVGAnimatedProperty.h
index eb0ba54e4bf52660f61584a52b6801aa83238c7a..ec05455a13c40c16e117bf821dcdc3bd11e7a693 100644
--- a/Source/core/svg/properties/SVGAnimatedProperty.h
+++ b/Source/core/svg/properties/SVGAnimatedProperty.h
@@ -48,43 +48,10 @@ public:
virtual ~SVGAnimatedProperty();
- template<typename OwnerType, typename TearOffType, typename PropertyType>
- static PassRefPtr<TearOffType> lookupOrCreateWrapper(OwnerType* element, const SVGPropertyInfo* info, PropertyType& property)
- {
- ASSERT(info);
- SVGAnimatedPropertyDescription key(element, info->propertyIdentifier);
- RefPtr<SVGAnimatedProperty> wrapper = animatedPropertyCache()->get(key);
- if (!wrapper) {
- wrapper = TearOffType::create(element, info->attributeName, info->animatedPropertyType, property);
- if (info->animatedPropertyState == PropertyIsReadOnly)
- wrapper->setIsReadOnly();
- animatedPropertyCache()->set(key, wrapper);
- }
- return static_pointer_cast<TearOffType>(wrapper);
- }
-
- template<typename OwnerType, typename TearOffType>
- static TearOffType* lookupWrapper(OwnerType* element, const SVGPropertyInfo* info)
- {
- ASSERT(info);
- SVGAnimatedPropertyDescription key(element, info->propertyIdentifier);
- return static_cast<TearOffType*>(animatedPropertyCache()->get(key));
- }
-
- template<typename OwnerType, typename TearOffType>
- static TearOffType* lookupWrapper(const OwnerType* element, const SVGPropertyInfo* info)
- {
- return lookupWrapper<OwnerType, TearOffType>(const_cast<OwnerType*>(element), info);
- }
-
- static void detachAnimatedPropertiesForElement(SVGElement*);
-
protected:
SVGAnimatedProperty(SVGElement*, const QualifiedName&, AnimatedPropertyType);
private:
- static Cache* animatedPropertyCache();
-
SVGElement* m_contextElement;
const QualifiedName& m_attributeName;
AnimatedPropertyType m_animatedPropertyType;
« no previous file with comments | « Source/core/svg/SVGElement.cpp ('k') | Source/core/svg/properties/SVGAnimatedProperty.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698