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

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

Issue 25164005: Merge 158408 "Revert 157959 "Introduce a new reference graph to ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1650/
Patch Set: 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
===================================================================
--- Source/core/svg/properties/SVGAnimatedProperty.h (revision 158536)
+++ Source/core/svg/properties/SVGAnimatedProperty.h (working copy)
@@ -31,8 +31,7 @@
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 @@
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 @@
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 @@
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