From 12c1be197a15c208fa3944d0ceee120ecb5c23b6 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Wed, 9 Jan 2013 16:31:36 +0000 Subject: [PATCH] Backout 912fb83c1820 (bug 828111) for browser-chrome leaks on a CLOSED TREE --- .../downloads/content/allDownloadsViewOverlay.css | 15 --------------- .../downloads/content/allDownloadsViewOverlay.js | 12 +----------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/browser/components/downloads/content/allDownloadsViewOverlay.css b/browser/components/downloads/content/allDownloadsViewOverlay.css index cfdbebcf09c..71e56b96b9f 100644 --- a/browser/components/downloads/content/allDownloadsViewOverlay.css +++ b/browser/components/downloads/content/allDownloadsViewOverlay.css @@ -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'); } diff --git a/browser/components/downloads/content/allDownloadsViewOverlay.js b/browser/components/downloads/content/allDownloadsViewOverlay.js index 15f2b1cf95a..0187e0fb766 100644 --- a/browser/components/downloads/content/allDownloadsViewOverlay.js +++ b/browser/components/downloads/content/allDownloadsViewOverlay.js @@ -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); },