Bug 1525099 - correctly select the right content blocking option, r=ewright a=lizzard
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 08 Feb 2019 22:15:23 +0000
changeset 513032 dab6c98e8626
parent 513031 a3770c11ca4d
child 513033 753ea9ad88e0
push id10690
push userapavel@mozilla.com
push dateWed, 13 Feb 2019 04:19:22 +0000
treeherdermozilla-beta@05a7b1efca0d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersewright, lizzard
bugs1525099
milestone66.0
Bug 1525099 - correctly select the right content blocking option, r=ewright a=lizzard Differential Revision: https://phabricator.services.mozilla.com/D19143
browser/components/preferences/in-content/privacy.js
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/in-content/privacy.js
@@ -476,34 +476,36 @@ var gPrivacyPane = {
       + `?step=3&newtab=true`;
     let warningLinks = document.getElementsByClassName("content-blocking-warning-learn-how");
     for (let warningLink of warningLinks) {
       warningLink.setAttribute("href", contentBlockingTour);
     }
   },
 
   highlightCBCategory() {
-    let value = document.getElementById("contentBlockingCategoryRadio").value;
+    let value = Preferences.get("browser.contentblocking.category").value;
     let standardEl = document.getElementById("contentBlockingOptionStandard");
     let strictEl = document.getElementById("contentBlockingOptionStrict");
     let customEl = document.getElementById("contentBlockingOptionCustom");
     standardEl.classList.remove("selected");
     strictEl.classList.remove("selected");
     customEl.classList.remove("selected");
 
     switch (value) {
-      case "standard":
-        standardEl.classList.add("selected");
-        break;
       case "strict":
         strictEl.classList.add("selected");
         break;
       case "custom":
         customEl.classList.add("selected");
         break;
+      case "standard":
+        /* fall through */
+      default:
+        standardEl.classList.add("selected");
+        break;
     }
   },
 
   // TRACKING PROTECTION MODE
 
   /**
    * Selects the right item of the Tracking Protection menulist and checkbox.
    */