mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1004871 part 5 - Add ComputedTiming data structure; r=dholbert
This patch adds a ComputedTiming struct for storing the results of calculating the timing properties of an animation at a given sample time.
This commit is contained in:
parent
b0f0bab622
commit
c9cad0a5c8
@ -362,6 +362,10 @@ ComputedTimingFunction::GetValue(double aPortion) const
|
||||
|
||||
} /* end sub-namespace css */
|
||||
|
||||
// In the Web Animations model, the time fraction can be outside the range
|
||||
// [0.0, 1.0] but it shouldn't be Infinity.
|
||||
const double ComputedTiming::kNullTimeFraction = NS_IEEEPositiveInfinity();
|
||||
|
||||
bool
|
||||
ElementAnimation::IsRunningAt(TimeStamp aTime) const
|
||||
{
|
||||
|
@ -243,6 +243,37 @@ struct AnimationTiming
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Stores the results of calculating the timing properties of an animation
|
||||
* at a given sample time.
|
||||
*/
|
||||
struct ComputedTiming
|
||||
{
|
||||
ComputedTiming()
|
||||
: mTimeFraction(kNullTimeFraction),
|
||||
mCurrentIteration(0)
|
||||
{ }
|
||||
|
||||
static const double kNullTimeFraction;
|
||||
|
||||
// Will be kNullTimeFraction if the animation is neither animating nor
|
||||
// filling at the sampled time.
|
||||
double mTimeFraction;
|
||||
|
||||
// Zero-based iteration index (meaningless if mTimeFraction is
|
||||
// kNullTimeFraction).
|
||||
uint64_t mCurrentIteration;
|
||||
|
||||
enum {
|
||||
// Sampled prior to the start of the active interval
|
||||
AnimationPhase_Before,
|
||||
// Sampled within the active interval
|
||||
AnimationPhase_Active,
|
||||
// Sampled after (or at) the end of the active interval
|
||||
AnimationPhase_After
|
||||
} mPhase;
|
||||
};
|
||||
|
||||
/**
|
||||
* Data about one animation (i.e., one of the values of
|
||||
* 'animation-name') running on an element.
|
||||
|
Loading…
Reference in New Issue
Block a user