Bug 1467713 - Part 1 - Rename functions in "permissions.js" to match "sitePermissions.js". r=jaws
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 05 Jun 2018 15:12:39 +0100
changeset 422016 52724ae751a5e196e34cb8db096c6856ac7aee0f
parent 422015 cceb75ca1a1d212266feecdf1143c4d3f2724312
child 422017 702a0f9d90233a69b8761d2755ce97073a2d23f6
push id34114
push userbtara@mozilla.com
push dateSat, 09 Jun 2018 15:31:58 +0000
treeherdermozilla-central@e02a5155d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1467713
milestone62.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 1467713 - Part 1 - Rename functions in "permissions.js" to match "sitePermissions.js". r=jaws MozReview-Commit-ID: KeF5mcVvVHl
browser/components/preferences/permissions.js
browser/components/preferences/permissions.xul
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/permissions.js
@@ -325,55 +325,55 @@ var gPermissionManager = {
         }
         this._handleCapabilityChange();
       } else if (aData == "deleted") {
         this._removePermissionFromList(permission.principal);
       }
     }
   },
 
-  onPermissionSelected() {
+  onPermissionSelect() {
     var hasSelection = this._tree.view.selection.count > 0;
     var hasRows = this._tree.view.rowCount > 0;
     document.getElementById("removePermission").disabled = !hasRows || !hasSelection;
     document.getElementById("removeAllPermissions").disabled = !hasRows;
   },
 
-  onPermissionDeleted() {
+  onPermissionDelete() {
     if (!this._view.rowCount)
       return;
     var removedPermissions = [];
     gTreeUtils.deleteSelectedItems(this._tree, this._view, this._permissions, removedPermissions);
     for (var i = 0; i < removedPermissions.length; ++i) {
       var p = removedPermissions[i];
       this._removePermission(p);
     }
     document.getElementById("removePermission").disabled = !this._permissions.length;
     document.getElementById("removeAllPermissions").disabled = !this._permissions.length;
   },
 
-  onAllPermissionsDeleted() {
+  onAllPermissionsDelete() {
     if (!this._view.rowCount)
       return;
     var removedPermissions = [];
     gTreeUtils.deleteAll(this._tree, this._view, this._permissions, removedPermissions);
     for (var i = 0; i < removedPermissions.length; ++i) {
       var p = removedPermissions[i];
       this._removePermission(p);
     }
     document.getElementById("removePermission").disabled = true;
     document.getElementById("removeAllPermissions").disabled = true;
   },
 
   onPermissionKeyPress(aEvent) {
     if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
-      this.onPermissionDeleted();
+      this.onPermissionDelete();
     } else if (AppConstants.platform == "macosx" &&
                aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE) {
-      this.onPermissionDeleted();
+      this.onPermissionDelete();
       aEvent.preventDefault();
     }
   },
 
   _lastPermissionSortColumn: "",
   _lastPermissionSortAscending: false,
   _permissionsComparator(a, b) {
     return a.toLowerCase().localeCompare(b.toLowerCase());
--- a/browser/components/preferences/permissions.xul
+++ b/browser/components/preferences/permissions.xul
@@ -46,37 +46,37 @@
               oncommand="gPermissionManager.addPermission(nsICookiePermission.ACCESS_SESSION);"/>
       <button id="btnAllow" disabled="true" data-l10n-id="permissions-allow" default="true"
               oncommand="gPermissionManager.addPermission(nsIPermissionManager.ALLOW_ACTION);"/>
     </hbox>
     <separator class="thin"/>
     <tree id="permissionsTree" flex="1" style="height: 18em;"
           hidecolumnpicker="true"
           onkeypress="gPermissionManager.onPermissionKeyPress(event)"
-          onselect="gPermissionManager.onPermissionSelected();">
+          onselect="gPermissionManager.onPermissionSelect();">
       <treecols>
         <treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3"
                  data-field-name="origin" persist="width"/>
         <splitter class="tree-splitter"/>
         <treecol id="statusCol" data-l10n-id="permissions-status" flex="1"
                  data-field-name="capability" persist="width"/>
       </treecols>
       <treechildren/>
     </tree>
   </vbox>
   <vbox>
     <hbox class="actionButtons" align="left" flex="1">
       <button id="removePermission" disabled="true"
               data-l10n-id="permissions-remove"
               icon="remove"
-              oncommand="gPermissionManager.onPermissionDeleted();"/>
+              oncommand="gPermissionManager.onPermissionDelete();"/>
       <button id="removeAllPermissions"
               data-l10n-id="permissions-remove-all"
               icon="clear"
-              oncommand="gPermissionManager.onAllPermissionsDeleted();"/>
+              oncommand="gPermissionManager.onAllPermissionsDelete();"/>
     </hbox>
     <spacer flex="1"/>
     <hbox class="actionButtons" align="right" flex="1">
       <button oncommand="close();" icon="close"
               data-l10n-id="permissions-button-cancel" />
       <button id="btnApplyChanges" oncommand="gPermissionManager.onApplyChanges();" icon="save"
               data-l10n-id="permissions-button-ok" />
     </hbox>