mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1208938 part 2 - Remove Animation::HasEndEventToQueue; r=heycam
This commit is contained in:
parent
9590e60a48
commit
0ea5e5c7c8
@ -581,8 +581,7 @@ Animation::ComposeStyle(nsRefPtr<AnimValuesStyleRule>& aStyleRule,
|
||||
|
||||
AnimationPlayState playState = PlayState();
|
||||
if (playState == AnimationPlayState::Running ||
|
||||
playState == AnimationPlayState::Pending ||
|
||||
HasEndEventToQueue()) {
|
||||
playState == AnimationPlayState::Pending) {
|
||||
aStyleChanging = true;
|
||||
}
|
||||
|
||||
|
@ -293,19 +293,6 @@ public:
|
||||
nsCSSPropertySet& aSetProperties,
|
||||
bool& aStyleChanging);
|
||||
|
||||
|
||||
// FIXME: Because we currently determine if we need refresh driver ticks
|
||||
// during restyling (specifically ComposeStyle above) and not necessarily
|
||||
// during a refresh driver tick, we can arrive at a situation where we
|
||||
// have finished running an animation but are waiting until the next tick
|
||||
// to queue the final end event. This method tells us when we are in that
|
||||
// situation so we can avoid unregistering from the refresh driver until
|
||||
// we've finished dispatching events.
|
||||
//
|
||||
// This is a temporary measure until bug 1195180 is done and we can do all
|
||||
// our registering and unregistering within a tick callback.
|
||||
virtual bool HasEndEventToQueue() const { return false; }
|
||||
|
||||
void NotifyEffectTimingUpdated();
|
||||
|
||||
protected:
|
||||
|
@ -275,21 +275,6 @@ CSSAnimation::QueueEvents()
|
||||
this));
|
||||
}
|
||||
|
||||
bool
|
||||
CSSAnimation::HasEndEventToQueue() const
|
||||
{
|
||||
if (!mEffect) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wasActive = mPreviousPhaseOrIteration != PREVIOUS_PHASE_BEFORE &&
|
||||
mPreviousPhaseOrIteration != PREVIOUS_PHASE_AFTER;
|
||||
bool isActive = mEffect->GetComputedTiming().mPhase ==
|
||||
ComputedTiming::AnimationPhase_Active;
|
||||
|
||||
return wasActive && !isActive;
|
||||
}
|
||||
|
||||
CommonAnimationManager*
|
||||
CSSAnimation::GetAnimationManager() const
|
||||
{
|
||||
|
@ -126,7 +126,6 @@ public:
|
||||
|
||||
void Tick() override;
|
||||
void QueueEvents();
|
||||
bool HasEndEventToQueue() const override;
|
||||
|
||||
bool IsStylePaused() const { return mIsStylePaused; }
|
||||
|
||||
|
@ -155,17 +155,6 @@ CSSTransition::QueueEvents()
|
||||
this));
|
||||
}
|
||||
|
||||
bool
|
||||
CSSTransition::HasEndEventToQueue() const
|
||||
{
|
||||
if (!mEffect) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !mWasFinishedOnLastTick &&
|
||||
PlayState() == AnimationPlayState::Finished;
|
||||
}
|
||||
|
||||
void
|
||||
CSSTransition::Tick()
|
||||
{
|
||||
|
@ -164,7 +164,6 @@ protected:
|
||||
SyncNotifyFlag aSyncNotifyFlag) override;
|
||||
|
||||
void QueueEvents();
|
||||
bool HasEndEventToQueue() const override;
|
||||
|
||||
// The (pseudo-)element whose computed transition-property refers to this
|
||||
// transition (if any).
|
||||
|
Loading…
Reference in New Issue
Block a user