diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 1cc0cda45cad..75b1f809173b 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2733,33 +2733,62 @@ --> - - - + + + - + ]]> + + + + + + + + + + + @@ -2781,21 +2810,25 @@ menuItem.setAttribute("selected", "true"); menuItem.setAttribute("class", "menuitem-iconic alltabs-item"); - // XXX todo - // what if uri, image/favicon, title change - // while this popup is open? - // mano warns: "be careful of leaks when addressing this." menuItem.setAttribute("label", curTab.label); + menuItem.setAttribute("crop", curTab.getAttribute("crop")); menuItem.setAttribute("image", curTab.getAttribute("image")); - var URI = curTab.linkedBrowser.currentURI.spec; + if (curTab.hasAttribute("busy")) + menuItem.setAttribute("busy", curTab.getAttribute("busy")); + // XXX todo // statustext not working yet, since I don't have a menubar // reuse the menubar statustext logic + var URI = curTab.linkedBrowser.currentURI.spec; menuItem.setAttribute("statustext", URI); + + // Keep some attributes of the menuitem in sync with its + // corresponding tab (e.g. the tab label) + curTab.mCorrespondingMenuitem = menuItem; + curTab.addEventListener("DOMAttrModified", this, false); + menuItem.tab = curTab; - menuItem.addEventListener("command", - this._allTabsMenuItemCommandHandler, - false); + menuItem.addEventListener("command", this, false); this.appendChild(menuItem); } ]]> @@ -2872,6 +2905,7 @@ false + null