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

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

Issue 24863002: Revert 157959 "Introduce a new reference graph to SVG*TearOffs." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 3 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
Index: Source/core/svg/properties/SVGAnimatedProperty.h
diff --git a/Source/core/svg/properties/SVGAnimatedProperty.h b/Source/core/svg/properties/SVGAnimatedProperty.h
index acf0e7459887a8a8e515c31df5c20abc72ae1064..37eba881a58ccb18d209a54d6196d2ec65105730 100644
--- a/Source/core/svg/properties/SVGAnimatedProperty.h
+++ b/Source/core/svg/properties/SVGAnimatedProperty.h
@@ -31,8 +31,7 @@ class SVGElement;
class SVGAnimatedProperty : public RefCounted<SVGAnimatedProperty> {
public:
- SVGElement* contextElement() const { return m_contextElement; }
- void resetContextElement() { m_contextElement = 0; }
+ SVGElement* contextElement() const { return m_contextElement.get(); }
const QualifiedName& attributeName() const { return m_attributeName; }
AnimatedPropertyType animatedPropertyType() const { return m_animatedPropertyType; }
bool isAnimating() const { return m_isAnimating; }
@@ -42,10 +41,9 @@ public:
void commitChange();
virtual bool isAnimatedListTearOff() const { return false; }
- virtual void detachWrappers() { }
// Caching facilities.
- typedef HashMap<SVGAnimatedPropertyDescription, RefPtr<SVGAnimatedProperty>, SVGAnimatedPropertyDescriptionHash, SVGAnimatedPropertyDescriptionHashTraits> Cache;
+ typedef HashMap<SVGAnimatedPropertyDescription, SVGAnimatedProperty*, SVGAnimatedPropertyDescriptionHash, SVGAnimatedPropertyDescriptionHashTraits> Cache;
virtual ~SVGAnimatedProperty();
@@ -59,7 +57,7 @@ public:
wrapper = TearOffType::create(element, info->attributeName, info->animatedPropertyType, property);
if (info->animatedPropertyState == PropertyIsReadOnly)
wrapper->setIsReadOnly();
- animatedPropertyCache()->set(key, wrapper);
+ animatedPropertyCache()->set(key, wrapper.get());
}
return static_pointer_cast<TearOffType>(wrapper);
}
@@ -78,16 +76,13 @@ public:
return lookupWrapper<OwnerType, TearOffType>(const_cast<OwnerType*>(element), info);
}
- static void detachAnimatedPropertiesWrappersForElement(SVGElement*);
- static void detachAnimatedPropertiesForElement(SVGElement*);
-
protected:
SVGAnimatedProperty(SVGElement*, const QualifiedName&, AnimatedPropertyType);
private:
static Cache* animatedPropertyCache();
- SVGElement* m_contextElement;
+ RefPtr<SVGElement> m_contextElement;
const QualifiedName& m_attributeName;
AnimatedPropertyType m_animatedPropertyType;
« no previous file with comments | « Source/core/svg/properties/SVGAnimatedListPropertyTearOff.h ('k') | Source/core/svg/properties/SVGAnimatedProperty.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698