diff options
Diffstat (limited to 'dom')
-rw-r--r-- | dom/animation/Animation.cpp | 6 | ||||
-rw-r--r-- | dom/xslt/xslt/txFormatNumberFunctionCall.cpp | 6 |
2 files changed, 10 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(); } diff --git a/dom/xslt/xslt/txFormatNumberFunctionCall.cpp b/dom/xslt/xslt/txFormatNumberFunctionCall.cpp index a4d4b8fb0..674fb553c 100644 --- a/dom/xslt/xslt/txFormatNumberFunctionCall.cpp +++ b/dom/xslt/xslt/txFormatNumberFunctionCall.cpp @@ -265,6 +265,12 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext, value = fabs(value) * multiplier; + // Make sure the multiplier didn't push value to infinity. + if (value == mozilla::PositiveInfinity<double>()) { + return aContext->recycler()->getStringResult(format->mInfinity, + aResult); + } + // Prefix nsAutoString res(prefix); |