mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
parent
c8ee9f4f48
commit
901d2a277f
11 changed files with 99 additions and 73 deletions
|
|
@ -787,12 +787,21 @@ Animation::CancelNoUpdate()
|
|||
mHoldTime.SetNull();
|
||||
mStartTime.SetNull();
|
||||
|
||||
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
|
||||
|
||||
if (mTimeline) {
|
||||
mTimeline->RemoveAnimation(this);
|
||||
}
|
||||
MaybeQueueCancelEvent(activeTime);
|
||||
|
||||
// When an animation is cancelled it no longer needs further ticks from the
|
||||
// timeline. However, if we queued a cancel event and this was the last
|
||||
// animation attached to the timeline, the timeline will stop observing the
|
||||
// refresh driver and there may be no subsequent refresh driver tick for
|
||||
// dispatching the queued event.
|
||||
//
|
||||
// By calling UpdateTiming *after* removing ourselves from our timeline, we
|
||||
// ensure the timeline will register with the refresh driver for at least one
|
||||
// more tick.
|
||||
UpdateTiming(SeekFlag::NoSeek, SyncNotifyFlag::Async);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -64,12 +64,12 @@ struct ComputedTiming
|
|||
}
|
||||
|
||||
enum class AnimationPhase {
|
||||
Null, // Not sampled (null sample time)
|
||||
Idle, // Not sampled (null sample time)
|
||||
Before, // Sampled prior to the start of the active interval
|
||||
Active, // Sampled within the active interval
|
||||
After // Sampled after (or at) the end of the active interval
|
||||
};
|
||||
AnimationPhase mPhase = AnimationPhase::Null;
|
||||
AnimationPhase mPhase = AnimationPhase::Idle;
|
||||
|
||||
ComputedTimingFunction::BeforeFlag mBeforeFlag =
|
||||
ComputedTimingFunction::BeforeFlag::Unset;
|
||||
|
|
|
|||
|
|
@ -694,6 +694,7 @@ GK_ATOM(onadapterremoved, "onadapterremoved")
|
|||
GK_ATOM(onafterprint, "onafterprint")
|
||||
GK_ATOM(onafterscriptexecute, "onafterscriptexecute")
|
||||
GK_ATOM(onalerting, "onalerting")
|
||||
GK_ATOM(onanimationcancel, "onanimationcancel")
|
||||
GK_ATOM(onanimationend, "onanimationend")
|
||||
GK_ATOM(onanimationiteration, "onanimationiteration")
|
||||
GK_ATOM(onanimationstart, "onanimationstart")
|
||||
|
|
|
|||
|
|
@ -1023,6 +1023,10 @@ EVENT(animationiteration,
|
|||
eAnimationIteration,
|
||||
EventNameType_All,
|
||||
eAnimationEventClass)
|
||||
EVENT(animationcancel,
|
||||
eAnimationCancel,
|
||||
EventNameType_All,
|
||||
eAnimationEventClass)
|
||||
|
||||
// Webkit-prefixed versions of Transition & Animation events, for web compat:
|
||||
EVENT(webkitAnimationEnd,
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ interface GlobalEventHandlers {
|
|||
attribute EventHandler onmozpointerlockerror;
|
||||
|
||||
// CSS-Animation and CSS-Transition handlers.
|
||||
attribute EventHandler onanimationcancel;
|
||||
attribute EventHandler onanimationend;
|
||||
attribute EventHandler onanimationiteration;
|
||||
attribute EventHandler onanimationstart;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue