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

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

Issue 1491023003: Refactor SVGAnimatedLength negative values mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace SVGLengthNegativeValuesMode enum with bool Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/LengthSVGInterpolation.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 // 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 LengthSVGInterpolation_h 5 #ifndef LengthSVGInterpolation_h
6 #define LengthSVGInterpolation_h 6 #define LengthSVGInterpolation_h
7 7
8 #include "core/animation/SVGInterpolation.h" 8 #include "core/animation/SVGInterpolation.h"
9 #include "core/svg/SVGLength.h" 9 #include "core/svg/SVGLength.h"
10 #include "core/svg/SVGLengthList.h" 10 #include "core/svg/SVGLengthList.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class LengthSVGInterpolation : public SVGInterpolation { 14 class LengthSVGInterpolation : public SVGInterpolation {
15 public: 15 public:
16 typedef SVGLengthList ListType; 16 typedef SVGLengthList ListType;
17 struct NonInterpolableType { 17 struct NonInterpolableType {
18 DISALLOW_NEW(); 18 DISALLOW_NEW();
19 SVGLengthMode unitMode; 19 SVGLengthMode unitMode;
20 SVGLengthNegativeValuesMode negativeValuesMode;
21 }; 20 };
22 21
23 static bool canCreateFrom(SVGLength*, SVGLength*) 22 static bool canCreateFrom(SVGLength*, SVGLength*)
24 { 23 {
25 return true; 24 return true;
26 } 25 }
27 26
28 static PassRefPtrWillBeRawPtr<SVGLengthList> createList(const SVGAnimatedPro pertyBase&); 27 static PassRefPtrWillBeRawPtr<SVGLengthList> createList(const SVGAnimatedPro pertyBase&);
29 28
30 static PassRefPtr<LengthSVGInterpolation> create(SVGPropertyBase* start, SVG PropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute); 29 static PassRefPtr<LengthSVGInterpolation> create(SVGPropertyBase* start, SVG PropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute);
31 30
32 static PassOwnPtr<InterpolableValue> toInterpolableValue(SVGLength*, const S VGAnimatedPropertyBase*, NonInterpolableType*); 31 static PassOwnPtr<InterpolableValue> toInterpolableValue(SVGLength*, const S VGAnimatedPropertyBase*, NonInterpolableType*);
33 32
34 static PassRefPtrWillBeRawPtr<SVGLength> fromInterpolableValue(const Interpo lableValue&, const NonInterpolableType&, const SVGElement*); 33 static PassRefPtrWillBeRawPtr<SVGLength> fromInterpolableValue(const Interpo lableValue&, const NonInterpolableType&, const SVGElement*, const QualifiedName& );
35 34
36 PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement&) const final; 35 PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement&) const final;
37 36
38 private: 37 private:
39 LengthSVGInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Inter polableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute, co nst NonInterpolableType& modeData) 38 LengthSVGInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Inter polableValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute, co nst NonInterpolableType& modeData)
40 : SVGInterpolation(start, end, attribute) 39 : SVGInterpolation(start, end, attribute)
41 , m_modeData(modeData) 40 , m_modeData(modeData)
42 { 41 {
43 } 42 }
44 43
45 const NonInterpolableType m_modeData; 44 const NonInterpolableType m_modeData;
46 }; 45 };
47 46
48 } 47 }
49 48
50 #endif // LengthSVGInterpolation_h 49 #endif // LengthSVGInterpolation_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/LengthSVGInterpolation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698