Make sure to tear down the XBL binding for nodes which forced one even though not in the document. Bug 389636, r+sr+a=sicking

This commit is contained in:
2007-09-20 19:05:43 -07:00
parent 296c01d9e2
commit 42a65f2012
3 changed files with 34 additions and 1 deletions

View File

@@ -2089,7 +2089,8 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
"Shallow unbind won't clear document and binding parent on "
"kids!");
// Make sure to unbind this node before doing the kids
nsIDocument *document = GetCurrentDoc();
nsIDocument *document =
HasFlag(NODE_FORCE_XBL_BINDINGS) ? GetOwnerDoc() : GetCurrentDoc();
if (document) {
// Notify XBL- & nsIAnonymousContentCreator-generated
// anonymous content that the document is changing.