| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
| 27 #include "core/SVGNames.h" | 27 #include "core/SVGNames.h" |
| 28 #include "core/svg/SVGAnimatedTypeAnimator.h" | 28 #include "core/svg/SVGAnimatedTypeAnimator.h" |
| 29 #include "core/svg/SVGAnimationElement.h" | 29 #include "core/svg/SVGAnimationElement.h" |
| 30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
| 31 #include <base/gtest_prod_util.h> | 31 #include <base/gtest_prod_util.h> |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 // If we have 'inherit' as animation value, we need to grab the value |
| 36 // during the animation since the value can be animated itself. |
| 37 enum AnimatedPropertyValueType { RegularPropertyValue, InheritValue }; |
| 38 |
| 35 class CORE_EXPORT SVGAnimateElement : public SVGAnimationElement { | 39 class CORE_EXPORT SVGAnimateElement : public SVGAnimationElement { |
| 36 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
| 37 | 41 |
| 38 public: | 42 public: |
| 39 static SVGAnimateElement* create(Document&); | 43 static SVGAnimateElement* create(Document&); |
| 40 ~SVGAnimateElement() override; | 44 ~SVGAnimateElement() override; |
| 41 | 45 |
| 42 DECLARE_VIRTUAL_TRACE(); | 46 DECLARE_VIRTUAL_TRACE(); |
| 43 | 47 |
| 44 bool isSVGAnimationAttributeSettingJavaScriptURL( | 48 bool isSVGAnimationAttributeSettingJavaScriptURL( |
| (...skipping 26 matching lines...) Expand all Loading... |
| 71 void setAttributeName(const QualifiedName&) final; | 75 void setAttributeName(const QualifiedName&) final; |
| 72 | 76 |
| 73 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, | 77 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, |
| 74 stringsShouldNotSupportAddition); | 78 stringsShouldNotSupportAddition); |
| 75 | 79 |
| 76 private: | 80 private: |
| 77 void resetAnimatedPropertyType(); | 81 void resetAnimatedPropertyType(); |
| 78 | 82 |
| 79 bool hasValidAttributeType() override; | 83 bool hasValidAttributeType() override; |
| 80 | 84 |
| 85 SVGPropertyBase* adjustForInheritance(SVGPropertyBase*, |
| 86 AnimatedPropertyValueType) const; |
| 87 |
| 81 Member<SVGPropertyBase> m_fromProperty; | 88 Member<SVGPropertyBase> m_fromProperty; |
| 82 Member<SVGPropertyBase> m_toProperty; | 89 Member<SVGPropertyBase> m_toProperty; |
| 83 Member<SVGPropertyBase> m_toAtEndOfDurationProperty; | 90 Member<SVGPropertyBase> m_toAtEndOfDurationProperty; |
| 84 Member<SVGPropertyBase> m_animatedProperty; | 91 Member<SVGPropertyBase> m_animatedProperty; |
| 85 | 92 |
| 86 SVGAnimatedTypeAnimator m_animator; | 93 SVGAnimatedTypeAnimator m_animator; |
| 94 |
| 95 AnimatedPropertyValueType m_fromPropertyValueType; |
| 96 AnimatedPropertyValueType m_toPropertyValueType; |
| 87 }; | 97 }; |
| 88 | 98 |
| 89 inline bool isSVGAnimateElement(const SVGElement& element) { | 99 inline bool isSVGAnimateElement(const SVGElement& element) { |
| 90 return element.hasTagName(SVGNames::animateTag) || | 100 return element.hasTagName(SVGNames::animateTag) || |
| 91 element.hasTagName(SVGNames::animateTransformTag) || | 101 element.hasTagName(SVGNames::animateTransformTag) || |
| 92 element.hasTagName(SVGNames::setTag); | 102 element.hasTagName(SVGNames::setTag); |
| 93 } | 103 } |
| 94 | 104 |
| 95 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement); | 105 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement); |
| 96 | 106 |
| 97 } // namespace blink | 107 } // namespace blink |
| 98 | 108 |
| 99 #endif // SVGAnimateElement_h | 109 #endif // SVGAnimateElement_h |
| OLD | NEW |