Bug 1333064 - Unblocked malware downloads are styled incorrectly in the Downloads Panel. r=mak
MozReview-Commit-ID: IT4Dd9tBzt0
--- a/browser/components/downloads/DownloadsViewUI.jsm
+++ b/browser/components/downloads/DownloadsViewUI.jsm
@@ -109,17 +109,17 @@ this.DownloadsViewUI.DownloadElementShel
* update in order to improve performance.
*/
_updateState() {
this.element.setAttribute("displayName", this.displayName);
this.element.setAttribute("image", this.image);
this.element.setAttribute("state",
DownloadsCommon.stateOfDownload(this.download));
- if (this.download.error &&
+ if (!this.download.succeeded && this.download.error &&
this.download.error.becauseBlockedByReputationCheck) {
this.element.setAttribute("verdict",
this.download.error.reputationCheckVerdict);
} else {
this.element.removeAttribute("verdict");
}
// Since state changed, reset the time left estimation.