mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
Bug 1478637 - Avoid sync style flushes when cancelling the shield animation in the identity block. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D3449 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
043ffca9de
commit
f1bd968c5c
@ -379,11 +379,18 @@ var ContentBlocking = {
|
||||
},
|
||||
|
||||
cancelAnimation() {
|
||||
let iconAnimation = this.animatedIcon.getAnimations()[0];
|
||||
if (iconAnimation && iconAnimation.currentTime) {
|
||||
iconAnimation.cancel();
|
||||
if (!this.iconBox.hasAttribute("animate")) {
|
||||
return;
|
||||
}
|
||||
this.iconBox.removeAttribute("animate");
|
||||
|
||||
window.promiseDocumentFlushed(() => {
|
||||
return this.animatedIcon.getAnimations()[0];
|
||||
}).then(iconAnimation => {
|
||||
if (iconAnimation && iconAnimation.currentTime) {
|
||||
iconAnimation.cancel();
|
||||
}
|
||||
this.iconBox.removeAttribute("animate");
|
||||
});
|
||||
},
|
||||
|
||||
onSecurityChange(state, webProgress, isSimulated) {
|
||||
|
Loading…
Reference in New Issue
Block a user