зеркало из https://github.com/mozilla/pjs.git
Bug 385335 - Remove the use of "none" assertions in EM. r=robstrong
This commit is contained in:
Родитель
a8ccb62785
Коммит
a96e806432
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче