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

Side by Side Diff: third_party/WebKit/Source/core/animation/IntegerOptionalIntegerSVGInterpolation.h

Issue 1417483015: SVG Web Animations: Add SVGIntegerOptionalIntegerInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More test work... Some failing Created 5 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IntegerOptionalIntegerSVGInterpolation_h
6 #define IntegerOptionalIntegerSVGInterpolation_h
7
8 #include "core/animation/SVGInterpolation.h"
9 #include "core/svg/SVGIntegerOptionalInteger.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class SVGIntegerOptionalInteger;
15
16 class IntegerOptionalIntegerSVGInterpolation : public SVGInterpolation {
17 public:
18 static PassRefPtr<IntegerOptionalIntegerSVGInterpolation> create(SVGProperty Base* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBas e> attribute, int min)
19 {
20 return adoptRef(new IntegerOptionalIntegerSVGInterpolation(toInterpolabl eValue(start), toInterpolableValue(end), attribute, min));
21 }
22
23 PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement&) const final
24 {
25 return fromInterpolableValue(*m_cachedValue, m_min);
26 }
27
28 private:
29 IntegerOptionalIntegerSVGInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<InterpolableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBas e> attribute, int min)
30 : SVGInterpolation(start, end, attribute)
31 , m_min(min)
32 {
33 }
34
35 static PassOwnPtr<InterpolableValue> toInterpolableValue(SVGPropertyBase*);
36
37 static PassRefPtrWillBeRawPtr<SVGIntegerOptionalInteger> fromInterpolableVal ue(const InterpolableValue&, int);
38
39 const int m_min;
40 };
41
42 }
43
44 #endif // IntegerOptionalIntegerSVGInterpolation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698