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
This commit is contained in:
bzbarsky%mit.edu 2005-05-01 17:32:49 +00:00
Родитель b23e220365
Коммит e86f704ac7
2 изменённых файлов: 0 добавлений и 15 удалений

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

@ -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);

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

@ -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 &&