summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-15 14:06:42 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-15 14:06:42 +0200
commit5d2d2cb04363c1c2205420246f13ae60d3c354fe (patch)
tree4547a45ae09623627d3ffbebac932842f169fc01 /dom
parentca6136ffb67b9f4119cc65d1fb0ce388d4fece7c (diff)
downloadUXP-5d2d2cb04363c1c2205420246f13ae60d3c354fe.tar
UXP-5d2d2cb04363c1c2205420246f13ae60d3c354fe.tar.gz
UXP-5d2d2cb04363c1c2205420246f13ae60d3c354fe.tar.lz
UXP-5d2d2cb04363c1c2205420246f13ae60d3c354fe.tar.xz
UXP-5d2d2cb04363c1c2205420246f13ae60d3c354fe.zip
Use a temporary in Animation::Tick()
Diffstat (limited to 'dom')
-rw-r--r--dom/animation/Animation.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/dom/animation/Animation.cpp b/dom/animation/Animation.cpp
index bd318f79e..f4d29376c 100644
--- a/dom/animation/Animation.cpp
+++ b/dom/animation/Animation.cpp
@@ -589,8 +589,10 @@ Animation::Tick()
// during the *previous* tick of the refresh driver, it can still be
// ahead of the *current* timeline time when we are using the
// vsync timer so we need to clamp it to the timeline time.
- mPendingReadyTime.SetValue(std::min(mTimeline->GetCurrentTime().Value(),
- mPendingReadyTime.Value()));
+ TimeDuration currentTime = mTimeline->GetCurrentTime().Value();
+ if (currentTime < mPendingReadyTime.Value()) {
+ mPendingReadyTime.SetValue(currentTime);
+ }
FinishPendingAt(mPendingReadyTime.Value());
mPendingReadyTime.SetNull();
}