mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1046055 part 2 - Rename AnimationPlayer::IsCurrent to HasCurrentSource; r=dbaron
It's not the player that's "current" (a Web Animations term for an animation that hasn't yet finished), but its source content, if any. This patch renames the method on AnimationPlayer accordingly. At the same time this patch moves the method to the header file since it's quite simple and could possibly benefit from inlining.
This commit is contained in:
parent
46c3ada344
commit
6de21c8b65
@ -2958,7 +2958,7 @@ Element::GetAnimationPlayers(nsTArray<nsRefPtr<AnimationPlayer> >& aPlayers)
|
||||
playerIdx < collection->mPlayers.Length();
|
||||
playerIdx++) {
|
||||
AnimationPlayer* player = collection->mPlayers[playerIdx];
|
||||
if (player->IsCurrent()) {
|
||||
if (player->HasCurrentSource()) {
|
||||
aPlayers.AppendElement(player);
|
||||
}
|
||||
}
|
||||
|
@ -64,12 +64,6 @@ AnimationPlayer::IsRunning() const
|
||||
return computedTiming.mPhase == ComputedTiming::AnimationPhase_Active;
|
||||
}
|
||||
|
||||
bool
|
||||
AnimationPlayer::IsCurrent() const
|
||||
{
|
||||
return GetSource() && GetSource()->IsCurrent();
|
||||
}
|
||||
|
||||
Nullable<TimeDuration>
|
||||
AnimationPlayer::GetCurrentTimeDuration() const
|
||||
{
|
||||
|
@ -64,7 +64,10 @@ public:
|
||||
}
|
||||
|
||||
bool IsRunning() const;
|
||||
bool IsCurrent() const;
|
||||
|
||||
bool HasCurrentSource() const {
|
||||
return GetSource() && GetSource()->IsCurrent();
|
||||
}
|
||||
|
||||
// Return the duration since the start time of the player, taking into
|
||||
// account the pause state. May be negative or null.
|
||||
|
@ -722,7 +722,7 @@ bool
|
||||
AnimationPlayerCollection::HasCurrentAnimations()
|
||||
{
|
||||
for (size_t playerIdx = mPlayers.Length(); playerIdx-- != 0; ) {
|
||||
if (mPlayers[playerIdx]->IsCurrent()) {
|
||||
if (mPlayers[playerIdx]->HasCurrentSource()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user