Bug 1446368 - Remove the XUL tree from siteDataRemoveSelected. r=Paolo
authorJohann Hofmann <jhofmann@mozilla.com>
Fri, 06 Apr 2018 12:59:03 +0200
changeset 415044 47284c0bd982997909f68f17363e340b0717aa3f
parent 415043 0483916013c87e92f9ed6a6974f7ccfec7958c94
child 415045 02dd12e4b48f4b5a49e37563bc4fbd8411bb0bf7
push id33888
push useraciure@mozilla.com
push dateTue, 24 Apr 2018 01:13:25 +0000
treeherdermozilla-central@ce1d9b338bda [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPaolo
bugs1446368
milestone61.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 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;
-}