Bug 1428581 - Make labels of the permission prompt checkboxes clickable. r=johannh
authorPrathiksha <prathikshaprasadsuman@gmail.com>
Tue, 09 Jan 2018 18:11:50 +0530
changeset 452715 dcc011bcccfd8277eef00d12084fd376d4e1097e
parent 452714 ec2323f6d9e9d1aec711f9d93855102a7ed6a445
child 452716 ed3d5e1ac8629ae1277a07552883e8f0a07e086c
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohannh
bugs1428581
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1428581 - Make labels of the permission prompt checkboxes clickable. r=johannh MozReview-Commit-ID: GPPmYqOX3Jb
browser/components/preferences/sitePermissions.css
browser/components/preferences/sitePermissions.js
browser/components/preferences/sitePermissions.xul
--- a/browser/components/preferences/sitePermissions.css
+++ b/browser/components/preferences/sitePermissions.css
@@ -17,23 +17,18 @@
   min-height: 35px;
 }
 
 .website-status {
   margin: 1px;
   margin-inline-end: 5px;
 }
 
-#permissionsDisableLabel {
-  padding-top: 14px;
-  font-weight: bold;
-}
-
 #permissionsDisableDescription {
-  margin-inline-start: 37px;
+  margin-inline-start: 32px;
   color: #737373;
   line-height: 110%;
 }
 
 #permissionsDisableCheckbox {
   margin-inline-start: 4px;
   padding-top: 10px;
 }
--- a/browser/components/preferences/sitePermissions.js
+++ b/browser/components/preferences/sitePermissions.js
@@ -50,34 +50,31 @@ var gSitePermissionsManager = {
     this._searchBox = document.getElementById("searchBox");
     this._checkbox = document.getElementById("permissionsDisableCheckbox");
 
     let permissionsText = document.getElementById("permissionsText");
     while (permissionsText.hasChildNodes())
       permissionsText.firstChild.remove();
     permissionsText.appendChild(document.createTextNode(params.introText));
 
-    let permissionsDisableLabel = document.getElementById("permissionsDisableLabel");
-    permissionsDisableLabel.value = params.disablePermissionsLabel;
-
+    this._checkbox.setAttribute("label", params.disablePermissionsLabel);
     let permissionsDisableDescription = document.getElementById("permissionsDisableDescription");
     permissionsDisableDescription.appendChild(document.createTextNode(params.disablePermissionsDescription));
 
     document.title = params.windowTitle;
 
     // Initialize the checkbox state.
     this._defaultPermissionStatePrefName = "permissions.default." + this._type;
     let pref = Services.prefs.getPrefType(this._defaultPermissionStatePrefName);
     if (pref != Services.prefs.PREF_INVALID) {
       this._currentDefaultPermissionsState = Services.prefs.getIntPref(this._defaultPermissionStatePrefName);
     }
 
     if (this._currentDefaultPermissionsState === null) {
       this._checkbox.setAttribute("hidden", true);
-      permissionsDisableLabel.setAttribute("hidden", true);
       permissionsDisableDescription.setAttribute("hidden", true);
     } else if (this._currentDefaultPermissionsState == SitePermissions.BLOCK) {
       this._checkbox.checked = true;
     } else {
       this._checkbox.checked = false;
     }
 
     this._loadPermissions();
--- a/browser/components/preferences/sitePermissions.xul
+++ b/browser/components/preferences/sitePermissions.xul
@@ -57,23 +57,18 @@
               icon="remove" label="&removepermission2.label;"
               oncommand="gSitePermissionsManager.onPermissionDelete();"/>
       <button id="removeAllPermissions"
               icon="clear" label="&removeallpermissions2.label;"
               accesskey="&removeallpermissions2.accesskey;"
               oncommand="gSitePermissionsManager.onAllPermissionsDelete();"/>
     </hbox>
     <spacer flex="1"/>
-    <vbox align="start">
-      <hbox align="start">
-        <checkbox id="permissionsDisableCheckbox"/>
-        <label for="permissionsDisableCheckbox" id="permissionsDisableLabel"/>
-      </hbox>
-      <description id="permissionsDisableDescription"/>
-    </vbox>
+    <checkbox id="permissionsDisableCheckbox"/>
+    <description id="permissionsDisableDescription"/>
     <spacer flex="1"/>
     <hbox class="actionButtons" align="right" flex="1">
       <button oncommand="close();" icon="close" id="cancel"
               label="&button.cancel.label;" accesskey="&button.cancel.accesskey;" />
       <button id="btnApplyChanges" oncommand="gSitePermissionsManager.onApplyChanges();" icon="save"
               label="&button.ok.label;" accesskey="&button.ok.accesskey;"/>
     </hbox>
   </vbox>