mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1036287 part 1 - Add a null animation phase; r=dholbert
In order to support arbitrary timelines which may provide a "null" current time, we need a suitable value to return from GetComputedTimingAt for the animation's phase when the timeline time is null. This patch introduces a null animation phase for this purpose.
This commit is contained in:
parent
f0c19226a1
commit
adc58299de
@ -270,17 +270,13 @@ struct AnimationTiming
|
||||
/**
|
||||
* Stores the results of calculating the timing properties of an animation
|
||||
* at a given sample time.
|
||||
*
|
||||
* The members of a default-constructed object of this type are not meaningful.
|
||||
* Rather, this object is intended to be used as the return value of
|
||||
* ElementAnimation::GetComputedTimingAt which ensures all members are set
|
||||
* correctly.
|
||||
*/
|
||||
struct ComputedTiming
|
||||
{
|
||||
ComputedTiming()
|
||||
: mTimeFraction(kNullTimeFraction),
|
||||
mCurrentIteration(0)
|
||||
: mTimeFraction(kNullTimeFraction)
|
||||
, mCurrentIteration(0)
|
||||
, mPhase(AnimationPhase_Null)
|
||||
{ }
|
||||
|
||||
static const double kNullTimeFraction;
|
||||
@ -298,6 +294,8 @@ struct ComputedTiming
|
||||
uint64_t mCurrentIteration;
|
||||
|
||||
enum {
|
||||
// Not sampled (null sample time)
|
||||
AnimationPhase_Null,
|
||||
// Sampled prior to the start of the active interval
|
||||
AnimationPhase_Before,
|
||||
// Sampled within the active interval
|
||||
|
@ -48,6 +48,7 @@ nsAnimationManager::GetEventsAt(ElementAnimationCollection* aCollection,
|
||||
ElementAnimation::GetComputedTimingAt(localTime, anim->mTiming);
|
||||
|
||||
switch (computedTiming.mPhase) {
|
||||
case ComputedTiming::AnimationPhase_Null:
|
||||
case ComputedTiming::AnimationPhase_Before:
|
||||
// Do nothing
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user