This commit is contained in:
Peter Van der Beken 2009-02-05 10:42:55 +01:00
Родитель e904b3d6e8
Коммит 871efa46a0
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -2658,6 +2658,9 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
// Make sure to unbind this node before doing the kids
nsIDocument *document =
HasFlag(NODE_FORCE_XBL_BINDINGS) ? GetOwnerDoc() : GetCurrentDoc();
mParentPtrBits = aNullParent ? 0 : mParentPtrBits & ~PARENT_BIT_INDOCUMENT;
if (document) {
// Notify XBL- & nsIAnonymousContentCreator-generated
// anonymous content that the document is changing.
@ -2670,9 +2673,6 @@ nsGenericElement::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
document->ClearBoxObjectFor(this);
}
// Unset things in the reverse order from how we set them in BindToTree
mParentPtrBits = aNullParent ? 0 : mParentPtrBits & ~PARENT_BIT_INDOCUMENT;
// Unset this since that's what the old code effectively did.
UnsetFlags(NODE_FORCE_XBL_BINDINGS);