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

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

Issue 1607633003: Code cleanup: Remove SVGInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused assertion variable to make release compile Created 4 years, 11 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
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 SVGInterpolation_h
6 #define SVGInterpolation_h
7
8 #include "core/animation/Interpolation.h"
9 #include "core/animation/PropertyHandle.h"
10 #include "core/svg/properties/SVGAnimatedProperty.h"
11
12 namespace blink {
13
14 class SVGInterpolation : public Interpolation {
15 public:
16 bool isSVGInterpolation() const final { return true; }
17
18 SVGAnimatedPropertyBase* attribute() const { return m_attribute.get(); }
19
20 const QualifiedName& attributeName() const { return m_attribute->attributeNa me(); }
21
22 PropertyHandle property() const final
23 {
24 return PropertyHandle(attributeName());
25 }
26
27 void apply(SVGElement& targetElement) const
28 {
29 targetElement.setWebAnimatedAttribute(attributeName(), interpolatedValue (targetElement));
30 }
31
32 virtual PassRefPtrWillBeRawPtr<SVGPropertyBase> interpolatedValue(SVGElement &) const = 0;
33
34 protected:
35 SVGInterpolation(PassOwnPtr<InterpolableValue> start, PassOwnPtr<Interpolabl eValue> end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
36 : Interpolation(start, end)
37 , m_attribute(attribute)
38 {
39 }
40
41 RefPtrWillBePersistent<SVGAnimatedPropertyBase> m_attribute;
42 };
43
44 DEFINE_TYPE_CASTS(SVGInterpolation, Interpolation, value, value->isSVGInterpolat ion(), value.isSVGInterpolation());
45
46 }
47
48 #endif // SVGInterpolation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698