Bug 1446368 - Remove the XUL tree from siteDataRemoveSelected. r=paolo draft
authorJohann Hofmann <jhofmann@mozilla.com>
Fri, 06 Apr 2018 12:59:03 +0200
changeset 786495 36451c14f05cb113f5ccdee5b1a6309d362e28a8
parent 786478 dfb15917c057f17e5143f7d7c6e1972ba53efc49
push id107487
push userbmo:jhofmann@mozilla.com
push dateMon, 23 Apr 2018 12:06:16 +0000
reviewerspaolo
bugs1446368
milestone61.0a1
Bug 1446368 - Remove the XUL tree from siteDataRemoveSelected. r=paolo MozReview-Commit-ID: 3mPP8fhxowE
browser/components/preferences/siteDataRemoveSelected.js
browser/components/preferences/siteDataRemoveSelected.xul
browser/themes/shared/incontentprefs/siteDataSettings.css
--- a/browser/components/preferences/siteDataRemoveSelected.js
+++ b/browser/components/preferences/siteDataRemoveSelected.js
@@ -10,35 +10,26 @@ let gSiteDataRemoveSelected = {
   init() {
     let bundlePreferences = document.getElementById("bundlePreferences");
     let acceptBtn = document.getElementById("SiteDataRemoveSelectedDialog")
                             .getButton("accept");
     acceptBtn.label = bundlePreferences.getString("acceptRemove");
 
     let hosts = window.arguments[0].hosts;
     hosts.sort();
-    let tree = document.getElementById("sitesTree");
-    this._view._hosts = hosts;
-    tree.view = this._view;
+    let list = document.getElementById("removalList");
+    let fragment = document.createDocumentFragment();
+    for (let host of hosts) {
+      let listItem = document.createElement("listitem");
+      listItem.setAttribute("label", host);
+      fragment.appendChild(listItem);
+    }
+    list.appendChild(fragment);
   },
 
   ondialogaccept() {
     window.arguments[0].allowed = true;
   },
 
   ondialogcancel() {
     window.arguments[0].allowed = false;
   },
-
-  _view: {
-    _hosts: null,
-
-    get rowCount() {
-      return this._hosts.length;
-    },
-    getCellText(index, column) {
-      return this._hosts[index];
-    },
-    getLevel(index) {
-      return 0;
-    },
-  },
 };
--- a/browser/components/preferences/siteDataRemoveSelected.xul
+++ b/browser/components/preferences/siteDataRemoveSelected.xul
@@ -44,18 +44,13 @@
       </vbox>
     </hbox>
 
     <separator />
 
     <vbox flex="1">
       <label data-l10n-id="site-data-removing-table"/>
       <separator class="thin"/>
-      <tree id="sitesTree" flex="1" seltype="single" hidecolumnpicker="true">
-        <treecols>
-          <treecol primary="true" flex="1" hideheader="true"/>
-        </treecols>
-        <treechildren />
-      </tree>
+      <listbox id="removalList"/>
     </vbox>
   </vbox>
 
 </dialog>
--- a/browser/themes/shared/incontentprefs/siteDataSettings.css
+++ b/browser/themes/shared/incontentprefs/siteDataSettings.css
@@ -40,12 +40,8 @@
 
 .question-icon {
   margin: 6px;
 }
 
 #removing-label {
   font-weight: bold;
 }
-
-#sitesTree {
-  height: 15em;
-}