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

Side by Side Diff: Source/core/svg/SVGAnimateElement.h

Issue 303093002: SVG: remove |SVGAnimateElement::m_animatedPropertyType| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/<animatedTransform>/<animateTransform> Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 32
33 class SVGAnimatedTypeAnimator; 33 class SVGAnimatedTypeAnimator;
34 34
35 class SVGAnimateElement : public SVGAnimationElement { 35 class SVGAnimateElement : public SVGAnimationElement {
36 public: 36 public:
37 static PassRefPtrWillBeRawPtr<SVGAnimateElement> create(Document&); 37 static PassRefPtrWillBeRawPtr<SVGAnimateElement> create(Document&);
38 virtual ~SVGAnimateElement(); 38 virtual ~SVGAnimateElement();
39 39
40 virtual void trace(Visitor*) OVERRIDE; 40 virtual void trace(Visitor*) OVERRIDE;
41 41
42 AnimatedPropertyType animatedPropertyType();
43 bool animatedPropertyTypeSupportsAddition();
44
42 protected: 45 protected:
43 SVGAnimateElement(const QualifiedName&, Document&); 46 SVGAnimateElement(const QualifiedName&, Document&);
44 47
45 virtual void resetAnimatedType() OVERRIDE FINAL; 48 virtual void resetAnimatedType() OVERRIDE FINAL;
46 virtual void clearAnimatedType(SVGElement* targetElement) OVERRIDE FINAL; 49 virtual void clearAnimatedType(SVGElement* targetElement) OVERRIDE FINAL;
47 50
48 virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDuration String) OVERRIDE FINAL; 51 virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDuration String) OVERRIDE FINAL;
49 virtual bool calculateFromAndToValues(const String& fromString, const String & toString) OVERRIDE FINAL; 52 virtual bool calculateFromAndToValues(const String& fromString, const String & toString) OVERRIDE FINAL;
50 virtual bool calculateFromAndByValues(const String& fromString, const String & byString) OVERRIDE FINAL; 53 virtual bool calculateFromAndByValues(const String& fromString, const String & byString) OVERRIDE FINAL;
51 virtual void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) OVERRIDE FINAL; 54 virtual void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) OVERRIDE FINAL;
52 virtual void applyResultsToTarget() OVERRIDE FINAL; 55 virtual void applyResultsToTarget() OVERRIDE FINAL;
53 virtual float calculateDistance(const String& fromString, const String& toSt ring) OVERRIDE FINAL; 56 virtual float calculateDistance(const String& fromString, const String& toSt ring) OVERRIDE FINAL;
54 virtual bool isAdditive() const OVERRIDE FINAL; 57 virtual bool isAdditive() OVERRIDE FINAL;
55 58
56 virtual void setTargetElement(SVGElement*) OVERRIDE FINAL; 59 virtual void setTargetElement(SVGElement*) OVERRIDE FINAL;
57 virtual void setAttributeName(const QualifiedName&) OVERRIDE FINAL; 60 virtual void setAttributeName(const QualifiedName&) OVERRIDE FINAL;
58 61
59 AnimatedPropertyType m_animatedPropertyType;
60
61 private: 62 private:
62 void resetAnimatedPropertyType(); 63 void resetAnimatedPropertyType();
63 SVGAnimatedTypeAnimator* ensureAnimator(); 64 SVGAnimatedTypeAnimator* ensureAnimator();
64 bool animatedPropertyTypeSupportsAddition() const;
65 65
66 virtual bool hasValidAttributeType() OVERRIDE; 66 virtual bool hasValidAttributeType() OVERRIDE;
67 67
68 RefPtr<SVGPropertyBase> m_fromProperty; 68 RefPtr<SVGPropertyBase> m_fromProperty;
69 RefPtr<SVGPropertyBase> m_toProperty; 69 RefPtr<SVGPropertyBase> m_toProperty;
70 RefPtr<SVGPropertyBase> m_toAtEndOfDurationProperty; 70 RefPtr<SVGPropertyBase> m_toAtEndOfDurationProperty;
71 RefPtr<SVGPropertyBase> m_animatedProperty; 71 RefPtr<SVGPropertyBase> m_animatedProperty;
72 72
73 OwnPtrWillBeMember<SVGAnimatedTypeAnimator> m_animator; 73 OwnPtrWillBeMember<SVGAnimatedTypeAnimator> m_animator;
74 }; 74 };
75 75
76 inline bool isSVGAnimateElement(const Node& node) 76 inline bool isSVGAnimateElement(const Node& node)
77 { 77 {
78 return node.hasTagName(SVGNames::animateTag) 78 return node.hasTagName(SVGNames::animateTag)
79 || node.hasTagName(SVGNames::animateTransformTag) 79 || node.hasTagName(SVGNames::animateTransformTag)
80 || node.hasTagName(SVGNames::setTag); 80 || node.hasTagName(SVGNames::setTag);
81 } 81 }
82 82
83 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement); 83 DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement);
84 84
85 } // namespace WebCore 85 } // namespace WebCore
86 86
87 #endif // SVGAnimateElement_h 87 #endif // SVGAnimateElement_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimateElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698