mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout 912fb83c1820 (bug 828111) for browser-chrome leaks on a CLOSED TREE
This commit is contained in:
parent
286a561ac8
commit
12c1be197a
@ -2,21 +2,6 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
* 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/. */
|
* 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] {
|
richlistitem.download[active] {
|
||||||
-moz-binding: url('chrome://browser/content/downloads/download.xml#download-full-ui');
|
-moz-binding: url('chrome://browser/content/downloads/download.xml#download-full-ui');
|
||||||
}
|
}
|
||||||
|
@ -1047,20 +1047,10 @@ DownloadsPlacesView.prototype = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._appendDownloadsFragment(elementsToAppendFragment);
|
this._richlistbox.appendChild(elementsToAppendFragment);
|
||||||
this._ensureVisibleElementsAreActive();
|
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) {
|
nodeInserted: function DPV_nodeInserted(aParent, aPlacesNode) {
|
||||||
this._addDownloadData(null, aPlacesNode);
|
this._addDownloadData(null, aPlacesNode);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user