Bug 1869928 - Only sync throbber animations for tabs that are animating. r=mconley,tabbrowser-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D196537
This commit is contained in:
Sam Foster 2024-01-11 21:36:11 +00:00
parent fdbb6481dd
commit 0a81f31cdf

View file

@ -784,11 +784,12 @@
const animations = Array.from( const animations = Array.from(
aTab.container.getElementsByTagName("tab") aTab.container.getElementsByTagName("tab")
) )
.filter(tab => tab.hasAttribute("busy"))
.map(tab => { .map(tab => {
const throbber = tab.throbber; const throbber = tab.throbber;
return throbber ? throbber.getAnimations({ subtree: true }) : []; return throbber ? throbber.getAnimations({ subtree: true }) : [];
}) })
.reduce((a, b) => a.concat(b)) .reduce((a, b) => a.concat(b), [])
.filter( .filter(
anim => anim =>
CSSAnimation.isInstance(anim) && CSSAnimation.isInstance(anim) &&