summaryrefslogtreecommitdiffstats
path: root/layout/style/nsTransitionManager.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-14 11:45:38 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-14 11:45:38 +0100
commitaade91b13a50ee4f246016fa8d8d1561f58f80ee (patch)
tree5deac61e124e06478040bedfbb1784b68fc8cc97 /layout/style/nsTransitionManager.cpp
parentdcc00ffadf64270b0ae82431f5b71c527590e91b (diff)
downloadUXP-aade91b13a50ee4f246016fa8d8d1561f58f80ee.tar
UXP-aade91b13a50ee4f246016fa8d8d1561f58f80ee.tar.gz
UXP-aade91b13a50ee4f246016fa8d8d1561f58f80ee.tar.lz
UXP-aade91b13a50ee4f246016fa8d8d1561f58f80ee.tar.xz
UXP-aade91b13a50ee4f246016fa8d8d1561f58f80ee.zip
moebius#89: DOM - implement animationcancel event
Issue #55
Diffstat (limited to 'layout/style/nsTransitionManager.cpp')
-rw-r--r--layout/style/nsTransitionManager.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/layout/style/nsTransitionManager.cpp b/layout/style/nsTransitionManager.cpp
index abb9e2311..118702e8f 100644
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -46,8 +46,6 @@ using mozilla::dom::KeyframeEffectReadOnly;
using namespace mozilla;
using namespace mozilla::css;
-typedef mozilla::ComputedTiming::AnimationPhase AnimationPhase;
-
namespace {
struct TransitionEventParams {
EventMessage mMessage;
@@ -203,7 +201,7 @@ CSSTransition::QueueEvents(StickyTimeDuration aActiveTime)
StickyTimeDuration intervalEndTime;
if (!mEffect) {
- currentPhase = GetTransitionPhaseWithoutEffect();
+ currentPhase = GetAnimationPhaseWithoutEffect<TransitionPhase>(*this);
intervalStartTime = zeroDuration;
intervalEndTime = zeroDuration;
} else {
@@ -329,23 +327,6 @@ CSSTransition::QueueEvents(StickyTimeDuration aActiveTime)
}
}
-CSSTransition::TransitionPhase
-CSSTransition::GetTransitionPhaseWithoutEffect() const
-{
- MOZ_ASSERT(!mEffect, "Should only be called when we do not have an effect");
-
- Nullable<TimeDuration> currentTime = GetCurrentTime();
- if (currentTime.IsNull()) {
- return TransitionPhase::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()
- ? TransitionPhase::Before
- : TransitionPhase::After;
-}
-
void
CSSTransition::Tick()
{