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

Side by Side Diff: Source/core/animation/CSSValueInterpolationType.cpp

Issue 1303173007: Oilpan: Unship Oilpan from CSSValues 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 #include "config.h" 5 #include "config.h"
6 #include "core/animation/CSSValueInterpolationType.h" 6 #include "core/animation/CSSValueInterpolationType.h"
7 7
8 #include "core/css/resolver/StyleBuilder.h" 8 #include "core/css/resolver/StyleBuilder.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class CSSValueNonInterpolableValue : public NonInterpolableValue { 12 class CSSValueNonInterpolableValue : public NonInterpolableValue {
13 public: 13 public:
14 ~CSSValueNonInterpolableValue() override { } 14 ~CSSValueNonInterpolableValue() override { }
15 static PassRefPtrWillBeRawPtr<CSSValueNonInterpolableValue> create(PassRefPt rWillBeRawPtr<CSSValue> cssValue) 15 static PassRefPtrWillBeRawPtr<CSSValueNonInterpolableValue> create(PassRefPt r<CSSValue> cssValue)
16 { 16 {
17 return adoptRefWillBeNoop(new CSSValueNonInterpolableValue(cssValue)); 17 return adoptRefWillBeNoop(new CSSValueNonInterpolableValue(cssValue));
18 } 18 }
19 19
20 CSSValue* cssValue() const { return m_cssValue.get(); } 20 CSSValue* cssValue() const { return m_cssValue.get(); }
21 21
22 DEFINE_INLINE_VIRTUAL_TRACE() 22 DEFINE_INLINE_VIRTUAL_TRACE()
23 { 23 {
24 NonInterpolableValue::trace(visitor); 24 NonInterpolableValue::trace(visitor);
25 visitor->trace(m_cssValue);
26 } 25 }
27 26
28 DECLARE_NON_INTERPOLABLE_VALUE_TYPE(); 27 DECLARE_NON_INTERPOLABLE_VALUE_TYPE();
29 28
30 private: 29 private:
31 CSSValueNonInterpolableValue(PassRefPtrWillBeRawPtr<CSSValue> cssValue) 30 CSSValueNonInterpolableValue(PassRefPtr<CSSValue> cssValue)
32 : m_cssValue(cssValue) 31 : m_cssValue(cssValue)
33 { } 32 { }
34 33
35 RefPtrWillBeMember<CSSValue> m_cssValue; 34 RefPtr<CSSValue> m_cssValue;
36 }; 35 };
37 36
38 DEFINE_NON_INTERPOLABLE_VALUE_TYPE(CSSValueNonInterpolableValue); 37 DEFINE_NON_INTERPOLABLE_VALUE_TYPE(CSSValueNonInterpolableValue);
39 DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(CSSValueNonInterpolableValue); 38 DEFINE_NON_INTERPOLABLE_VALUE_TYPE_CASTS(CSSValueNonInterpolableValue);
40 39
41 PassOwnPtrWillBeRawPtr<InterpolationValue> CSSValueInterpolationType::maybeConve rtSingle(const CSSPropertySpecificKeyframe& keyframe, const StyleResolverState*, ConversionCheckers&) const 40 PassOwnPtrWillBeRawPtr<InterpolationValue> CSSValueInterpolationType::maybeConve rtSingle(const CSSPropertySpecificKeyframe& keyframe, const StyleResolverState*, ConversionCheckers&) const
42 { 41 {
43 return InterpolationValue::create(*this, InterpolableList::create(0), CSSVal ueNonInterpolableValue::create(keyframe.value())); 42 return InterpolationValue::create(*this, InterpolableList::create(0), CSSVal ueNonInterpolableValue::create(keyframe.value()));
44 } 43 }
45 44
46 void CSSValueInterpolationType::apply(const InterpolableValue&, const NonInterpo lableValue* nonInterpolableValue, StyleResolverState& state) const 45 void CSSValueInterpolationType::apply(const InterpolableValue&, const NonInterpo lableValue* nonInterpolableValue, StyleResolverState& state) const
47 { 46 {
48 CSSValue* value = toCSSValueNonInterpolableValue(nonInterpolableValue)->cssV alue(); 47 CSSValue* value = toCSSValueNonInterpolableValue(nonInterpolableValue)->cssV alue();
49 if (value) 48 if (value)
50 StyleBuilder::applyProperty(m_property, state, value); 49 StyleBuilder::applyProperty(m_property, state, value);
51 } 50 }
52 51
53 } // namespace blink 52 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationInputHelpers.cpp ('k') | Source/core/animation/ColorStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698