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

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

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.cpp
===================================================================
--- Source/core/svg/properties/SVGAnimatedProperty.cpp (revision 158536)
+++ Source/core/svg/properties/SVGAnimatedProperty.cpp (working copy)
@@ -36,37 +36,18 @@
SVGAnimatedProperty::~SVGAnimatedProperty()
{
- // Assure that animationEnded() was called, if animationStarted() was called before.
- ASSERT(!m_isAnimating);
-}
-
-void SVGAnimatedProperty::detachAnimatedPropertiesWrappersForElement(SVGElement* element)
-{
+ // Remove wrapper from cache.
Cache* cache = animatedPropertyCache();
const Cache::const_iterator end = cache->end();
for (Cache::const_iterator it = cache->begin(); it != end; ++it) {
- if (it->key.m_element == element)
- it->value->detachWrappers();
- }
-}
-
-void SVGAnimatedProperty::detachAnimatedPropertiesForElement(SVGElement* element)
-{
- // Remove wrappers from cache.
- Cache* cache = animatedPropertyCache();
-
- Vector<SVGAnimatedPropertyDescription> keysToRemove;
-
- const Cache::const_iterator end = cache->end();
- for (Cache::const_iterator it = cache->begin(); it != end; ++it) {
- if (it->key.m_element == element) {
- it->value->resetContextElement();
- keysToRemove.append(it->key);
+ if (it->value == this) {
+ cache->remove(it->key);
+ break;
}
}
- for (Vector<SVGAnimatedPropertyDescription>::const_iterator it = keysToRemove.begin(); it != keysToRemove.end(); ++it)
- cache->remove(*it);
+ // Assure that animationEnded() was called, if animationStarted() was called before.
+ ASSERT(!m_isAnimating);
}
void SVGAnimatedProperty::commitChange()
« no previous file with comments | « Source/core/svg/properties/SVGAnimatedProperty.h ('k') | Source/core/svg/properties/SVGListPropertyTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698