Backout 912fb83c1820 (bug 828111) for browser-chrome leaks on a CLOSED TREE

This commit is contained in:
Ed Morley 2013-01-09 16:31:36 +00:00
parent 286a561ac8
commit 12c1be197a
2 changed files with 1 additions and 26 deletions

View File

@ -2,21 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* The downloads richlistbox may list thousands of items, and it turns out
* XBL binding attachment, and even more so detachment, is a performance hog.
* This hack makes sure we don't apply any binding to inactive items (inactive
* items are history downloads that haven't been in the visible area).
* We can do this because the richlistbox implementation does not interact
* much with the richlistitem binding. However, this may turn out to have
* some side effects (see bug 828111 for the details).
*
* We might be able to do away with this workaround once bug 653881 is fixed.
*/
richlistitem.download {
-moz-binding: none;
}
richlistitem.download[active] {
-moz-binding: url('chrome://browser/content/downloads/download.xml#download-full-ui');
}

View File

@ -1047,20 +1047,10 @@ DownloadsPlacesView.prototype = {
}
}
this._appendDownloadsFragment(elementsToAppendFragment);
this._richlistbox.appendChild(elementsToAppendFragment);
this._ensureVisibleElementsAreActive();
},
_appendDownloadsFragment: function DPV__appendDownloadsFragment(aDOMFragment) {
// Workaround multiple reflows hang by removing the richlistbox
// and adding it back when we're done.
let parentNode = this._richlistbox.parentNode;
let nextSibling = this._richlistbox.nextSibling;
parentNode.removeChild(this._richlistbox);
this._richlistbox.appendChild(aDOMFragment);
parentNode.insertBefore(this._richlistbox, nextSibling);
},
nodeInserted: function DPV_nodeInserted(aParent, aPlacesNode) {
this._addDownloadData(null, aPlacesNode);
},