Bug 1212720 - Part 3: Remove AnimationTimeline.getAnimations. r=heycam, r=smaug

This commit is contained in:
Hiroyuki Ikezoe 2015-12-21 20:39:00 -05:00
parent 37a12aa90b
commit f1fe349347
3 changed files with 0 additions and 46 deletions

View File

@ -34,48 +34,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationTimeline)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
void
AnimationTimeline::GetAnimations(AnimationSequence& aAnimations)
{
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(mWindow);
if (mWindow) {
nsIDocument* doc = window->GetDoc();
if (doc) {
doc->FlushPendingNotifications(Flush_Style);
}
}
aAnimations.SetCapacity(mAnimations.Count());
for (Animation* animation = mAnimationOrder.getFirst(); animation;
animation = animation->getNext()) {
// Skip animations which are no longer relevant or which have been
// associated with another timeline. These animations will be removed
// on the next tick.
if (!animation->IsRelevant() || animation->GetTimeline() != this) {
continue;
}
// Bug 1174575: Until we implement a suitable PseudoElement interface we
// don't have anything to return for the |target| attribute of
// KeyframeEffect(ReadOnly) objects that refer to pseudo-elements.
// Rather than return some half-baked version of these objects (e.g.
// we a null effect attribute) we simply don't provide access to animations
// whose effect refers to a pseudo-element until we can support them
// properly.
Element* target;
nsCSSPseudoElements::Type pseudoType;
animation->GetEffect()->GetTarget(target, pseudoType);
if (pseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement) {
aAnimations.AppendElement(animation);
}
}
// Sort animations by priority
aAnimations.Sort(AnimationPtrComparator<RefPtr<Animation>>());
}
void
AnimationTimeline::NotifyAnimationUpdated(Animation& aAnimation)
{

View File

@ -51,11 +51,8 @@ public:
nsIGlobalObject* GetParentObject() const { return mWindow; }
typedef nsTArray<RefPtr<Animation>> AnimationSequence;
// AnimationTimeline methods
virtual Nullable<TimeDuration> GetCurrentTime() const = 0;
void GetAnimations(AnimationSequence& aAnimations);
// Wrapper functions for AnimationTimeline DOM methods when called from
// script.

View File

@ -14,5 +14,4 @@
interface AnimationTimeline {
[BinaryName="currentTimeAsDouble"]
readonly attribute double? currentTime;
sequence<Animation> getAnimations ();
};