зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1422248 - Don't reject promises of dispatch cancel events when canceling idle animations; r=hiro
MozReview-Commit-ID: EGg6Ntj0loq --HG-- extra : rebase_source : 8edd6fdd73440fe55fd8be1d524767fdaf55b872
This commit is contained in:
Родитель
fc1a84d3a9
Коммит
22ca1231e8
|
@ -786,14 +786,16 @@ Animation::SilentlySetPlaybackRate(double aPlaybackRate)
|
|||
void
|
||||
Animation::CancelNoUpdate()
|
||||
{
|
||||
ResetPendingTasks();
|
||||
if (PlayState() != AnimationPlayState::Idle) {
|
||||
ResetPendingTasks();
|
||||
|
||||
if (mFinished) {
|
||||
mFinished->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
|
||||
if (mFinished) {
|
||||
mFinished->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
|
||||
}
|
||||
ResetFinishedPromise();
|
||||
|
||||
DispatchPlaybackEvent(NS_LITERAL_STRING("cancel"));
|
||||
}
|
||||
ResetFinishedPromise();
|
||||
|
||||
DispatchPlaybackEvent(NS_LITERAL_STRING("cancel"));
|
||||
|
||||
StickyTimeDuration activeTime = mEffect
|
||||
? mEffect->GetComputedTiming().mActiveTime
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
[canceling-an-animation.html]
|
||||
type: testharness
|
||||
[The finished promise should NOT be rejected if the animation is already idle]
|
||||
expected: FAIL
|
||||
|
||||
[The cancel event should NOT be fired if the animation is already idle]
|
||||
expected: FAIL
|
Загрузка…
Ссылка в новой задаче