gecko-dev/dom/animation
Boris Chiou 5272e5d351 Bug 1706157 - Avoid int overflow for steps() timing function. r=hiro
We increase |jumps| for steps(<integer>,jump-both), and the <integer>
could be a large number, so we have to avoid the int overflow. Now we use
CheckedInt32 for it.

Also, `aPortion * aStepFunc.mSteps` may be out of the range of int32_t,
so we clamp it first and use CheckedInt32 for currentStep, too.

The error handling is pretty simple. We don't care about the result of
this unexpected behavior, so we simply roll the value back to the
original one.

Differential Revision: https://phabricator.services.mozilla.com/D112684
2021-05-03 23:07:03 +00:00
..
test
Animation.cpp
Animation.h
AnimationComparator.h
AnimationEffect.cpp
AnimationEffect.h
AnimationEventDispatcher.cpp
AnimationEventDispatcher.h
AnimationPerformanceWarning.cpp
AnimationPerformanceWarning.h
AnimationPropertySegment.h
AnimationTarget.h
AnimationTimeline.cpp
AnimationTimeline.h
AnimationUtils.cpp
AnimationUtils.h
ComputedTiming.h
ComputedTimingFunction.cpp
ComputedTimingFunction.h
CSSAnimation.cpp
CSSAnimation.h
CSSPseudoElement.cpp
CSSPseudoElement.h
CSSTransition.cpp
CSSTransition.h
DocumentTimeline.cpp
DocumentTimeline.h
EffectCompositor.cpp
EffectCompositor.h
EffectSet.cpp
EffectSet.h
Keyframe.h
KeyframeEffect.cpp
KeyframeEffect.h
KeyframeEffectParams.h
KeyframeUtils.cpp
KeyframeUtils.h
moz.build
PendingAnimationTracker.cpp
PendingAnimationTracker.h
PostRestyleMode.h
PseudoElementHashEntry.h
TimingParams.cpp
TimingParams.h