diff options
Diffstat (limited to 'Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h')
-rw-r--r-- | Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h b/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h index 0ba24254e..94768056a 100644 --- a/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h +++ b/Source/WebCore/svg/properties/SVGAttributeToPropertyMap.h @@ -1,5 +1,6 @@ /* * Copyright (C) Research In Motion Limited 2011. All rights reserved. + * Copyright (C) 2015 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -17,10 +18,8 @@ * Boston, MA 02110-1301, USA. */ -#ifndef SVGAttributeToPropertyMap_h -#define SVGAttributeToPropertyMap_h +#pragma once -#if ENABLE(SVG) #include "SVGPropertyInfo.h" #include <wtf/HashMap.h> @@ -33,27 +32,18 @@ class SVGAttributeToPropertyMap { public: bool isEmpty() const { return m_map.isEmpty(); } + void addProperty(const SVGPropertyInfo&); void addProperties(const SVGAttributeToPropertyMap&); - void addProperty(const SVGPropertyInfo*); - // FIXME: To match WebKit coding style either these functions should have return values instead of out parameters, - // or the word "get" should be added as a prefix to their names. - void animatedPropertiesForAttribute(SVGElement* contextElement, const QualifiedName& attributeName, Vector<RefPtr<SVGAnimatedProperty>>&); - void animatedPropertyTypeForAttribute(const QualifiedName& attributeName, Vector<AnimatedPropertyType>&); + Vector<RefPtr<SVGAnimatedProperty>> properties(SVGElement&, const QualifiedName& attributeName) const; + Vector<AnimatedPropertyType> types(const QualifiedName& attributeName) const; - void synchronizeProperties(SVGElement* contextElement); - bool synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName); + void synchronizeProperties(SVGElement&) const; + bool synchronizeProperty(SVGElement&, const QualifiedName& attributeName) const; private: - void synchronizeProperty(SVGElement* contextElement, const QualifiedName& attributeName, const SVGPropertyInfo*); - PassRefPtr<SVGAnimatedProperty> animatedProperty(SVGElement* contextElement, const QualifiedName& attributeName, const SVGPropertyInfo*); - - typedef Vector<const SVGPropertyInfo*> PropertiesVector; - typedef HashMap<QualifiedName, std::unique_ptr<PropertiesVector>> AttributeToPropertiesMap; - AttributeToPropertiesMap m_map; + typedef Vector<const SVGPropertyInfo*> PropertyInfoVector; + HashMap<QualifiedName, PropertyInfoVector> m_map; }; -} - -#endif -#endif +} // namespace WebCore |