mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1004871 part 11 - Move ElementAnimation members closer together for readability and packing; r=dholbert
Also shuffle the initialization of members in nsAnimationManager::BuildAnimations to roughly match the order in which they are declared (with the exception that mPlayState needs to be set before calling IsPaused() which is used to set mPauseStart).
This commit is contained in:
parent
5a990f0766
commit
4af2cc49f7
@ -295,10 +295,6 @@ struct ElementAnimation
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsString mName; // empty string for 'none'
|
||||
AnimationTiming mTiming;
|
||||
uint8_t mPlayState;
|
||||
|
||||
bool IsPaused() const {
|
||||
return mPlayState == NS_STYLE_ANIMATION_PLAY_STATE_PAUSED;
|
||||
}
|
||||
@ -323,12 +319,15 @@ struct ElementAnimation
|
||||
static ComputedTiming GetComputedTimingAt(TimeDuration aElapsedDuration,
|
||||
const AnimationTiming& aTiming);
|
||||
|
||||
nsString mName; // empty string for 'none'
|
||||
AnimationTiming mTiming;
|
||||
// The beginning of the delay period. This is also used by
|
||||
// ElementPropertyTransition in its IsRemovedSentinel and
|
||||
// SetRemovedSentinel methods.
|
||||
mozilla::TimeStamp mStartTime;
|
||||
mozilla::TimeStamp mPauseStart;
|
||||
mozilla::TimeDuration mDelay;
|
||||
uint8_t mPlayState;
|
||||
bool mIsRunningOnCompositor;
|
||||
|
||||
enum {
|
||||
|
@ -688,15 +688,15 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext,
|
||||
dest->mTiming.mIterationCount = src.GetIterationCount();
|
||||
dest->mTiming.mDirection = src.GetDirection();
|
||||
dest->mTiming.mFillMode = src.GetFillMode();
|
||||
dest->mPlayState = src.GetPlayState();
|
||||
|
||||
dest->mDelay = TimeDuration::FromMilliseconds(src.GetDelay());
|
||||
dest->mStartTime = now;
|
||||
dest->mPlayState = src.GetPlayState();
|
||||
if (dest->IsPaused()) {
|
||||
dest->mPauseStart = now;
|
||||
} else {
|
||||
dest->mPauseStart = TimeStamp();
|
||||
}
|
||||
dest->mDelay = TimeDuration::FromMilliseconds(src.GetDelay());
|
||||
|
||||
nsCSSKeyframesRule* rule =
|
||||
mPresContext->StyleSet()->KeyframesRuleForName(mPresContext,
|
||||
|
Loading…
Reference in New Issue
Block a user