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

Side by Side Diff: Source/core/svg/SVGAngle.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, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 29 matching lines...) Expand all
40 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGMarkerOr ientType>(); 40 template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGMarkerOr ientType>();
41 template<> unsigned short getMaxExposedEnumValue<SVGMarkerOrientType>(); 41 template<> unsigned short getMaxExposedEnumValue<SVGMarkerOrientType>();
42 42
43 class SVGMarkerOrientEnumeration : public SVGEnumeration<SVGMarkerOrientType> { 43 class SVGMarkerOrientEnumeration : public SVGEnumeration<SVGMarkerOrientType> {
44 public: 44 public:
45 static PassRefPtrWillBeRawPtr<SVGMarkerOrientEnumeration> create(SVGAngle* a ngle) 45 static PassRefPtrWillBeRawPtr<SVGMarkerOrientEnumeration> create(SVGAngle* a ngle)
46 { 46 {
47 return adoptRefWillBeNoop(new SVGMarkerOrientEnumeration(angle)); 47 return adoptRefWillBeNoop(new SVGMarkerOrientEnumeration(angle));
48 } 48 }
49 49
50 virtual ~SVGMarkerOrientEnumeration(); 50 ~SVGMarkerOrientEnumeration() override;
51 51
52 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr ide; 52 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
53 virtual void calculateAnimatedValue(SVGAnimationElement*, float, unsigned, P assRefPtrWillBeRawPtr<SVGPropertyBase>, PassRefPtrWillBeRawPtr<SVGPropertyBase>, PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; 53 void calculateAnimatedValue(SVGAnimationElement*, float, unsigned, PassRefPt rWillBeRawPtr<SVGPropertyBase>, PassRefPtrWillBeRawPtr<SVGPropertyBase>, PassRef PtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
54 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVG Element*) override; 54 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement* ) override;
55 55
56 DECLARE_VIRTUAL_TRACE(); 56 DECLARE_VIRTUAL_TRACE();
57 57
58 private: 58 private:
59 SVGMarkerOrientEnumeration(SVGAngle*); 59 SVGMarkerOrientEnumeration(SVGAngle*);
60 60
61 virtual void notifyChange() override; 61 void notifyChange() override;
62 62
63 RawPtrWillBeMember<SVGAngle> m_angle; 63 RawPtrWillBeMember<SVGAngle> m_angle;
64 }; 64 };
65 65
66 class SVGAngle : public SVGPropertyHelper<SVGAngle> { 66 class SVGAngle : public SVGPropertyHelper<SVGAngle> {
67 public: 67 public:
68 typedef SVGAngleTearOff TearOffType; 68 typedef SVGAngleTearOff TearOffType;
69 69
70 enum SVGAngleType { 70 enum SVGAngleType {
71 SVG_ANGLETYPE_UNKNOWN = 0, 71 SVG_ANGLETYPE_UNKNOWN = 0,
72 SVG_ANGLETYPE_UNSPECIFIED = 1, 72 SVG_ANGLETYPE_UNSPECIFIED = 1,
73 SVG_ANGLETYPE_DEG = 2, 73 SVG_ANGLETYPE_DEG = 2,
74 SVG_ANGLETYPE_RAD = 3, 74 SVG_ANGLETYPE_RAD = 3,
75 SVG_ANGLETYPE_GRAD = 4, 75 SVG_ANGLETYPE_GRAD = 4,
76 SVG_ANGLETYPE_TURN = 5 76 SVG_ANGLETYPE_TURN = 5
77 }; 77 };
78 78
79 static PassRefPtrWillBeRawPtr<SVGAngle> create() 79 static PassRefPtrWillBeRawPtr<SVGAngle> create()
80 { 80 {
81 return adoptRefWillBeNoop(new SVGAngle()); 81 return adoptRefWillBeNoop(new SVGAngle());
82 } 82 }
83 83
84 virtual ~SVGAngle(); 84 ~SVGAngle() override;
85 85
86 SVGAngleType unitType() const { return m_unitType; } 86 SVGAngleType unitType() const { return m_unitType; }
87 87
88 void setValue(float); 88 void setValue(float);
89 float value() const; 89 float value() const;
90 90
91 void setValueInSpecifiedUnits(float valueInSpecifiedUnits) { m_valueInSpecif iedUnits = valueInSpecifiedUnits; } 91 void setValueInSpecifiedUnits(float valueInSpecifiedUnits) { m_valueInSpecif iedUnits = valueInSpecifiedUnits; }
92 float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; } 92 float valueInSpecifiedUnits() const { return m_valueInSpecifiedUnits; }
93 93
94 void newValueSpecifiedUnits(SVGAngleType unitType, float valueInSpecifiedUni ts); 94 void newValueSpecifiedUnits(SVGAngleType unitType, float valueInSpecifiedUni ts);
95 void convertToSpecifiedUnits(SVGAngleType unitType, ExceptionState&); 95 void convertToSpecifiedUnits(SVGAngleType unitType, ExceptionState&);
96 96
97 SVGEnumeration<SVGMarkerOrientType>* orientType() { return m_orientType.get( ); } 97 SVGEnumeration<SVGMarkerOrientType>* orientType() { return m_orientType.get( ); }
98 const SVGEnumeration<SVGMarkerOrientType>* orientType() const { return m_ori entType.get(); } 98 const SVGEnumeration<SVGMarkerOrientType>* orientType() const { return m_ori entType.get(); }
99 void orientTypeChanged(); 99 void orientTypeChanged();
100 100
101 // SVGPropertyBase: 101 // SVGPropertyBase:
102 102
103 PassRefPtrWillBeRawPtr<SVGAngle> clone() const; 103 PassRefPtrWillBeRawPtr<SVGAngle> clone() const;
104 104
105 virtual String valueAsString() const override; 105 String valueAsString() const override;
106 void setValueAsString(const String&, ExceptionState&); 106 void setValueAsString(const String&, ExceptionState&);
107 107
108 virtual void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) overr ide; 108 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
109 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWi llBeRawPtr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndO fDurationValue, SVGElement* contextElement) override; 109 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio nValue, SVGElement* contextElement) override;
110 virtual float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGElement* contextElement) override; 110 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme nt* contextElement) override;
111 111
112 static AnimatedPropertyType classType() { return AnimatedAngle; } 112 static AnimatedPropertyType classType() { return AnimatedAngle; }
113 113
114 DECLARE_VIRTUAL_TRACE(); 114 DECLARE_VIRTUAL_TRACE();
115 115
116 private: 116 private:
117 SVGAngle(); 117 SVGAngle();
118 SVGAngle(SVGAngleType, float, SVGMarkerOrientType); 118 SVGAngle(SVGAngleType, float, SVGMarkerOrientType);
119 119
120 void assign(const SVGAngle&); 120 void assign(const SVGAngle&);
121 121
122 SVGAngleType m_unitType; 122 SVGAngleType m_unitType;
123 float m_valueInSpecifiedUnits; 123 float m_valueInSpecifiedUnits;
124 RefPtrWillBeMember<SVGMarkerOrientEnumeration> m_orientType; 124 RefPtrWillBeMember<SVGMarkerOrientEnumeration> m_orientType;
125 }; 125 };
126 126
127 inline PassRefPtrWillBeRawPtr<SVGAngle> toSVGAngle(PassRefPtrWillBeRawPtr<SVGPro pertyBase> passBase) 127 inline PassRefPtrWillBeRawPtr<SVGAngle> toSVGAngle(PassRefPtrWillBeRawPtr<SVGPro pertyBase> passBase)
128 { 128 {
129 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase; 129 RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase;
130 ASSERT(base->type() == SVGAngle::classType()); 130 ASSERT(base->type() == SVGAngle::classType());
131 return static_pointer_cast<SVGAngle>(base.release()); 131 return static_pointer_cast<SVGAngle>(base.release());
132 } 132 }
133 133
134 } // namespace blink 134 } // namespace blink
135 135
136 #endif // SVGAngle_h 136 #endif // SVGAngle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698