diff --git a/mozilla/toolkit/mozapps/extensions/content/extensions.css b/mozilla/toolkit/mozapps/extensions/content/extensions.css index e1f6291af39..96cc1588924 100644 --- a/mozilla/toolkit/mozapps/extensions/content/extensions.css +++ b/mozilla/toolkit/mozapps/extensions/content/extensions.css @@ -38,11 +38,11 @@ richlistitem[state="finishing"] hbox.addon-install-status { -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-install-finishing"); } -richlistitem[state="success"] hbox.addon-install-status { +richlistitem[state="success"][opType] hbox.addon-install-status { -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-install-restart"); } -richlistitem[state="success"][opType="none"] hbox.addon-install-status { +richlistitem[state="success"] hbox.addon-install-status { -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-install-success"); } @@ -62,12 +62,11 @@ hbox.addon-name-version { -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-name-version"); } -/* XXXrstrong due to bug 331689 none is used for some attribute values */ -richlistitem[opType="none"] hbox.addon-optype { +richlistitem:not([opType]) hbox.addon-optype { display: none; } -richlistitem[opType="none"] hbox.addon-description { +richlistitem hbox.addon-description { -moz-binding: url("chrome://mozapps/content/extensions/extensions.xml#addon-description-crop"); } diff --git a/mozilla/toolkit/mozapps/extensions/content/extensions.js b/mozilla/toolkit/mozapps/extensions/content/extensions.js index 20258c73c88..e0e769d24a0 100644 --- a/mozilla/toolkit/mozapps/extensions/content/extensions.js +++ b/mozilla/toolkit/mozapps/extensions/content/extensions.js @@ -1343,10 +1343,8 @@ function updateOptionalViews() { if (!showUpdates) { var updateURLArc = rdfs.GetResource(PREFIX_NS_EM + "availableUpdateURL"); var updateURL = ds.GetTarget(e, updateURLArc, true); - if (updateURL && updateURL instanceof Components.interfaces.nsIRDFLiteral) { - if (updateURL.Value != "none") - var showUpdates = true; - } + if (updateURL) + var showUpdates = true; } if (showInstalls) @@ -1378,7 +1376,7 @@ function updateGlobalCommands() { var child = children[i]; if (disableUpdateCheck && child.getAttribute("updateable") == "true") disableUpdateCheck = false; - if (disableInstallUpdate && child.getAttribute("availableUpdateURL") != "none") + if (disableInstallUpdate && child.hasAttribute("availableUpdateURL")) disableInstallUpdate = false; if (disableAppRestart && child.hasAttribute("state")) { if (child.getAttribute("state") == "success") @@ -1534,10 +1532,10 @@ var gExtensionsViewController = { return selectedItem.getAttribute("updateable") != "false" && !gExtensionsView.hasAttribute("update-operation"); case "cmd_installUpdate": - return selectedItem.getAttribute("availableUpdateURL") != "none" && + return selectedItem.hasAttribute("availableUpdateURL") && !gExtensionsView.hasAttribute("update-operation"); case "cmd_includeUpdate": - return selectedItem.getAttribute("availableUpdateURL") != "none" && + return selectedItem.hasAttribute("availableUpdateURL") && !gExtensionsView.hasAttribute("update-operation"); case "cmd_reallyEnable": // controls whether to show Enable or Disable in extensions' context menu diff --git a/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in b/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in index 65b86fe93e5..1b7ee9cbf3a 100644 --- a/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in +++ b/mozilla/toolkit/mozapps/extensions/src/nsExtensionManager.js.in @@ -7316,12 +7316,17 @@ ExtensionsDataSource.prototype = { * The property (less EM_NS) to update. */ _updateProperty: function(item, property) { - var propertyResource = EM_R(property); - var value = this.GetTarget(item, propertyResource, true); - if (item && value) { - for (var i = 0; i < this._observers.length; ++i) - this._observers[i].onChange(this, item, propertyResource, - EM_L(""), value); + if (item) { + var propertyResource = EM_R(property); + var value = this.GetTarget(item, propertyResource, true); + for (var i = 0; i < this._observers.length; ++i) { + if (value) + this._observers[i].onChange(this, item, propertyResource, + EM_L(""), value); + else + this._observers[i].onUnassert(this, item, propertyResource, + EM_L("")); + } } }, @@ -7885,18 +7890,6 @@ ExtensionsDataSource.prototype = { return null; }, - /** - * Gets the em:availableUpdateURL - the URL to an XPI update package, if - * present, or a literal string "none" if there is no update XPI URL. - * XXXrstrong we return none due to bug 331689 - */ - _rdfGet_availableUpdateURL: function(item, property) { - var value = this._inner.GetTarget(item, property, true); - if (!value) - return EM_L("none"); - return value; - }, - /** * Get the em:satisfiesDependencies property - literal string "false" for * dependencies not satisfied (e.g. dependency disabled, incorrect version, @@ -7912,7 +7905,6 @@ ExtensionsDataSource.prototype = { /** * Get the em:opType property (controls widget state for the EM UI) * from the Startup Cache (e.g. extensions.cache) - * XXXrstrong we return none for OP_NONE due to bug 331689 */ _rdfGet_opType: function(item, property) { var id = stripPrefix(item.Value, PREFIX_ITEM_URI); @@ -7920,7 +7912,7 @@ ExtensionsDataSource.prototype = { if (key in StartupCache.entries && id in StartupCache.entries[key] && StartupCache.entries[key][id] && StartupCache.entries[key][id].op != OP_NONE) return EM_L(StartupCache.entries[key][id].op); - return EM_L("none"); + return null; }, /** diff --git a/mozilla/toolkit/themes/pinstripe/mozapps/extensions/extensions.css b/mozilla/toolkit/themes/pinstripe/mozapps/extensions/extensions.css index 44011262161..b549f0bf115 100644 --- a/mozilla/toolkit/themes/pinstripe/mozapps/extensions/extensions.css +++ b/mozilla/toolkit/themes/pinstripe/mozapps/extensions/extensions.css @@ -127,11 +127,12 @@ richlistitem .notifyBadge { -moz-margin-start: -2px; } -richlistitem[availableUpdateURL="none"] .updateBadge, +.updateBadge, .notifyBadge { display: none; } +richlistitem[availableUpdateURL] .updateBadge, richlistitem[compatible="false"] .notifyBadge, richlistitem[blocklisted="true"] .notifyBadge, richlistitem[satisfiesDependencies="false"] .notifyBadge { diff --git a/mozilla/toolkit/themes/winstripe/mozapps/extensions/extensions.css b/mozilla/toolkit/themes/winstripe/mozapps/extensions/extensions.css index 7dc5f918463..ca5d59c308b 100644 --- a/mozilla/toolkit/themes/winstripe/mozapps/extensions/extensions.css +++ b/mozilla/toolkit/themes/winstripe/mozapps/extensions/extensions.css @@ -196,11 +196,12 @@ richlistitem .notifyBadge { -moz-margin-start: -2px; } -richlistitem[availableUpdateURL="none"] .updateBadge, +.updateBadge, .notifyBadge { display: none; } +richlistitem[availableUpdateURL] .updateBadge, richlistitem[compatible="false"] .notifyBadge, richlistitem[blocklisted="true"] .notifyBadge, richlistitem[satisfiesDependencies="false"] .notifyBadge {