Fix for bug 539239 (Pass correct document to ReparentContentWrapper). r=jst.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user