mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1178664 - Part 1 - Make Animation interface EventTarget inheritance. r=smaug (0ea50ab93)
- Bug 1178664 - Part 2 - webidl for AnimationPlaybackEvent. r=smaug (3a5d86f40)
- Bug 1150808 - Implement Animation.reverse(). r=smaug r=birtles (9ce9fc4db)
- Bug 1178664 - Part 3 - Implement Animation.onfinish event. r=bbirtles, r=smaug (9139c4227)
- Bug 1178664 - Part 4 -Implement Animation.oncancel event. r=bbirtles, r=smaug (415b068e6)
- Bug 1175751 - Apply playback rate to compositor animations. r=bbirtles (0ffd9cb90)
- Bug 1181905 - Animation::IsPlaying should check playbackRate != 0 to stop playing on compositor animation. r=bbirtles (e3a2fd2f4)
- Bug 1208385 part 0 - Fix up some references to Web Animations spec; r=heycam (fca9626d4)
- Bug 1203009 part 1 - Rename sequence number to animation index; r=heycam (cd7dc513f)
- Bug 1203009 part 2 - Remove {CSSAnimation,CSSTransition}::OwningElement() getter; r=heycam (4f49c63b1)
- Bug 1203009 part 3 - Add mNeedsNewAnimationIndexWhenRun flag to CSSAnimation and CSSTransition; r=heycam (73a45b5a7)
- Bug 1195523: Use type-safe LinkedList instead of PRCList to manage AnimationCollection objects. r=birtles (35b233981)
- Bug 1194037 part 1 - Make nsAutoAnimationMutationBatch batch multiple elements at once; r=smaug (83f808043)
- Bug 1194037 part 2 - Make WillRefresh no longer call FlushAnimations; r=dholbert (449b0fbd5)
- Bug 1194037 part 3 - Add Animation::HasEndEventToQueue(); r=dholbert (b1ddc33d3)
- ug 1203009 part 4 - Implement new composite ordering; r=heycam (4c571e608)
- Bug 1203009 part 5 - Remove IsUsingCustomCompositeOrder; r=heycam (242d0142c)
- Bug 1203009 part 6 - Add tests for new composite order; r=heycam (5f8711177)
This commit is contained in:
@@ -362,19 +362,18 @@ nsAnimationReceiver::RecordAnimationMutation(Animation* aAnimation,
|
||||
}
|
||||
|
||||
if (nsAutoAnimationMutationBatch::IsBatching()) {
|
||||
if (nsAutoAnimationMutationBatch::GetBatchTarget() != animationTarget) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (aMutationType) {
|
||||
case eAnimationMutation_Added:
|
||||
nsAutoAnimationMutationBatch::AnimationAdded(aAnimation);
|
||||
nsAutoAnimationMutationBatch::AnimationAdded(aAnimation,
|
||||
animationTarget);
|
||||
break;
|
||||
case eAnimationMutation_Changed:
|
||||
nsAutoAnimationMutationBatch::AnimationChanged(aAnimation);
|
||||
nsAutoAnimationMutationBatch::AnimationChanged(aAnimation,
|
||||
animationTarget);
|
||||
break;
|
||||
case eAnimationMutation_Removed:
|
||||
nsAutoAnimationMutationBatch::AnimationRemoved(aAnimation);
|
||||
nsAutoAnimationMutationBatch::AnimationRemoved(aAnimation,
|
||||
animationTarget);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1031,32 +1030,46 @@ nsAutoAnimationMutationBatch::Done()
|
||||
return;
|
||||
}
|
||||
|
||||
sCurrentBatch = mPreviousBatch;
|
||||
sCurrentBatch = nullptr;
|
||||
if (mObservers.IsEmpty()) {
|
||||
nsDOMMutationObserver::LeaveMutationHandling();
|
||||
// Nothing to do.
|
||||
return;
|
||||
}
|
||||
|
||||
for (nsDOMMutationObserver* ob : mObservers) {
|
||||
nsRefPtr<nsDOMMutationRecord> m =
|
||||
new nsDOMMutationRecord(nsGkAtoms::animations, ob->GetParentObject());
|
||||
m->mTarget = mBatchTarget;
|
||||
mBatchTargets.Sort(TreeOrderComparator());
|
||||
|
||||
for (const Entry& e : mEntries) {
|
||||
if (e.mState == eState_Added) {
|
||||
m->mAddedAnimations.AppendElement(e.mAnimation);
|
||||
} else if (e.mState == eState_Removed) {
|
||||
m->mRemovedAnimations.AppendElement(e.mAnimation);
|
||||
} else if (e.mState == eState_RemainedPresent && e.mChanged) {
|
||||
m->mChangedAnimations.AppendElement(e.mAnimation);
|
||||
for (nsDOMMutationObserver* ob : mObservers) {
|
||||
bool didAddRecords = false;
|
||||
|
||||
for (nsINode* target : mBatchTargets) {
|
||||
EntryArray* entries = mEntryTable.Get(target);
|
||||
MOZ_ASSERT(entries,
|
||||
"Targets in entry table and targets list should match");
|
||||
|
||||
nsRefPtr<nsDOMMutationRecord> m =
|
||||
new nsDOMMutationRecord(nsGkAtoms::animations, ob->GetParentObject());
|
||||
m->mTarget = target;
|
||||
|
||||
for (const Entry& e : *entries) {
|
||||
if (e.mState == eState_Added) {
|
||||
m->mAddedAnimations.AppendElement(e.mAnimation);
|
||||
} else if (e.mState == eState_Removed) {
|
||||
m->mRemovedAnimations.AppendElement(e.mAnimation);
|
||||
} else if (e.mState == eState_RemainedPresent && e.mChanged) {
|
||||
m->mChangedAnimations.AppendElement(e.mAnimation);
|
||||
}
|
||||
}
|
||||
|
||||
if (!m->mAddedAnimations.IsEmpty() ||
|
||||
!m->mChangedAnimations.IsEmpty() ||
|
||||
!m->mRemovedAnimations.IsEmpty()) {
|
||||
ob->AppendMutationRecord(m.forget());
|
||||
didAddRecords = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m->mAddedAnimations.IsEmpty() ||
|
||||
!m->mChangedAnimations.IsEmpty() ||
|
||||
!m->mRemovedAnimations.IsEmpty()) {
|
||||
ob->AppendMutationRecord(m.forget());
|
||||
if (didAddRecords) {
|
||||
ob->ScheduleForRun();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user