diff --git a/common/modules/downloads.jsm b/common/modules/downloads.jsm
index 23ad3dc4..b0e7ba86 100644
--- a/common/modules/downloads.jsm
+++ b/common/modules/downloads.jsm
@@ -28,6 +28,8 @@ var Download = Class("Download", {
this.nodes = {
commandTarget: self
};
+ XML.ignoreWhitespace = true;
+ XML.prettyPrinting = false;
util.xmlToDom(
@@ -224,8 +226,10 @@ var DownloadList = Class("DownloadList",
message: Class.Memoize(function () {
+ XML.ignoreWhitespace = true;
+ XML.prettyPrinting = false;
util.xmlToDom(
-
+
{_("title.Title")}
{_("title.Status")}
@@ -253,6 +257,9 @@ var DownloadList = Class("DownloadList",
, this.document, this.nodes);
+ this.index = Array.indexOf(this.nodes.list.childNodes,
+ this.nodes.head);
+
for (let row in iter(services.downloadManager.DBConnection
.createStatement("SELECT id FROM moz_downloads")))
this.addDownload(row.id);
@@ -274,7 +281,7 @@ var DownloadList = Class("DownloadList",
.indexOf(download);
this.nodes.list.insertBefore(download.nodes.row,
- this.nodes.list.childNodes[index + 1]);
+ this.nodes.list.childNodes[index + this.index + 1]);
}
},
removeDownload: function removeDownload(id) {
|