From 8b9b4b8fd74164c3c26911cc94c469944863e429 Mon Sep 17 00:00:00 2001 From: SagarB Date: Sun, 10 Dec 2017 18:56:12 +0530 Subject: [PATCH] Bug 1402485 - Remove Delete all Session cookies option for non cookie staorage r=miker Borrowed code from onTreePopupShowing into onTablePopupShowing MozReview-Commit-ID: 1IotAfqwlpg --HG-- extra : rebase_source : bd1bc0256ccfbcaf508b319167cab9c21be7dbf2 --- devtools/client/storage/ui.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devtools/client/storage/ui.js b/devtools/client/storage/ui.js index e7f912f9fcce..3e33213a82f2 100644 --- a/devtools/client/storage/ui.js +++ b/devtools/client/storage/ui.js @@ -1097,6 +1097,15 @@ StorageUI.prototype = { 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);