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

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

Issue 208133002: [SVG] Remove "New" prefix from properties implementation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « Source/core/svg/SVGEnumeration.cpp ('k') | Source/core/svg/SVGInteger.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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SVGInteger_h 31 #ifndef SVGInteger_h
32 #define SVGInteger_h 32 #define SVGInteger_h
33 33
34 #include "bindings/v8/ExceptionMessages.h" 34 #include "bindings/v8/ExceptionMessages.h"
35 #include "bindings/v8/ExceptionStatePlaceholder.h" 35 #include "bindings/v8/ExceptionStatePlaceholder.h"
36 #include "core/svg/properties/NewSVGProperty.h" 36 #include "core/svg/properties/SVGProperty.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class SVGIntegerTearOff; 40 class SVGIntegerTearOff;
41 41
42 class SVGInteger : public NewSVGPropertyBase { 42 class SVGInteger : public SVGPropertyBase {
43 public: 43 public:
44 typedef void TearOffType; 44 typedef void TearOffType;
45 typedef int PrimitiveType; 45 typedef int PrimitiveType;
46 46
47 static PassRefPtr<SVGInteger> create(int value = 0) 47 static PassRefPtr<SVGInteger> create(int value = 0)
48 { 48 {
49 return adoptRef(new SVGInteger(value)); 49 return adoptRef(new SVGInteger(value));
50 } 50 }
51 51
52 virtual PassRefPtr<SVGInteger> clone() const; 52 virtual PassRefPtr<SVGInteger> clone() const;
53 virtual PassRefPtr<NewSVGPropertyBase> cloneForAnimation(const String&) cons t OVERRIDE; 53 virtual PassRefPtr<SVGPropertyBase> cloneForAnimation(const String&) const O VERRIDE;
54 54
55 int value() const { return m_value; } 55 int value() const { return m_value; }
56 void setValue(int value) { m_value = value; } 56 void setValue(int value) { m_value = value; }
57 57
58 virtual String valueAsString() const OVERRIDE; 58 virtual String valueAsString() const OVERRIDE;
59 virtual void setValueAsString(const String&, ExceptionState&); 59 virtual void setValueAsString(const String&, ExceptionState&);
60 60
61 virtual void add(PassRefPtr<NewSVGPropertyBase>, SVGElement*) OVERRIDE; 61 virtual void add(PassRefPtr<SVGPropertyBase>, SVGElement*) OVERRIDE;
62 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<NewSVGPropertyBase> from, PassRefPtr<NewSVGProp ertyBase> to, PassRefPtr<NewSVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement) OVERRIDE; 62 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBa se> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextE lement) OVERRIDE;
63 virtual float calculateDistance(PassRefPtr<NewSVGPropertyBase> to, SVGElemen t* contextElement) OVERRIDE; 63 virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement* contextElement) OVERRIDE;
64 64
65 static AnimatedPropertyType classType() { return AnimatedInteger; } 65 static AnimatedPropertyType classType() { return AnimatedInteger; }
66 66
67 protected: 67 protected:
68 explicit SVGInteger(int); 68 explicit SVGInteger(int);
69 69
70 int m_value; 70 int m_value;
71 }; 71 };
72 72
73 inline PassRefPtr<SVGInteger> toSVGInteger(PassRefPtr<NewSVGPropertyBase> passBa se) 73 inline PassRefPtr<SVGInteger> toSVGInteger(PassRefPtr<SVGPropertyBase> passBase)
74 { 74 {
75 RefPtr<NewSVGPropertyBase> base = passBase; 75 RefPtr<SVGPropertyBase> base = passBase;
76 ASSERT(base->type() == SVGInteger::classType()); 76 ASSERT(base->type() == SVGInteger::classType());
77 return static_pointer_cast<SVGInteger>(base.release()); 77 return static_pointer_cast<SVGInteger>(base.release());
78 } 78 }
79 79
80 } // namespace WebCore 80 } // namespace WebCore
81 81
82 #endif // SVGInteger_h 82 #endif // SVGInteger_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGEnumeration.cpp ('k') | Source/core/svg/SVGInteger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698