OLD | NEW |
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 #include "config.h" | 5 #include "config.h" |
6 #include "core/animation/AnimationStack.h" | 6 #include "core/animation/AnimationStack.h" |
7 | 7 |
8 #include "core/animation/AnimationClock.h" | 8 #include "core/animation/AnimationClock.h" |
9 #include "core/animation/AnimationTimeline.h" | 9 #include "core/animation/AnimationTimeline.h" |
10 #include "core/animation/ElementAnimations.h" | 10 #include "core/animation/ElementAnimations.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 { | 37 { |
38 document->animationClock().updateTime(time); | 38 document->animationClock().updateTime(time); |
39 timeline->serviceAnimations(TimingUpdateForAnimationFrame); | 39 timeline->serviceAnimations(TimingUpdateForAnimationFrame); |
40 } | 40 } |
41 | 41 |
42 const HeapVector<Member<SampledEffect>>& effects() | 42 const HeapVector<Member<SampledEffect>>& effects() |
43 { | 43 { |
44 return element->ensureElementAnimations().defaultStack().m_effects; | 44 return element->ensureElementAnimations().defaultStack().m_effects; |
45 } | 45 } |
46 | 46 |
47 EffectModel* makeEffectModel(CSSPropertyID id, PassRefPtrWillBeRawPtr<Animat
ableValue> value) | 47 EffectModel* makeEffectModel(CSSPropertyID id, PassRefPtr<AnimatableValue> v
alue) |
48 { | 48 { |
49 AnimatableValueKeyframeVector keyframes(2); | 49 AnimatableValueKeyframeVector keyframes(2); |
50 keyframes[0] = AnimatableValueKeyframe::create(); | 50 keyframes[0] = AnimatableValueKeyframe::create(); |
51 keyframes[0]->setOffset(0.0); | 51 keyframes[0]->setOffset(0.0); |
52 keyframes[0]->setPropertyValue(id, value.get()); | 52 keyframes[0]->setPropertyValue(id, value.get()); |
53 keyframes[1] = AnimatableValueKeyframe::create(); | 53 keyframes[1] = AnimatableValueKeyframe::create(); |
54 keyframes[1]->setOffset(1.0); | 54 keyframes[1]->setOffset(1.0); |
55 keyframes[1]->setPropertyValue(id, value.get()); | 55 keyframes[1]->setPropertyValue(id, value.get()); |
56 return AnimatableValueKeyframeEffectModel::create(keyframes); | 56 return AnimatableValueKeyframeEffectModel::create(keyframes); |
57 } | 57 } |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ActiveInterpolationMap result = AnimationStack::activeInterpolations(&elemen
t->elementAnimations()->defaultStack(), 0, 0, KeyframeEffect::DefaultPriority, 0
); | 124 ActiveInterpolationMap result = AnimationStack::activeInterpolations(&elemen
t->elementAnimations()->defaultStack(), 0, 0, KeyframeEffect::DefaultPriority, 0
); |
125 EXPECT_EQ(1u, result.size()); | 125 EXPECT_EQ(1u, result.size()); |
126 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab
leDouble::create(1).get())); | 126 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab
leDouble::create(1).get())); |
127 | 127 |
128 animation->setEffect(0); | 128 animation->setEffect(0); |
129 result = AnimationStack::activeInterpolations(&element->elementAnimations()-
>defaultStack(), 0, 0, KeyframeEffect::DefaultPriority, 0); | 129 result = AnimationStack::activeInterpolations(&element->elementAnimations()-
>defaultStack(), 0, 0, KeyframeEffect::DefaultPriority, 0); |
130 EXPECT_EQ(0u, result.size()); | 130 EXPECT_EQ(0u, result.size()); |
131 } | 131 } |
132 | 132 |
133 } | 133 } |
OLD | NEW |