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

Side by Side Diff: Source/core/svg/SVGNumberOptionalNumber.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/SVGNumberListTearOff.h ('k') | Source/core/svg/SVGNumberOptionalNumber.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 17 matching lines...) Expand all
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 SVGNumberOptionalNumber_h 31 #ifndef SVGNumberOptionalNumber_h
32 #define SVGNumberOptionalNumber_h 32 #define SVGNumberOptionalNumber_h
33 33
34 #include "core/svg/SVGAnimatedNumber.h" 34 #include "core/svg/SVGAnimatedNumber.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class SVGNumberOptionalNumber : public NewSVGPropertyBase { 38 class SVGNumberOptionalNumber : public SVGPropertyBase {
39 public: 39 public:
40 // Tearoff of SVGNumberOptionalNumber is never created. 40 // Tearoff of SVGNumberOptionalNumber is never created.
41 typedef void TearOffType; 41 typedef void TearOffType;
42 typedef void PrimitiveType; 42 typedef void PrimitiveType;
43 43
44 static PassRefPtr<SVGNumberOptionalNumber> create(PassRefPtr<SVGNumber> firs tNumber, PassRefPtr<SVGNumber> secondNumber) 44 static PassRefPtr<SVGNumberOptionalNumber> create(PassRefPtr<SVGNumber> firs tNumber, PassRefPtr<SVGNumber> secondNumber)
45 { 45 {
46 return adoptRef(new SVGNumberOptionalNumber(firstNumber, secondNumber)); 46 return adoptRef(new SVGNumberOptionalNumber(firstNumber, secondNumber));
47 } 47 }
48 48
49 PassRefPtr<SVGNumberOptionalNumber> clone() const; 49 PassRefPtr<SVGNumberOptionalNumber> clone() const;
50 virtual PassRefPtr<NewSVGPropertyBase> cloneForAnimation(const String&) cons t OVERRIDE; 50 virtual PassRefPtr<SVGPropertyBase> cloneForAnimation(const String&) const O VERRIDE;
51 51
52 virtual String valueAsString() const OVERRIDE; 52 virtual String valueAsString() const OVERRIDE;
53 void setValueAsString(const String&, ExceptionState&); 53 void setValueAsString(const String&, ExceptionState&);
54 54
55 virtual void add(PassRefPtr<NewSVGPropertyBase>, SVGElement*) OVERRIDE; 55 virtual void add(PassRefPtr<SVGPropertyBase>, SVGElement*) OVERRIDE;
56 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<NewSVGPropertyBase> from, PassRefPtr<NewSVGProp ertyBase> to, PassRefPtr<NewSVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement) OVERRIDE; 56 virtual void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtr<SVGPropertyBase> from, PassRefPtr<SVGPropertyBa se> to, PassRefPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement* contextE lement) OVERRIDE;
57 virtual float calculateDistance(PassRefPtr<NewSVGPropertyBase> to, SVGElemen t* contextElement) OVERRIDE; 57 virtual float calculateDistance(PassRefPtr<SVGPropertyBase> to, SVGElement* contextElement) OVERRIDE;
58 58
59 static AnimatedPropertyType classType() { return AnimatedNumberOptionalNumbe r; } 59 static AnimatedPropertyType classType() { return AnimatedNumberOptionalNumbe r; }
60 60
61 PassRefPtr<SVGNumber> firstNumber() { return m_firstNumber; } 61 PassRefPtr<SVGNumber> firstNumber() { return m_firstNumber; }
62 PassRefPtr<SVGNumber> secondNumber() { return m_secondNumber; } 62 PassRefPtr<SVGNumber> secondNumber() { return m_secondNumber; }
63 63
64 protected: 64 protected:
65 SVGNumberOptionalNumber(PassRefPtr<SVGNumber> firstNumber, PassRefPtr<SVGNum ber> secondNumber); 65 SVGNumberOptionalNumber(PassRefPtr<SVGNumber> firstNumber, PassRefPtr<SVGNum ber> secondNumber);
66 66
67 RefPtr<SVGNumber> m_firstNumber; 67 RefPtr<SVGNumber> m_firstNumber;
68 RefPtr<SVGNumber> m_secondNumber; 68 RefPtr<SVGNumber> m_secondNumber;
69 }; 69 };
70 70
71 inline PassRefPtr<SVGNumberOptionalNumber> toSVGNumberOptionalNumber(PassRefPtr< NewSVGPropertyBase> passBase) 71 inline PassRefPtr<SVGNumberOptionalNumber> toSVGNumberOptionalNumber(PassRefPtr< SVGPropertyBase> passBase)
72 { 72 {
73 RefPtr<NewSVGPropertyBase> base = passBase; 73 RefPtr<SVGPropertyBase> base = passBase;
74 ASSERT(base->type() == SVGNumberOptionalNumber::classType()); 74 ASSERT(base->type() == SVGNumberOptionalNumber::classType());
75 return static_pointer_cast<SVGNumberOptionalNumber>(base.release()); 75 return static_pointer_cast<SVGNumberOptionalNumber>(base.release());
76 } 76 }
77 77
78 } // namespace WebCore 78 } // namespace WebCore
79 79
80 #endif // SVGNumberOptionalNumber_h 80 #endif // SVGNumberOptionalNumber_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGNumberListTearOff.h ('k') | Source/core/svg/SVGNumberOptionalNumber.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698