Bug 312308 - tabbrowser: closing tab throws exception when no "autocompletepopup" attribute is set, patch by Garrett Davis <gdavis@nsisoftware.com> r=me

This commit is contained in:
bsmedberg%covad.net 2005-10-17 17:08:12 +00:00
parent 69e9dc7e4c
commit b26a3c2f1c
2 changed files with 5 additions and 4 deletions

View File

@ -366,10 +366,10 @@
getService(Components.interfaces.nsIFormFillController);
var popup = document.getElementById(this.getAttribute("autocompletepopup"));
if (popup)
if (popup) {
controller.attachToBrowser(this.docShell, popup.QueryInterface(Components.interfaces.nsIAutoCompletePopup));
this.mFormFillAttached = true;
this.mFormFillAttached = true;
}
}
]]>
</body>

View File

@ -1066,7 +1066,8 @@
b.setAttribute("message", "true");
b.setAttribute("contextmenu", this.getAttribute("contentcontextmenu"));
b.setAttribute("tooltip", this.getAttribute("contenttooltip"));
b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
if (this.hasAttribute("autocompletepopup"))
b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup"));
// Add the Message and the Browser to the box
var vbox = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",