mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 191637 Customize Toolbar Bustage. patch by Boris Zbarsky.
This commit is contained in:
parent
f2bc384b60
commit
cf728cada2
@ -213,8 +213,8 @@ function wrapToolbarItems()
|
||||
function unwrapToolbarItems()
|
||||
{
|
||||
var paletteItems = gToolbox.getElementsByTagName("toolbarpaletteitem");
|
||||
for (var i = 0; i < paletteItems.length; ++i) {
|
||||
var paletteItem = paletteItems[i];
|
||||
var paletteItem;
|
||||
while ((paletteItem = paletteItems.item(0)) != null) {
|
||||
var toolbarItem = paletteItem.firstChild;
|
||||
|
||||
if (paletteItem.hasAttribute("itemdisabled"))
|
||||
@ -223,6 +223,8 @@ function unwrapToolbarItems()
|
||||
if (paletteItem.hasAttribute("itemcommand"))
|
||||
toolbarItem.setAttribute("command", paletteItem.getAttribute("itemcommand"));
|
||||
|
||||
// We need the removeChild here because replaceChild and XBL no workee
|
||||
// together. See bug 193298.
|
||||
paletteItem.removeChild(toolbarItem);
|
||||
paletteItem.parentNode.replaceChild(toolbarItem, paletteItem);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user