[tbb-commits] [tor-browser] 04/05: fixup! Bug 25658: Replace security slider with security level UI

gitolite role git at cupani.torproject.org
Fri Jul 15 19:15:25 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-91.11.0esr-12.0-1
in repository tor-browser.

commit 6147e833ec5447572666a0e3f09e344134815f2b
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Wed Jul 13 10:35:42 2022 +0200

    fixup! Bug 25658: Replace security slider with security level UI
    
    Fixes on small problems.
---
 browser/components/securitylevel/SecurityLevel.jsm            |  1 -
 browser/components/securitylevel/content/securityLevel.js     |  7 ++++++-
 .../components/securitylevel/content/securityLevelPanel.css   |  7 ++-----
 .../securitylevel/content/securityLevelPreferences.css        | 11 +++++------
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/browser/components/securitylevel/SecurityLevel.jsm b/browser/components/securitylevel/SecurityLevel.jsm
index bd7c803511fff..485df6d5090e4 100644
--- a/browser/components/securitylevel/SecurityLevel.jsm
+++ b/browser/components/securitylevel/SecurityLevel.jsm
@@ -452,7 +452,6 @@ class SecurityLevel {
   observe(aSubject, aTopic, aData) {
     if (aTopic == BrowserTopics.ProfileAfterChange) {
       this.init();
-      Services.obs.removeObserver(this, aTopic);
     }
   }
 }
diff --git a/browser/components/securitylevel/content/securityLevel.js b/browser/components/securitylevel/content/securityLevel.js
index 0e8f3c00be9bb..366814ac85666 100644
--- a/browser/components/securitylevel/content/securityLevel.js
+++ b/browser/components/securitylevel/content/securityLevel.js
@@ -227,11 +227,16 @@ const SecurityLevelPanel = {
     this._elements.advancedSecuritySettings.addEventListener("command", () => {
       this.openAdvancedSecuritySettings();
     });
-    this._configUIFromPrefs();
     this._populated = true;
+    this._configUIFromPrefs();
   },
 
   _configUIFromPrefs() {
+    if (!this._populated) {
+      console.warn("_configUIFromPrefs before XUL was populated.");
+      return;
+    }
+
     // get security prefs
     const level = SecurityLevelPrefs.securitySliderLevel;
     const custom = SecurityLevelPrefs.securityCustom;
diff --git a/browser/components/securitylevel/content/securityLevelPanel.css b/browser/components/securitylevel/content/securityLevelPanel.css
index 6462c02f15942..c50acf0ae76c8 100644
--- a/browser/components/securitylevel/content/securityLevelPanel.css
+++ b/browser/components/securitylevel/content/securityLevelPanel.css
@@ -39,9 +39,6 @@ vbox#securityLevel-vbox > vbox * {
   margin-inline: 0;
 }
 
-vbox#securityLevel-vbox > vbox > hbox {
-}
-
 label#securityLevel-level {
   font-size: 1.25em;
   font-weight: 600;
@@ -56,12 +53,12 @@ label#securityLevel-custom {
   height: 1.6em;
   line-height: 1.0em;
   padding: 0.4em 0.5em;
-  margin-left: 1em!important;
+  margin-inline-start: 1em !important;
 }
 
 description#securityLevel-summary {
   margin-top: 1em;
-  padding-right: 5em;
+  padding-inline-end: 5em;
 }
 
 vbox#securityLevel-vbox > hbox.panel-footer {
diff --git a/browser/components/securitylevel/content/securityLevelPreferences.css b/browser/components/securitylevel/content/securityLevelPreferences.css
index 12a7cccffe099..152c6489f3658 100644
--- a/browser/components/securitylevel/content/securityLevelPreferences.css
+++ b/browser/components/securitylevel/content/securityLevelPreferences.css
@@ -1,4 +1,4 @@
-label#securityLevel-customWarning {
+label.securityLevel-customWarning {
   border-radius: 4px;
   background-color: var(--yellow-50);
   color: black;
@@ -31,17 +31,16 @@ radiogroup#securityLevel-radiogroup[value=safest] > vbox#securityLevel-vbox-safe
 
 }
 
-vbox#securityLevel-descriptionList {
+vbox.securityLevel-descriptionList {
   display: none;
-  margin-inline-start:
 }
 
-radiogroup#securityLevel-radiogroup[value=safer] > vbox#securityLevel-vbox-safer > vbox#securityLevel-descriptionList,
-radiogroup#securityLevel-radiogroup[value=safest] > vbox#securityLevel-vbox-safest > vbox#securityLevel-descriptionList {
+radiogroup#securityLevel-radiogroup[value=safer] vbox#securityLevel-vbox-safer vbox.securityLevel-descriptionList,
+radiogroup#securityLevel-radiogroup[value=safest] vbox#securityLevel-vbox-safest vbox.securityLevel-descriptionList {
   display: inherit;
 }
 
-vbox#securityLevel-descriptionList > description {
+vbox.securityLevel-descriptionList description {
   display: list-item;
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list