| 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 "core/animation/EffectStack.h" | 5 #include "core/animation/EffectStack.h" |
| 6 | 6 |
| 7 #include "core/animation/AnimationClock.h" | 7 #include "core/animation/AnimationClock.h" |
| 8 #include "core/animation/CompositorPendingAnimations.h" | 8 #include "core/animation/CompositorPendingAnimations.h" |
| 9 #include "core/animation/DocumentTimeline.h" | 9 #include "core/animation/DocumentTimeline.h" |
| 10 #include "core/animation/ElementAnimations.h" | 10 #include "core/animation/ElementAnimations.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), | 109 makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(1))), |
| 110 15); | 110 15); |
| 111 play(makeKeyframeEffect( | 111 play(makeKeyframeEffect( |
| 112 makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))), | 112 makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(2))), |
| 113 10); | 113 10); |
| 114 HeapVector<Member<const InertEffect>> newAnimations; | 114 HeapVector<Member<const InertEffect>> newAnimations; |
| 115 InertEffect* inert1 = makeInertEffect( | 115 InertEffect* inert1 = makeInertEffect( |
| 116 makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(3))); | 116 makeEffectModel(CSSPropertyFontSize, AnimatableDouble::create(3))); |
| 117 InertEffect* inert2 = makeInertEffect( | 117 InertEffect* inert2 = makeInertEffect( |
| 118 makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(4))); | 118 makeEffectModel(CSSPropertyZIndex, AnimatableDouble::create(4))); |
| 119 newAnimations.append(inert1); | 119 newAnimations.push_back(inert1); |
| 120 newAnimations.append(inert2); | 120 newAnimations.push_back(inert2); |
| 121 ActiveInterpolationsMap result = EffectStack::activeInterpolations( | 121 ActiveInterpolationsMap result = EffectStack::activeInterpolations( |
| 122 &element->elementAnimations()->effectStack(), &newAnimations, 0, | 122 &element->elementAnimations()->effectStack(), &newAnimations, 0, |
| 123 KeyframeEffectReadOnly::DefaultPriority); | 123 KeyframeEffectReadOnly::DefaultPriority); |
| 124 EXPECT_EQ(2u, result.size()); | 124 EXPECT_EQ(2u, result.size()); |
| 125 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize) | 125 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize) |
| 126 ->equals(AnimatableDouble::create(3).get())); | 126 ->equals(AnimatableDouble::create(3).get())); |
| 127 EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex) | 127 EXPECT_TRUE(interpolationValue(result, CSSPropertyZIndex) |
| 128 ->equals(AnimatableDouble::create(4).get())); | 128 ->equals(AnimatableDouble::create(4).get())); |
| 129 } | 129 } |
| 130 | 130 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 interpolations = EffectStack::activeInterpolations( | 213 interpolations = EffectStack::activeInterpolations( |
| 214 &element->elementAnimations()->effectStack(), nullptr, nullptr, | 214 &element->elementAnimations()->effectStack(), nullptr, nullptr, |
| 215 KeyframeEffectReadOnly::DefaultPriority); | 215 KeyframeEffectReadOnly::DefaultPriority); |
| 216 EXPECT_EQ(1u, interpolations.size()); | 216 EXPECT_EQ(1u, interpolations.size()); |
| 217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize) | 217 EXPECT_TRUE(interpolationValue(interpolations, CSSPropertyFontSize) |
| 218 ->equals(AnimatableDouble::create(3).get())); | 218 ->equals(AnimatableDouble::create(3).get())); |
| 219 EXPECT_EQ(1u, sampledEffectCount()); | 219 EXPECT_EQ(1u, sampledEffectCount()); |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace blink | 222 } // namespace blink |
| OLD | NEW |