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

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

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.cpp
diff --git a/Source/core/svg/properties/SVGAnimatedProperty.cpp b/Source/core/svg/properties/SVGAnimatedProperty.cpp
index 0922ac9872f36ec444cd6192b5c73f991d93da1a..e15971cd355a8b18714a6511f1c78ec8916d35f2 100644
--- a/Source/core/svg/properties/SVGAnimatedProperty.cpp
+++ b/Source/core/svg/properties/SVGAnimatedProperty.cpp
@@ -36,37 +36,18 @@ SVGAnimatedProperty::SVGAnimatedProperty(SVGElement* contextElement, const Quali
SVGAnimatedProperty::~SVGAnimatedProperty()
{
- // Assure that animationEnded() was called, if animationStarted() was called before.
- ASSERT(!m_isAnimating);
-}
-
-void SVGAnimatedProperty::detachAnimatedPropertiesWrappersForElement(SVGElement* element)
-{
- 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.
+ // Remove wrapper 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