mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
0ccb78c213
- Bug 1212720 - Part 1: Implement Document.getAnimations(). r=heycam, r=smaug (8c3951b318) - Bug 1212720 - Part 2: Tests for document.getAnimations. r=heycam (8e6660abe1) - Bug 1212720 - Part 3: Remove AnimationTimeline.getAnimations. r=heycam, r=smaug (a663e7e79b) - Bug 1212720 - Part 4: Remove all cancelAllAnimationsOnEnd. It is not needed any more. r=bbirtles (8c9b92f2d4) - Bug 1218258 - Fix -Wimplicit-fallthrough warnings in toolkit/components/downloads. r=paolo (1962eee4fc) - Bug 1218258 - Fix -Wshadow warnings in toolkit/components/downloads. r=paolo (6cf1d464bb) - Bug 1212323: P1. Use a 640x360 SPS to test for HW decoding support. r=cpearce (ed67910d9c) - Bug 1212323: P2. Have IsVideoAccelerated return a Promise. r=cpearce (824e543945) - Bug 1240365 - FileReader should use the global scope correctly in ChromeWorkers, r=smaug, r=khuey (bf40380947) - Bug 1239210 - Don't process WebIDL files when not compiling; r=glandium (5a55f23b2e)
64 lines
1.9 KiB
C++
64 lines
1.9 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "AnimationTimeline.h"
|
|
#include "mozilla/AnimationComparator.h"
|
|
#include "mozilla/dom/Animation.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(AnimationTimeline)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AnimationTimeline)
|
|
tmp->mAnimationOrder.clear();
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow, mAnimations)
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(AnimationTimeline)
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindow, mAnimations)
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(AnimationTimeline)
|
|
|
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(AnimationTimeline)
|
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(AnimationTimeline)
|
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationTimeline)
|
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
|
NS_INTERFACE_MAP_END
|
|
|
|
void
|
|
AnimationTimeline::NotifyAnimationUpdated(Animation& aAnimation)
|
|
{
|
|
if (mAnimations.Contains(&aAnimation)) {
|
|
return;
|
|
}
|
|
|
|
if (aAnimation.GetTimeline() && aAnimation.GetTimeline() != this) {
|
|
aAnimation.GetTimeline()->RemoveAnimation(&aAnimation);
|
|
}
|
|
|
|
mAnimations.PutEntry(&aAnimation);
|
|
mAnimationOrder.insertBack(&aAnimation);
|
|
}
|
|
|
|
void
|
|
AnimationTimeline::RemoveAnimation(Animation* aAnimation)
|
|
{
|
|
MOZ_ASSERT(!aAnimation->GetTimeline() || aAnimation->GetTimeline() == this);
|
|
if (aAnimation->isInList()) {
|
|
aAnimation->remove();
|
|
}
|
|
mAnimations.RemoveEntry(aAnimation);
|
|
}
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|