Bug 1442183 - Allow multiple selection in the site data manager list. r=prathiksha a=jcristau
authorJohann Hofmann <jhofmann@mozilla.com>
Wed, 11 Apr 2018 08:59:49 +0200
changeset 463275 da52dbcbd71c7af9d72cf07ac7b004b9ce740a15
parent 463274 418c75e8af6ce069471d7a31732249ecbc6e8e58
child 463276 0f1a77df404760e1786f79a920a03016ec57b5bc
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersprathiksha, jcristau
bugs1442183
milestone60.0
Bug 1442183 - Allow multiple selection in the site data manager list. r=prathiksha a=jcristau
browser/components/preferences/siteDataSettings.js
browser/components/preferences/siteDataSettings.xul
--- a/browser/components/preferences/siteDataSettings.js
+++ b/browser/components/preferences/siteDataSettings.js
@@ -267,20 +267,17 @@ let gSiteDataSettings = {
   },
 
   onCommandSearch() {
     this._buildSitesList(this._sites);
     this._list.clearSelection();
   },
 
   onClickRemoveSelected() {
-    let selected = this._list.selectedItem;
-    if (selected) {
-      this._removeSiteItems([selected]);
-    }
+    this._removeSiteItems(this._list.selectedItems);
     this._list.clearSelection();
   },
 
   onClickRemoveAll() {
     let siteItems = this._list.getElementsByTagName("richlistitem");
     if (siteItems.length > 0) {
       this._removeSiteItems(siteItems);
     }
--- a/browser/components/preferences/siteDataSettings.xul
+++ b/browser/components/preferences/siteDataSettings.xul
@@ -30,17 +30,17 @@
     <separator class="thin"/>
 
     <hbox id="searchBoxContainer">
       <textbox id="searchBox" type="search" flex="1"
         placeholder="&searchTextboxPlaceHolder;" accesskey="&searchTextboxPlaceHolder.accesskey;"/>
     </hbox>
     <separator class="thin"/>
 
-    <richlistbox id="sitesList" orient="vertical" flex="1">
+    <richlistbox seltype="multiple" id="sitesList" orient="vertical" flex="1">
       <listheader>
         <treecol flex="4" width="50" label="&hostCol.label;" id="hostCol"/>
         <treecol flex="1" width="50" label="&cookiesCol.label;" id="cookiesCol"/>
         <!-- Sorted by usage so the user can quickly see which sites use the most data. -->
         <treecol flex="2" width="50" label="&usageCol.label;" id="usageCol" data-isCurrentSortCol="true"/>
         <treecol flex="2" width="50" label="&lastAccessedCol.label;" id="lastAccessedCol" />
       </listheader>
     </richlistbox>