Bug 1669933 - Register cloning paused animations to PendingAnimationTracker to make sure the animations are painted in printing documents. r=boris
Without PendingAnimationTracker, we can't make the refresh driver keep ticking for the animations until we are ready to paint the printing documents. In other words we do stop ticking [1] in DocumentTimeline::MostRecentRefreshTimeUpdated. [1] https://searchfox.org/mozilla-central/rev/25d5a4443a7e13cfa58eff38f1faa5e69f0b170f/dom/animation/DocumentTimeline.cpp#168,183-192 Differential Revision: https://phabricator.services.mozilla.com/D94256
This commit is contained in:
@@ -103,6 +103,14 @@ already_AddRefed<Animation> Animation::ClonePausedAnimation(
|
||||
animation->mEffect = &aEffect;
|
||||
animation->mEffect->SetAnimation(animation);
|
||||
|
||||
animation->mPendingState = PendingState::PausePending;
|
||||
|
||||
Document* doc = animation->GetRenderedDocument();
|
||||
MOZ_ASSERT(doc,
|
||||
"Cloning animation should already have the rendered document");
|
||||
PendingAnimationTracker* tracker = doc->GetOrCreatePendingAnimationTracker();
|
||||
tracker->AddPausePending(*animation);
|
||||
|
||||
// We expect our relevance to be the same as the orginal.
|
||||
animation->mIsRelevant = aOther.mIsRelevant;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user