mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +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();
|
AnimationPlayState playState = PlayState();
|
||||||
if (playState == AnimationPlayState::Running ||
|
if (playState == AnimationPlayState::Running ||
|
||||||
playState == AnimationPlayState::Pending ||
|
playState == AnimationPlayState::Pending) {
|
||||||
HasEndEventToQueue()) {
|
|
||||||
aStyleChanging = true;
|
aStyleChanging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,19 +293,6 @@ public:
|
|||||||
nsCSSPropertySet& aSetProperties,
|
nsCSSPropertySet& aSetProperties,
|
||||||
bool& aStyleChanging);
|
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();
|
void NotifyEffectTimingUpdated();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -275,21 +275,6 @@ CSSAnimation::QueueEvents()
|
|||||||
this));
|
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*
|
CommonAnimationManager*
|
||||||
CSSAnimation::GetAnimationManager() const
|
CSSAnimation::GetAnimationManager() const
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,6 @@ public:
|
|||||||
|
|
||||||
void Tick() override;
|
void Tick() override;
|
||||||
void QueueEvents();
|
void QueueEvents();
|
||||||
bool HasEndEventToQueue() const override;
|
|
||||||
|
|
||||||
bool IsStylePaused() const { return mIsStylePaused; }
|
bool IsStylePaused() const { return mIsStylePaused; }
|
||||||
|
|
||||||
|
@ -155,17 +155,6 @@ CSSTransition::QueueEvents()
|
|||||||
this));
|
this));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
CSSTransition::HasEndEventToQueue() const
|
|
||||||
{
|
|
||||||
if (!mEffect) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return !mWasFinishedOnLastTick &&
|
|
||||||
PlayState() == AnimationPlayState::Finished;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CSSTransition::Tick()
|
CSSTransition::Tick()
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,6 @@ protected:
|
|||||||
SyncNotifyFlag aSyncNotifyFlag) override;
|
SyncNotifyFlag aSyncNotifyFlag) override;
|
||||||
|
|
||||||
void QueueEvents();
|
void QueueEvents();
|
||||||
bool HasEndEventToQueue() const override;
|
|
||||||
|
|
||||||
// The (pseudo-)element whose computed transition-property refers to this
|
// The (pseudo-)element whose computed transition-property refers to this
|
||||||
// transition (if any).
|
// transition (if any).
|
||||||
|
Loading…
Reference in New Issue
Block a user