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(
aTab.container.getElementsByTagName("tab")
)
.filter(tab => tab.hasAttribute("busy"))
.map(tab => {
const throbber = tab.throbber;
return throbber ? throbber.getAnimations({ subtree: true }) : [];
})
.reduce((a, b) => a.concat(b))
.reduce((a, b) => a.concat(b), [])
.filter(
anim =>
CSSAnimation.isInstance(anim) &&