Fix for bug 539239 (Pass correct document to ReparentContentWrapper). r=jst.

This commit is contained in:
Peter Van der Beken
2010-01-16 15:27:51 +01:00
parent 69f805d43c
commit ae32e8032b
3 changed files with 5 additions and 90 deletions

View File

@@ -3921,11 +3921,10 @@ nsGenericElement::doReplaceOrInsertBefore(PRBool aReplace,
}
}
if (!newContent->IsXUL()) {
nsContentUtils::ReparentContentWrapper(newContent, aParent,
container->GetOwnerDoc(),
container->GetOwnerDoc());
}
// FIXME https://bugzilla.mozilla.org/show_bug.cgi?id=544654
// We need to reparent here for nodes for which the parent of their
// wrapper is not the wrapper for their ownerDocument (XUL elements,
// form controls, ...).
res = container->InsertChildAt(newContent, insPos, PR_TRUE);
NS_ENSURE_SUCCESS(res, res);