Merge from Chromium at DEPS revision 260458
This commit was generated by merge_to_master.py.
Change-Id: I01166d4072567f174b02707d7a0850cb3fe1fd8a
diff --git a/Source/core/svg/SVGAnimationElement.h b/Source/core/svg/SVGAnimationElement.h
index 2749778..ef5d2b2 100644
--- a/Source/core/svg/SVGAnimationElement.h
+++ b/Source/core/svg/SVGAnimationElement.h
@@ -74,6 +74,10 @@
void endElement();
void endElementAt(float offset);
+ DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(begin, beginEvent);
+ DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(end, endEvent);
+ DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(repeat, repeatEvent);
+
static bool isTargetAttributeCSSProperty(SVGElement*, const QualifiedName&);
virtual bool isAdditive() const;
@@ -92,15 +96,6 @@
AnimatedPropertyValueType fromPropertyValueType() const { return m_fromPropertyValueType; }
AnimatedPropertyValueType toPropertyValueType() const { return m_toPropertyValueType; }
- // FIXME: In C++11, remove this as we can use default template argument.
- template<typename AnimatedType>
- void adjustForInheritance(AnimatedType (*parseTypeFromString)(SVGAnimationElement*, const String&),
- AnimatedPropertyValueType valueType, AnimatedType& animatedType, SVGElement* contextElement)
- {
- ASSERT(parseTypeFromString);
- adjustForInheritance<AnimatedType, AnimatedType (*)(SVGAnimationElement*, const String&)>(parseTypeFromString, valueType, animatedType, contextElement);
- }
-
template<typename AnimatedType, typename ParseTypeFromStringType>
void adjustForInheritance(ParseTypeFromStringType parseTypeFromString, AnimatedPropertyValueType valueType, AnimatedType& animatedType, SVGElement* contextElement)
{
@@ -113,33 +108,6 @@
}
template<typename AnimatedType>
- bool adjustFromToListValues(const AnimatedType& fromList, const AnimatedType& toList, AnimatedType& animatedList, float percentage, bool resizeAnimatedListIfNeeded = true)
- {
- // If no 'to' value is given, nothing to animate.
- unsigned toListSize = toList.size();
- if (!toListSize)
- return false;
-
- // If the 'from' value is given and it's length doesn't match the 'to' value list length, fallback to a discrete animation.
- unsigned fromListSize = fromList.size();
- if (fromListSize != toListSize && fromListSize) {
- if (percentage < 0.5) {
- if (animationMode() != ToAnimation)
- animatedList = AnimatedType(fromList);
- } else
- animatedList = AnimatedType(toList);
-
- return false;
- }
-
- ASSERT(!fromListSize || fromListSize == toListSize);
- if (resizeAnimatedListIfNeeded && animatedList.size() < toListSize)
- animatedList.resize(toListSize);
-
- return true;
- }
-
- template<typename AnimatedType>
void animateDiscreteType(float percentage, const AnimatedType& fromType, const AnimatedType& toType, AnimatedType& animatedType)
{
if ((animationMode() == FromToAnimation && percentage > 0.5) || animationMode() == ToAnimation || percentage == 1) {