From 4d4daefdf5cf6cdeca464f40f630b5b4ad57e44d Mon Sep 17 00:00:00 2001 From: Itiel Date: Fri, 2 Sep 2022 08:02:58 +0000 Subject: [PATCH] Bug 1710885 - Hide the toolbarseparator in the protections popup when needed r=hpeuckmann Differential Revision: https://phabricator.services.mozilla.com/D155863 --- browser/base/content/browser-siteProtections.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/browser/base/content/browser-siteProtections.js b/browser/base/content/browser-siteProtections.js index 6f18122aec03..8e38f2bbea4d 100644 --- a/browser/base/content/browser-siteProtections.js +++ b/browser/base/content/browser-siteProtections.js @@ -757,14 +757,23 @@ let ThirdPartyCookies = new (class ThirdPartyCookies extends ProtectionCategory case Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN: title = titleStringPrefix + "3rdParty.title"; this.subViewHeading.hidden = true; + if (this.subViewHeading.nextSibling.nodeName == "toolbarseparator") { + this.subViewHeading.nextSibling.hidden = true; + } break; case Ci.nsICookieService.BEHAVIOR_REJECT: title = titleStringPrefix + "all.title"; this.subViewHeading.hidden = true; + if (this.subViewHeading.nextSibling.nodeName == "toolbarseparator") { + this.subViewHeading.nextSibling.hidden = true; + } break; case Ci.nsICookieService.BEHAVIOR_LIMIT_FOREIGN: title = "protections.blocking.cookies.unvisited.title"; this.subViewHeading.hidden = true; + if (this.subViewHeading.nextSibling.nodeName == "toolbarseparator") { + this.subViewHeading.nextSibling.hidden = true; + } break; case Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER: case Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER_AND_PARTITION_FOREIGN: