Bug 1415780 - Undef GetCurrentTime in the template function that uses Animation::GetCurrentTime. r?
MozReview-Commit-ID: DaOZtYRx4Ud
--- a/layout/style/AnimationCommon.h
+++ b/layout/style/AnimationCommon.h
@@ -298,16 +298,22 @@ ImplCycleCollectionTraverse(nsCycleColle
// Return the TransitionPhase or AnimationPhase to use when the animation
// doesn't have a target effect.
template <typename PhaseType>
PhaseType GetAnimationPhaseWithoutEffect(const dom::Animation& aAnimation)
{
MOZ_ASSERT(!aAnimation.GetEffect(),
"Should only be called when we do not have an effect");
+// GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
+// GetTickCount().
+#ifdef GetCurrentTime
+#undef GetCurrentTime
+#endif
+
Nullable<TimeDuration> currentTime = aAnimation.GetCurrentTime();
if (currentTime.IsNull()) {
return PhaseType::Idle;
}
// If we don't have a target effect, the duration will be zero so the phase is
// 'before' if the current time is less than zero.
return currentTime.Value() < TimeDuration()