mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1145246, part 3 - Update layout code for the rename of Animatable.getAnimationPlayers() to Animatable.getAnimations(). r=birtles
This commit is contained in:
parent
fe226713f5
commit
0aa30fe55c
@ -219,7 +219,7 @@ public:
|
||||
// cached when used from JS.
|
||||
already_AddRefed<AnimationEffect> GetEffect();
|
||||
Element* GetTarget() const {
|
||||
// Currently we only implement Element.getAnimationPlayers() which only
|
||||
// Currently we only implement Element.getAnimations() which only
|
||||
// returns animations targetting Elements so this should never
|
||||
// be called for an animation that targets a pseudo-element.
|
||||
MOZ_ASSERT(mPseudoType == nsCSSPseudoElements::ePseudo_NotPseudoElement,
|
||||
|
@ -767,7 +767,7 @@ AnimationPlayer::GetCollection() const
|
||||
MOZ_ASSERT(targetElement,
|
||||
"A player with an animation manager must have a target");
|
||||
|
||||
return manager->GetAnimationPlayers(targetElement, targetPseudoType, false);
|
||||
return manager->GetAnimations(targetElement, targetPseudoType, false);
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
|
@ -1238,10 +1238,10 @@ RestyleManager::GetMaxAnimationGenerationForFrame(nsIFrame* aFrame)
|
||||
nsCSSPseudoElements::Type pseudoType =
|
||||
aFrame->StyleContext()->GetPseudoType();
|
||||
AnimationPlayerCollection* transitions =
|
||||
aFrame->PresContext()->TransitionManager()->GetAnimationPlayers(
|
||||
aFrame->PresContext()->TransitionManager()->GetAnimations(
|
||||
content->AsElement(), pseudoType, false /* don't create */);
|
||||
AnimationPlayerCollection* animations =
|
||||
aFrame->PresContext()->AnimationManager()->GetAnimationPlayers(
|
||||
aFrame->PresContext()->AnimationManager()->GetAnimations(
|
||||
content->AsElement(), pseudoType, false /* don't create */);
|
||||
|
||||
return std::max(transitions ? transitions->mAnimationGeneration : 0,
|
||||
|
@ -303,7 +303,7 @@ CommonAnimationManager::ExtractComputedValueForTransition(
|
||||
}
|
||||
|
||||
AnimationPlayerCollection*
|
||||
CommonAnimationManager::GetAnimationPlayers(dom::Element *aElement,
|
||||
CommonAnimationManager::GetAnimations(dom::Element *aElement,
|
||||
nsCSSPseudoElements::Type aPseudoType,
|
||||
bool aCreateIfNeeded)
|
||||
{
|
||||
@ -366,7 +366,7 @@ CommonAnimationManager::GetAnimationRule(mozilla::dom::Element* aElement,
|
||||
}
|
||||
|
||||
AnimationPlayerCollection* collection =
|
||||
GetAnimationPlayers(aElement, aPseudoType, false);
|
||||
GetAnimations(aElement, aPseudoType, false);
|
||||
if (!collection) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
void AddStyleUpdatesTo(mozilla::RestyleTracker& aTracker);
|
||||
|
||||
AnimationPlayerCollection*
|
||||
GetAnimationPlayers(dom::Element *aElement,
|
||||
GetAnimations(dom::Element *aElement,
|
||||
nsCSSPseudoElements::Type aPseudoType,
|
||||
bool aCreateIfNeeded);
|
||||
|
||||
|
@ -254,7 +254,7 @@ nsAnimationManager::CheckAnimationRule(nsStyleContext* aStyleContext,
|
||||
|
||||
const nsStyleDisplay* disp = aStyleContext->StyleDisplay();
|
||||
AnimationPlayerCollection* collection =
|
||||
GetAnimationPlayers(aElement, aStyleContext->GetPseudoType(), false);
|
||||
GetAnimations(aElement, aStyleContext->GetPseudoType(), false);
|
||||
if (!collection &&
|
||||
disp->mAnimationNameCount == 1 &&
|
||||
disp->mAnimations[0].GetName().IsEmpty()) {
|
||||
@ -380,7 +380,7 @@ nsAnimationManager::CheckAnimationRule(nsStyleContext* aStyleContext,
|
||||
}
|
||||
} else {
|
||||
collection =
|
||||
GetAnimationPlayers(aElement, aStyleContext->GetPseudoType(), true);
|
||||
GetAnimations(aElement, aStyleContext->GetPseudoType(), true);
|
||||
}
|
||||
collection->mPlayers.SwapElements(newPlayers);
|
||||
collection->mNeedsRefreshes = true;
|
||||
|
@ -174,7 +174,7 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
|
||||
}
|
||||
|
||||
AnimationPlayerCollection* collection =
|
||||
GetAnimationPlayers(aElement, pseudoType, false);
|
||||
GetAnimations(aElement, pseudoType, false);
|
||||
if (!collection &&
|
||||
disp->mTransitionPropertyCount == 1 &&
|
||||
disp->mTransitions[0].GetCombinedDuration() <= 0.0f) {
|
||||
@ -566,7 +566,7 @@ nsTransitionManager::ConsiderStartingTransition(
|
||||
|
||||
if (!aElementTransitions) {
|
||||
aElementTransitions =
|
||||
GetAnimationPlayers(aElement, aNewStyleContext->GetPseudoType(), true);
|
||||
GetAnimations(aElement, aNewStyleContext->GetPseudoType(), true);
|
||||
if (!aElementTransitions) {
|
||||
NS_WARNING("allocating CommonAnimationManager failed");
|
||||
return;
|
||||
@ -608,7 +608,7 @@ nsTransitionManager::UpdateCascadeResultsWithTransitions(
|
||||
{
|
||||
AnimationPlayerCollection* animations =
|
||||
mPresContext->AnimationManager()->
|
||||
GetAnimationPlayers(aTransitions->mElement,
|
||||
GetAnimations(aTransitions->mElement,
|
||||
aTransitions->PseudoElementType(), false);
|
||||
UpdateCascadeResults(aTransitions, animations);
|
||||
}
|
||||
@ -619,7 +619,7 @@ nsTransitionManager::UpdateCascadeResultsWithAnimations(
|
||||
{
|
||||
AnimationPlayerCollection* transitions =
|
||||
mPresContext->TransitionManager()->
|
||||
GetAnimationPlayers(aAnimations->mElement,
|
||||
GetAnimations(aAnimations->mElement,
|
||||
aAnimations->PseudoElementType(), false);
|
||||
UpdateCascadeResults(transitions, aAnimations);
|
||||
}
|
||||
@ -633,7 +633,7 @@ nsTransitionManager::UpdateCascadeResultsWithAnimationsToBeDestroyed(
|
||||
// information that may now be incorrect.
|
||||
AnimationPlayerCollection* transitions =
|
||||
mPresContext->TransitionManager()->
|
||||
GetAnimationPlayers(aAnimations->mElement,
|
||||
GetAnimations(aAnimations->mElement,
|
||||
aAnimations->PseudoElementType(), false);
|
||||
UpdateCascadeResults(transitions, nullptr);
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ addAsyncAnimTest(function *() {
|
||||
"Animation is initally animating on compositor");
|
||||
|
||||
// pause() means it is no longer on the compositor
|
||||
var player = div.getAnimationPlayers()[0];
|
||||
player.pause();
|
||||
var animation = div.getAnimations()[0];
|
||||
animation.pause();
|
||||
// pause() should set up the changes to animations for the next layer
|
||||
// transaction but it won't schedule a paint immediately so we need to tick
|
||||
// the refresh driver before we can wait on the next paint.
|
||||
@ -64,7 +64,7 @@ addAsyncAnimTest(function *() {
|
||||
"Animation remains paused");
|
||||
|
||||
// play() puts the animation back on the compositor
|
||||
player.play();
|
||||
animation.play();
|
||||
// As with pause(), play() will set up pending animations for the next layer
|
||||
// transaction but won't schedule a paint so we need to tick the refresh
|
||||
// driver before waiting on the next paint.
|
||||
|
Loading…
Reference in New Issue
Block a user