From f1a03e97516b8eb54547453a9d1963cbde729313 Mon Sep 17 00:00:00 2001 From: Ciure Andrei Date: Fri, 17 Aug 2018 02:57:57 +0300 Subject: [PATCH] Backed out 1 changesets (bug 1478637) for browser_trackingUI_animation_2.js failures CLOSED TREE Backed out changeset 85496f02e642 (bug 1478637) --- browser/base/content/browser-contentblocking.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/browser/base/content/browser-contentblocking.js b/browser/base/content/browser-contentblocking.js index 005042f9d2ea..f6522b696f32 100644 --- a/browser/base/content/browser-contentblocking.js +++ b/browser/base/content/browser-contentblocking.js @@ -379,18 +379,11 @@ var ContentBlocking = { }, cancelAnimation() { - if (!this.iconBox.hasAttribute("animate")) { - return; + let iconAnimation = this.animatedIcon.getAnimations()[0]; + if (iconAnimation && iconAnimation.currentTime) { + iconAnimation.cancel(); } - - window.promiseDocumentFlushed(() => { - return this.animatedIcon.getAnimations()[0]; - }).then(iconAnimation => { - if (iconAnimation && iconAnimation.currentTime) { - iconAnimation.cancel(); - } - this.iconBox.removeAttribute("animate"); - }); + this.iconBox.removeAttribute("animate"); }, onSecurityChange(state, webProgress, isSimulated) {