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

Side by Side Diff: third_party/WebKit/Source/core/animation/AnimationStackTest.cpp

Issue 1701853002: Code clean up: Rename SampledEffect variables to sampledEffect instead of effect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_refCountPSKs
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/animation/AnimationStack.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "core/animation/AnimationStack.h" 5 #include "core/animation/AnimationStack.h"
6 6
7 #include "core/animation/AnimationClock.h" 7 #include "core/animation/AnimationClock.h"
8 #include "core/animation/AnimationTimeline.h" 8 #include "core/animation/AnimationTimeline.h"
9 #include "core/animation/ElementAnimations.h" 9 #include "core/animation/ElementAnimations.h"
10 #include "core/animation/KeyframeEffectModel.h" 10 #include "core/animation/KeyframeEffectModel.h"
(...skipping 22 matching lines...) Expand all
33 animation->update(TimingUpdateOnDemand); 33 animation->update(TimingUpdateOnDemand);
34 return animation; 34 return animation;
35 } 35 }
36 36
37 void updateTimeline(double time) 37 void updateTimeline(double time)
38 { 38 {
39 document->animationClock().updateTime(document->timeline().zeroTime() + time); 39 document->animationClock().updateTime(document->timeline().zeroTime() + time);
40 timeline->serviceAnimations(TimingUpdateForAnimationFrame); 40 timeline->serviceAnimations(TimingUpdateForAnimationFrame);
41 } 41 }
42 42
43 const HeapVector<Member<SampledEffect>>& effects()
44 {
45 return element->ensureElementAnimations().animationStack().m_effects;
46 }
47
48 EffectModel* makeEffectModel(CSSPropertyID id, PassRefPtr<AnimatableValue> v alue) 43 EffectModel* makeEffectModel(CSSPropertyID id, PassRefPtr<AnimatableValue> v alue)
49 { 44 {
50 AnimatableValueKeyframeVector keyframes(2); 45 AnimatableValueKeyframeVector keyframes(2);
51 keyframes[0] = AnimatableValueKeyframe::create(); 46 keyframes[0] = AnimatableValueKeyframe::create();
52 keyframes[0]->setOffset(0.0); 47 keyframes[0]->setOffset(0.0);
53 keyframes[0]->setPropertyValue(id, value.get()); 48 keyframes[0]->setPropertyValue(id, value.get());
54 keyframes[1] = AnimatableValueKeyframe::create(); 49 keyframes[1] = AnimatableValueKeyframe::create();
55 keyframes[1]->setOffset(1.0); 50 keyframes[1]->setOffset(1.0);
56 keyframes[1]->setPropertyValue(id, value.get()); 51 keyframes[1]->setPropertyValue(id, value.get());
57 return AnimatableValueKeyframeEffectModel::create(keyframes); 52 return AnimatableValueKeyframeEffectModel::create(keyframes);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority ); 121 ActiveInterpolationsMap result = AnimationStack::activeInterpolations(&eleme nt->elementAnimations()->animationStack(), 0, 0, KeyframeEffect::DefaultPriority );
127 EXPECT_EQ(1u, result.size()); 122 EXPECT_EQ(1u, result.size());
128 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(1).get())); 123 EXPECT_TRUE(interpolationValue(result, CSSPropertyFontSize)->equals(Animatab leDouble::create(1).get()));
129 124
130 animation->setEffect(0); 125 animation->setEffect(0);
131 result = AnimationStack::activeInterpolations(&element->elementAnimations()- >animationStack(), 0, 0, KeyframeEffect::DefaultPriority); 126 result = AnimationStack::activeInterpolations(&element->elementAnimations()- >animationStack(), 0, 0, KeyframeEffect::DefaultPriority);
132 EXPECT_EQ(0u, result.size()); 127 EXPECT_EQ(0u, result.size());
133 } 128 }
134 129
135 } // namespace blink 130 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/AnimationStack.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698