Bug 1145246, part 1 - Rename Animatable.getAnimationPlayers() to Animatable.getAnimations(), but leave the old name an an alias for the new. r=birtles, r=smaug

This commit is contained in:
Jonathan Watt 2015-03-20 18:20:32 +00:00
parent a71fdfc5b9
commit e97c060d13
4 changed files with 12 additions and 4 deletions

View File

@ -3186,7 +3186,7 @@ Element::MozRequestPointerLock()
}
void
Element::GetAnimationPlayers(nsTArray<nsRefPtr<AnimationPlayer> >& aPlayers)
Element::GetAnimations(nsTArray<nsRefPtr<AnimationPlayer> >& aAnimations)
{
nsIDocument* doc = GetComposedDoc();
if (doc) {
@ -3208,7 +3208,7 @@ Element::GetAnimationPlayers(nsTArray<nsRefPtr<AnimationPlayer> >& aPlayers)
playerIdx++) {
AnimationPlayer* player = collection->mPlayers[playerIdx];
if (player->IsRelevant()) {
aPlayers.AppendElement(player);
aAnimations.AppendElement(player);
}
}
}

View File

@ -808,7 +808,11 @@ public:
{
}
void GetAnimationPlayers(nsTArray<nsRefPtr<AnimationPlayer> >& aPlayers);
void GetAnimations(nsTArray<nsRefPtr<AnimationPlayer> >& aAnimations);
// Temporary alias (bug 1145246)
void GetAnimationPlayers(nsTArray<nsRefPtr<AnimationPlayer> >& aAnimations) {
GetAnimations(aAnimations);
}
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
virtual void SetInnerHTML(const nsAString& aInnerHTML, ErrorResult& aError);

View File

@ -12,6 +12,10 @@
[NoInterfaceObject]
interface Animatable {
// Temporary alias for getAnimations (bug 1145246)
[Func="nsDocument::IsWebAnimationsEnabled"]
sequence<AnimationPlayer> getAnimationPlayers();
[Func="nsDocument::IsWebAnimationsEnabled"]
sequence<AnimationPlayer> getAnimations();
};

View File

@ -16,5 +16,5 @@ interface AnimationTimeline {
readonly attribute double? currentTime;
// Not yet implemented:
// AnimationPlayer play (optional TimedItem? source = null);
// sequence<AnimationPlayer> getAnimationPlayers ();
// sequence<AnimationPlayer> getAnimations ();
};