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

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: More comprehensive non-negative length layout tests 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 10 matching lines...) Expand all
21 class StyleInterpolation : public Interpolation { 21 class StyleInterpolation : public Interpolation {
22 public: 22 public:
23 // 1) convert m_cachedValue into an X 23 // 1) convert m_cachedValue into an X
24 // 2) shove X into StyleResolverState 24 // 2) shove X into StyleResolverState
25 // X can be: 25 // X can be:
26 // (1) a CSSValue (and applied via StyleBuilder::applyProperty) 26 // (1) a CSSValue (and applied via StyleBuilder::applyProperty)
27 // (2) an AnimatableValue (and applied via // AnimatedStyleBuilder::applyPro perty) 27 // (2) an AnimatableValue (and applied via // AnimatedStyleBuilder::applyPro perty)
28 // (3) a custom value that is inserted directly into the StyleResolverState. 28 // (3) a custom value that is inserted directly into the StyleResolverState.
29 virtual void apply(StyleResolverState&) const = 0; 29 virtual void apply(StyleResolverState&) const = 0;
30 30
31 // FIXME: Make abstract
32 virtual void apply(StyleResolverState& state, const InterpolableValue&) cons t { apply(state); }
33
31 virtual bool isStyleInterpolation() const override final { return true; } 34 virtual bool isStyleInterpolation() const override final { return true; }
32 35
33 CSSPropertyID id() const { return m_id; } 36 CSSPropertyID id() const { return m_id; }
34 37
35 virtual void trace(Visitor* visitor) override 38 virtual void trace(Visitor* visitor) override
36 { 39 {
37 Interpolation::trace(visitor); 40 Interpolation::trace(visitor);
38 } 41 }
39 42
40 protected: 43 protected:
41 CSSPropertyID m_id; 44 CSSPropertyID m_id;
42 45
43 StyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnP trWillBeRawPtr<InterpolableValue> end, CSSPropertyID id) 46 StyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnP trWillBeRawPtr<InterpolableValue> end, CSSPropertyID id)
44 : Interpolation(start, end) 47 : Interpolation(start, end)
45 , m_id(id) 48 , m_id(id)
46 { 49 {
47 } 50 }
51
52 StyleInterpolation(PassOwnPtrWillBeRawPtr<InterpolableValue> start, PassOwnP trWillBeRawPtr<InterpolableValue> end, CSSPropertyID id, AnimationEffect::Compos iteOperation compositeStart, AnimationEffect::CompositeOperation compositeEnd)
53 : Interpolation(start, end, compositeStart, compositeEnd)
54 , m_id(id)
55 {
56 }
48 }; 57 };
49 58
50 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp olation(), value.isStyleInterpolation()); 59 DEFINE_TYPE_CASTS(StyleInterpolation, Interpolation, value, value->isStyleInterp olation(), value.isStyleInterpolation());
51 60
52 } 61 }
53 62
54 #endif 63 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698