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

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

Issue 863863004: Implemented additive animations for length (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed AnimationStackTest Created 5 years, 10 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
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 PassRefPtrWillBeRawPtr<ConstantStyleInterpolation> create(CSSValue* v alue, CSSPropertyID id)
16 { 16 {
17 return adoptRefWillBeNoop(new ConstantStyleInterpolation(value, id)); 17 return adoptRefWillBeNoop(new ConstantStyleInterpolation(value, id));
18 } 18 }
19 19
20 static PassRefPtrWillBeRawPtr<ConstantStyleInterpolation> create(CSSValue* v alue, CSSPropertyID id, AnimationEffect::CompositeOperation compositeStart, Anim ationEffect::CompositeOperation compositeEnd)
21 {
22 return adoptRefWillBeNoop(new ConstantStyleInterpolation(value, id, comp ositeStart, compositeEnd));
23 }
24
20 virtual void apply(StyleResolverState& state) const override 25 virtual void apply(StyleResolverState& state) const override
21 { 26 {
22 StyleBuilder::applyProperty(m_id, state, m_value.get()); 27 StyleBuilder::applyProperty(m_id, state, m_value.get());
23 } 28 }
24 29
25 virtual void trace(Visitor* visitor) override 30 virtual void trace(Visitor* visitor) override
26 { 31 {
27 StyleInterpolation::trace(visitor); 32 StyleInterpolation::trace(visitor);
28 visitor->trace(m_value); 33 visitor->trace(m_value);
29 } 34 }
30 35
31 private: 36 private:
32 ConstantStyleInterpolation(CSSValue* value, CSSPropertyID id) 37 ConstantStyleInterpolation(CSSValue* value, CSSPropertyID id)
33 : StyleInterpolation(InterpolableList::create(0), InterpolableList::crea te(0), id) 38 : StyleInterpolation(InterpolableList::create(0), InterpolableList::crea te(0), id)
34 , m_value(value) 39 , m_value(value)
35 { } 40 { }
36 41
42 ConstantStyleInterpolation(CSSValue* value, CSSPropertyID id, AnimationEffec t::CompositeOperation compositeStart, AnimationEffect::CompositeOperation compos iteEnd)
43 : StyleInterpolation(InterpolableList::create(0), InterpolableList::crea te(0), id, compositeStart, compositeEnd)
44 , m_value(value)
45 { }
46
37 RefPtrWillBeMember<CSSValue> m_value; 47 RefPtrWillBeMember<CSSValue> m_value;
38 }; 48 };
39 49
40 } 50 }
41 51
42 #endif 52 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698