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

Side by Side Diff: Source/core/animation/NumberSVGInterpolation.h

Issue 1226293002: Fix virtual/override/final usage in Source/core/{animation,css,style}/. (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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NumberSVGInterpolation_h 5 #ifndef NumberSVGInterpolation_h
6 #define NumberSVGInterpolation_h 6 #define NumberSVGInterpolation_h
7 7
8 #include "core/animation/SVGInterpolation.h" 8 #include "core/animation/SVGInterpolation.h"
9 #include "core/svg/SVGNumber.h" 9 #include "core/svg/SVGNumber.h"
10 #include "core/svg/SVGNumberList.h" 10 #include "core/svg/SVGNumberList.h"
(...skipping 13 matching lines...) Expand all
24 static PassRefPtrWillBeRawPtr<NumberSVGInterpolation> create(SVGPropertyBase * start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> a ttribute, SVGNumberNegativeValuesMode negativeValuesMode) 24 static PassRefPtrWillBeRawPtr<NumberSVGInterpolation> create(SVGPropertyBase * start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> a ttribute, SVGNumberNegativeValuesMode negativeValuesMode)
25 { 25 {
26 return adoptRefWillBeNoop(new NumberSVGInterpolation(toInterpolableValue (start), toInterpolableValue(end), attribute, negativeValuesMode)); 26 return adoptRefWillBeNoop(new NumberSVGInterpolation(toInterpolableValue (start), toInterpolableValue(end), attribute, negativeValuesMode));
27 } 27 }
28 28
29 static bool canCreateFrom(SVGPropertyBase* value) 29 static bool canCreateFrom(SVGPropertyBase* value)
30 { 30 {
31 return true; 31 return true;
32 } 32 }
33 33
34 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement &) const override final 34 PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement&) const final
35 { 35 {
36 return fromInterpolableValue(*m_cachedValue, m_negativeValuesMode); 36 return fromInterpolableValue(*m_cachedValue, m_negativeValuesMode);
37 } 37 }
38 38
39 DEFINE_INLINE_VIRTUAL_TRACE() 39 DEFINE_INLINE_VIRTUAL_TRACE()
40 { 40 {
41 SVGInterpolation::trace(visitor); 41 SVGInterpolation::trace(visitor);
42 } 42 }
43 43
44 static PassOwnPtrWillBeRawPtr<InterpolableNumber> toInterpolableValue(SVGPro pertyBase* value) 44 static PassOwnPtrWillBeRawPtr<InterpolableNumber> toInterpolableValue(SVGPro pertyBase* value)
45 { 45 {
46 return InterpolableNumber::create(toSVGNumber(value)->value()); 46 return InterpolableNumber::create(toSVGNumber(value)->value());
47 } 47 }
48 48
49 static PassRefPtrWillBeRawPtr<SVGNumber> fromInterpolableValue(const Interpo lableValue&, SVGNumberNegativeValuesMode = AllowNegativeNumbers); 49 static PassRefPtrWillBeRawPtr<SVGNumber> fromInterpolableValue(const Interpo lableValue&, SVGNumberNegativeValuesMode = AllowNegativeNumbers);
50 50
51 private: 51 private:
52 NumberSVGInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pass OwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPro pertyBase> attribute, SVGNumberNegativeValuesMode negativeValuesMode) 52 NumberSVGInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, Pass OwnPtrWillBeRawPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPro pertyBase> attribute, SVGNumberNegativeValuesMode negativeValuesMode)
53 : SVGInterpolation(start, end, attribute) 53 : SVGInterpolation(start, end, attribute)
54 , m_negativeValuesMode(negativeValuesMode) 54 , m_negativeValuesMode(negativeValuesMode)
55 { 55 {
56 } 56 }
57 57
58 const SVGNumberNegativeValuesMode m_negativeValuesMode; 58 const SVGNumberNegativeValuesMode m_negativeValuesMode;
59 }; 59 };
60 60
61 } 61 }
62 62
63 #endif // NumberSVGInterpolation_h 63 #endif // NumberSVGInterpolation_h
OLDNEW
« no previous file with comments | « Source/core/animation/NumberOptionalNumberSVGInterpolation.h ('k') | Source/core/animation/PathSVGInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698