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

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

Issue 1276183004: Oilpan: Unship oilpan from temporary animation objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 ConstantStyleInterpolation_h 5 #ifndef ConstantStyleInterpolation_h
6 #define ConstantStyleInterpolation_h 6 #define ConstantStyleInterpolation_h
7 7
8 #include "core/animation/StyleInterpolation.h" 8 #include "core/animation/StyleInterpolation.h"
9 #include "core/css/resolver/StyleBuilder.h" 9 #include "core/css/resolver/StyleBuilder.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class ConstantStyleInterpolation : public StyleInterpolation { 13 class ConstantStyleInterpolation : public StyleInterpolation {
14 public: 14 public:
15 static PassRefPtrWillBeRawPtr<ConstantStyleInterpolation> create(CSSValue* v alue, CSSPropertyID id) 15 static PassRefPtr<ConstantStyleInterpolation> create(CSSValue* value, CSSPro pertyID id)
16 { 16 {
17 return adoptRefWillBeNoop(new ConstantStyleInterpolation(value, id)); 17 return adoptRef(new ConstantStyleInterpolation(value, id));
18 } 18 }
19 19
20 void apply(StyleResolverState& state) const override 20 void apply(StyleResolverState& state) const override
21 { 21 {
22 StyleBuilder::applyProperty(m_id, state, m_value.get()); 22 StyleBuilder::applyProperty(m_id, state, m_value.get());
23 } 23 }
24 24
25 DEFINE_INLINE_VIRTUAL_TRACE()
26 {
27 StyleInterpolation::trace(visitor);
28 visitor->trace(m_value);
29 }
30
31 private: 25 private:
32 ConstantStyleInterpolation(CSSValue* value, CSSPropertyID id) 26 ConstantStyleInterpolation(CSSValue* value, CSSPropertyID id)
33 : StyleInterpolation(InterpolableList::create(0), InterpolableList::crea te(0), id) 27 : StyleInterpolation(InterpolableList::create(0), InterpolableList::crea te(0), id)
34 , m_value(value) 28 , m_value(value)
35 { } 29 { }
36 30
37 RefPtrWillBeMember<CSSValue> m_value; 31 RefPtrWillBePersistent<CSSValue> m_value;
38 }; 32 };
39 33
40 } 34 }
41 35
42 #endif 36 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698