From e86f704ac757532dba8ef6f498f83bbbee7b8da3 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 1 May 2005 17:32:49 +0000 Subject: [PATCH] Don't flag XUL elements created via nsXULElement::Create as being in a document -- they're not. Bug 292247, r=sicking, sr=jst, a=chofmann --- content/xul/content/src/nsXULElement.cpp | 12 ------------ content/xul/document/src/nsXULDocument.cpp | 3 --- 2 files changed, 15 deletions(-) diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index c9cdf34c5016..a40a35314d83 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -402,12 +402,6 @@ nsXULElement::Create(nsXULPrototypeElement* aPrototype, return NS_ERROR_OUT_OF_MEMORY; element->mPrototype = aPrototype; - if (aDocument) { - element->mParentPtrBits |= PARENT_BIT_INDOCUMENT; - } - else { - element->mParentPtrBits &= ~PARENT_BIT_INDOCUMENT; - } aPrototype->AddRef(); @@ -530,12 +524,6 @@ nsXULElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) getter_AddRefs(result)); NS_ENSURE_SUCCESS(rv, rv); - // Make sure to unset the "in document" bit we picked up in Create() - // while we create our kids. We'll reset it as needed at the end of - // this function. - NS_STATIC_CAST(nsXULElement*, - NS_STATIC_CAST(nsIContent*, result.get()))-> - mParentPtrBits &= ~PARENT_BIT_INDOCUMENT; fakeBeingInDocument = IsInDoc(); } else { rv = NS_NewXULElement(getter_AddRefs(result), mNodeInfo); diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index 8eb58aff7185..597a90d003bf 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -3886,9 +3886,6 @@ nsXULDocument::OverlayForwardReference::Merge(nsIContent* aTargetNode, rv = aOverlayNode->GetAttr(nameSpaceID, attr, value); if (NS_FAILED(rv)) return rv; - nsAutoString tempID; - rv = aOverlayNode->GetAttr(kNameSpaceID_None, nsXULAtoms::id, tempID); - // Element in the overlay has the 'removeelement' attribute set // so remove it from the actual document. if (attr == nsXULAtoms::removeelement &&