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

Side by Side Diff: Source/core/animation/StyleInterpolation.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 StyleInterpolation_h 5 #ifndef StyleInterpolation_h
6 #define StyleInterpolation_h 6 #define StyleInterpolation_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/animation/Interpolation.h" 9 #include "core/animation/Interpolation.h"
10 10
(...skipping 16 matching lines...) Expand all
27 class StyleInterpolation : public Interpolation { 27 class StyleInterpolation : public Interpolation {
28 public: 28 public:
29 // 1) convert m_cachedValue into an X 29 // 1) convert m_cachedValue into an X
30 // 2) shove X into StyleResolverState 30 // 2) shove X into StyleResolverState
31 // X can be: 31 // X can be:
32 // (1) a CSSValue (and applied via StyleBuilder::applyProperty) 32 // (1) a CSSValue (and applied via StyleBuilder::applyProperty)
33 // (2) an AnimatableValue (and applied via // AnimatedStyleBuilder::applyPro perty) 33 // (2) an AnimatableValue (and applied via // AnimatedStyleBuilder::applyPro perty)
34 // (3) a custom value that is inserted directly into the StyleResolverState. 34 // (3) a custom value that is inserted directly into the StyleResolverState.
35 virtual void apply(StyleResolverState&) const = 0; 35 virtual void apply(StyleResolverState&) const = 0;
36 36
37 // FIXME: Make abstract
38 virtual void apply(StyleResolverState& state, const InterpolableValue&) cons t { apply(state); }
39
37 virtual bool isStyleInterpolation() const override final { return true; } 40 virtual bool isStyleInterpolation() const override final { return true; }
38 41
39 CSSPropertyID id() const { return m_id; } 42 CSSPropertyID id() const { return m_id; }
40 43
41 virtual void trace(Visitor* visitor) override 44 virtual void trace(Visitor* visitor) override
42 { 45 {
43 Interpolation::trace(visitor); 46 Interpolation::trace(visitor);
44 } 47 }
45 48
46 protected: 49 protected:
47 CSSPropertyID m_id; 50 CSSPropertyID m_id;
48 51
49 StyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnP trWillBeRawPtr<InterpolableValue> end, CSSPropertyID id) 52 StyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnP trWillBeRawPtr<InterpolableValue> end, CSSPropertyID id)
50 : Interpolation(start, end) 53 : Interpolation(start, end)
51 , m_id(id) 54 , m_id(id)
52 { 55 {
53 } 56 }
57
58 StyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnP trWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, AnimationEffect::Compos iteOperation compositeStart, AnimationEffect::CompositeOperation compositeEnd)
59 : Interpolation(start, end, compositeStart, compositeEnd)
60 , m_id(id)
61 {
62 }
54 }; 63 };
55 64
56 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp olation(), value.isStyleInterpolation()); 65 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp olation(), value.isStyleInterpolation());
57 66
58 } 67 }
59 68
60 #endif 69 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698