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

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

Issue 18707002: Reduce number of header includes in SVG (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Attempt to fix bots Created 7 years, 5 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 39c956eb5afc4768731bb4e477e1836900ac817f..25d716b136efb375a10ac77f455f180995e68501 100644
--- a/Source/core/svg/properties/SVGAnimatedProperty.h
+++ b/Source/core/svg/properties/SVGAnimatedProperty.h
@@ -20,7 +20,6 @@
#ifndef SVGAnimatedProperty_h
#define SVGAnimatedProperty_h
-#include "core/svg/SVGElement.h"
#include "core/svg/properties/SVGAnimatedPropertyDescription.h"
#include "core/svg/properties/SVGPropertyInfo.h"
#include <wtf/RefCounted.h>
@@ -38,34 +37,14 @@ public:
bool isReadOnly() const { return m_isReadOnly; }
void setIsReadOnly() { m_isReadOnly = true; }
- void commitChange()
- {
- ASSERT(m_contextElement);
- ASSERT(!m_contextElement->m_deletionHasBegun);
- m_contextElement->invalidateSVGAttributes();
- m_contextElement->svgAttributeChanged(m_attributeName);
- }
+ void commitChange();
virtual bool isAnimatedListTearOff() const { return false; }
// Caching facilities.
typedef HashMap<SVGAnimatedPropertyDescription, SVGAnimatedProperty*, SVGAnimatedPropertyDescriptionHash, SVGAnimatedPropertyDescriptionHashTraits> Cache;
- virtual ~SVGAnimatedProperty()
- {
- // 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->value == this) {
- cache->remove(it->key);
- break;
- }
- }
-
- // Assure that animationEnded() was called, if animationStarted() was called before.
- ASSERT(!m_isAnimating);
- }
+ virtual ~SVGAnimatedProperty();
template<typename OwnerType, typename TearOffType, typename PropertyType>
static PassRefPtr<TearOffType> lookupOrCreateWrapper(OwnerType* element, const SVGPropertyInfo* info, PropertyType& property)
@@ -97,21 +76,10 @@ public:
}
protected:
- SVGAnimatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, AnimatedPropertyType animatedPropertyType)
- : m_contextElement(contextElement)
- , m_attributeName(attributeName)
- , m_animatedPropertyType(animatedPropertyType)
- , m_isAnimating(false)
- , m_isReadOnly(false)
- {
- }
+ SVGAnimatedProperty(SVGElement*, const QualifiedName&, AnimatedPropertyType);
private:
- static Cache* animatedPropertyCache()
- {
- static Cache* s_cache = new Cache;
- return s_cache;
- }
+ static Cache* animatedPropertyCache();
RefPtr<SVGElement> m_contextElement;
const QualifiedName& m_attributeName;

Powered by Google App Engine
This is Rietveld 408576698