Bug 1402485 - Remove Delete all Session cookies option for non cookie staorage
Borrowed code from onTreePopupShowing into onTablePopupShowing
MozReview-Commit-ID: 1IotAfqwlpg
--- a/devtools/client/storage/ui.js
+++ b/devtools/client/storage/ui.js
@@ -1092,16 +1092,25 @@ StorageUI.prototype = {
if (this.actorSupportsAddItem) {
this._tablePopupAddItem.hidden = false;
this._tablePopupAddItem.setAttribute("label",
L10N.getFormatStr("storage.popupMenu.addItemLabel"));
} else {
this._tablePopupAddItem.hidden = true;
}
+ let showDeleteAllSessionCookies = false;
+ if (this.actorSupportsRemoveAllSessionCookies) {
+ if (type === "cookies" && selectedItem.length === 2) {
+ showDeleteAllSessionCookies = true;
+ }
+ }
+
+ this._tablePopupDeleteAllSessionCookies.hidden = !showDeleteAllSessionCookies;
+
if (type === "cookies") {
let host = addEllipsis(data.host);
this._tablePopupDeleteAllFrom.hidden = false;
this._tablePopupDeleteAllFrom.setAttribute("label",
L10N.getFormatStr("storage.popupMenu.deleteAllFromLabel", host));
} else {
this._tablePopupDeleteAllFrom.hidden = true;