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

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

Issue 1212253012: Fix virtual/override/final usage in Source/core/svg/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
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 #include <base/gtest_prod_util.h> 32 #include <base/gtest_prod_util.h>
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class SVGAnimatedTypeAnimator; 36 class SVGAnimatedTypeAnimator;
37 37
38 class CORE_EXPORT SVGAnimateElement : public SVGAnimationElement { 38 class CORE_EXPORT SVGAnimateElement : public SVGAnimationElement {
39 DEFINE_WRAPPERTYPEINFO(); 39 DEFINE_WRAPPERTYPEINFO();
40 public: 40 public:
41 static PassRefPtrWillBeRawPtr<SVGAnimateElement> create(Document&); 41 static PassRefPtrWillBeRawPtr<SVGAnimateElement> create(Document&);
42 virtual ~SVGAnimateElement(); 42 ~SVGAnimateElement() override;
43 43
44 DECLARE_VIRTUAL_TRACE(); 44 DECLARE_VIRTUAL_TRACE();
45 45
46 virtual bool isSVGAnimationAttributeSettingJavaScriptURL(const Attribute&) c onst override; 46 bool isSVGAnimationAttributeSettingJavaScriptURL(const Attribute&) const ove rride;
47 47
48 AnimatedPropertyType animatedPropertyType(); 48 AnimatedPropertyType animatedPropertyType();
49 bool animatedPropertyTypeSupportsAddition(); 49 bool animatedPropertyTypeSupportsAddition();
50 50
51 static SVGElementInstances findElementInstances(SVGElement* targetElement); 51 static SVGElementInstances findElementInstances(SVGElement* targetElement);
52 52
53 protected: 53 protected:
54 SVGAnimateElement(const QualifiedName&, Document&); 54 SVGAnimateElement(const QualifiedName&, Document&);
55 55
56 virtual void resetAnimatedType() override final; 56 void resetAnimatedType() final;
57 virtual void clearAnimatedType() override final; 57 void clearAnimatedType() final;
58 58
59 virtual bool calculateToAtEndOfDurationValue(const String& toAtEndOfDuration String) override final; 59 bool calculateToAtEndOfDurationValue(const String& toAtEndOfDurationString) final;
60 virtual bool calculateFromAndToValues(const String& fromString, const String & toString) override final; 60 bool calculateFromAndToValues(const String& fromString, const String& toStri ng) final;
61 virtual bool calculateFromAndByValues(const String& fromString, const String & byString) override final; 61 bool calculateFromAndByValues(const String& fromString, const String& byStri ng) final;
62 virtual void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILElement* resultElement) override final; 62 void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGSMILE lement* resultElement) final;
63 virtual void applyResultsToTarget() override final; 63 void applyResultsToTarget() final;
64 virtual float calculateDistance(const String& fromString, const String& toSt ring) override final; 64 float calculateDistance(const String& fromString, const String& toString) fi nal;
65 virtual bool isAdditive() override final; 65 bool isAdditive() final;
66 66
67 virtual void setTargetElement(SVGElement*) override final; 67 void setTargetElement(SVGElement*) final;
68 virtual void setAttributeName(const QualifiedName&) override final; 68 void setAttributeName(const QualifiedName&) final;
69 69
70 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, stringsShouldNo tSupportAddition); 70 FRIEND_TEST_ALL_PREFIXES(UnsafeSVGAttributeSanitizationTest, stringsShouldNo tSupportAddition);
71 71
72 private: 72 private:
73 void resetAnimatedPropertyType(); 73 void resetAnimatedPropertyType();
74 74
75 virtual bool hasValidAttributeType() override; 75 bool hasValidAttributeType() override;
76 76
77 RefPtrWillBeMember<SVGPropertyBase> m_fromProperty; 77 RefPtrWillBeMember<SVGPropertyBase> m_fromProperty;
78 RefPtrWillBeMember<SVGPropertyBase> m_toProperty; 78 RefPtrWillBeMember<SVGPropertyBase> m_toProperty;
79 RefPtrWillBeMember<SVGPropertyBase> m_toAtEndOfDurationProperty; 79 RefPtrWillBeMember<SVGPropertyBase> m_toAtEndOfDurationProperty;
80 RefPtrWillBeMember<SVGPropertyBase> m_animatedProperty; 80 RefPtrWillBeMember<SVGPropertyBase> m_animatedProperty;
81 81
82 SVGAnimatedTypeAnimator m_animator; 82 SVGAnimatedTypeAnimator m_animator;
83 }; 83 };
84 84
85 inline bool isSVGAnimateElement(const SVGElement& element) 85 inline bool isSVGAnimateElement(const SVGElement& element)
86 { 86 {
87 return element.hasTagName(SVGNames::animateTag) 87 return element.hasTagName(SVGNames::animateTag)
88 || element.hasTagName(SVGNames::animateTransformTag) 88 || element.hasTagName(SVGNames::animateTransformTag)
89 || element.hasTagName(SVGNames::setTag); 89 || element.hasTagName(SVGNames::setTag);
90 } 90 }
91 91
92 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement); 92 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGAnimateElement);
93 93
94 } // namespace blink 94 } // namespace blink
95 95
96 #endif // SVGAnimateElement_h 96 #endif // SVGAnimateElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698