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

Unified Diff: Source/core/animation/TimingCalculations.h

Issue 1113173003: Web Animations: Update naming to reflect spec changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: No, really. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/Timing.idl ('k') | Source/core/animation/TimingCalculationsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/TimingCalculations.h
diff --git a/Source/core/animation/TimingCalculations.h b/Source/core/animation/TimingCalculations.h
index 12a5d38de2e9e8cb3aaeaf7e5f842f4ad9c81a39..f0dd31c78763dfb94347b6b53690ecab9a5ce665 100644
--- a/Source/core/animation/TimingCalculations.h
+++ b/Source/core/animation/TimingCalculations.h
@@ -31,7 +31,7 @@
#ifndef TimingCalculations_h
#define TimingCalculations_h
-#include "core/animation/AnimationNode.h"
+#include "core/animation/AnimationEffect.h"
#include "core/animation/Timing.h"
#include "platform/animation/AnimationUtilities.h"
#include "wtf/MathExtras.h"
@@ -45,26 +45,26 @@ static inline double multiplyZeroAlwaysGivesZero(double x, double y)
return x && y ? x * y : 0;
}
-static inline AnimationNode::Phase calculatePhase(double activeDuration, double localTime, const Timing& specified)
+static inline AnimationEffect::Phase calculatePhase(double activeDuration, double localTime, const Timing& specified)
{
ASSERT(activeDuration >= 0);
if (isNull(localTime))
- return AnimationNode::PhaseNone;
+ return AnimationEffect::PhaseNone;
if (localTime < specified.startDelay)
- return AnimationNode::PhaseBefore;
+ return AnimationEffect::PhaseBefore;
if (localTime >= specified.startDelay + activeDuration)
- return AnimationNode::PhaseAfter;
- return AnimationNode::PhaseActive;
+ return AnimationEffect::PhaseAfter;
+ return AnimationEffect::PhaseActive;
}
-static inline bool isActiveInParentPhase(AnimationNode::Phase parentPhase, Timing::FillMode fillMode)
+static inline bool isActiveInParentPhase(AnimationEffect::Phase parentPhase, Timing::FillMode fillMode)
{
switch (parentPhase) {
- case AnimationNode::PhaseBefore:
+ case AnimationEffect::PhaseBefore:
return fillMode == Timing::FillModeBackwards || fillMode == Timing::FillModeBoth;
- case AnimationNode::PhaseActive:
+ case AnimationEffect::PhaseActive:
return true;
- case AnimationNode::PhaseAfter:
+ case AnimationEffect::PhaseAfter:
return fillMode == Timing::FillModeForwards || fillMode == Timing::FillModeBoth;
default:
ASSERT_NOT_REACHED();
@@ -72,25 +72,25 @@ static inline bool isActiveInParentPhase(AnimationNode::Phase parentPhase, Timin
}
}
-static inline double calculateActiveTime(double activeDuration, Timing::FillMode fillMode, double localTime, AnimationNode::Phase parentPhase, AnimationNode::Phase phase, const Timing& specified)
+static inline double calculateActiveTime(double activeDuration, Timing::FillMode fillMode, double localTime, AnimationEffect::Phase parentPhase, AnimationEffect::Phase phase, const Timing& specified)
{
ASSERT(activeDuration >= 0);
ASSERT(phase == calculatePhase(activeDuration, localTime, specified));
switch (phase) {
- case AnimationNode::PhaseBefore:
+ case AnimationEffect::PhaseBefore:
if (fillMode == Timing::FillModeBackwards || fillMode == Timing::FillModeBoth)
return 0;
return nullValue();
- case AnimationNode::PhaseActive:
+ case AnimationEffect::PhaseActive:
if (isActiveInParentPhase(parentPhase, fillMode))
return localTime - specified.startDelay;
return nullValue();
- case AnimationNode::PhaseAfter:
+ case AnimationEffect::PhaseAfter:
if (fillMode == Timing::FillModeForwards || fillMode == Timing::FillModeBoth)
return activeDuration;
return nullValue();
- case AnimationNode::PhaseNone:
+ case AnimationEffect::PhaseNone:
ASSERT(isNull(localTime));
return nullValue();
default:
« no previous file with comments | « Source/core/animation/Timing.idl ('k') | Source/core/animation/TimingCalculationsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698