mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 461027, r+sr=bz
This commit is contained in:
parent
c4e089543d
commit
3abb81ab1d
@ -725,6 +725,21 @@ nsXBLBinding::GenerateAnonymousContent()
|
||||
if (ni->NamespaceID() != kNameSpaceID_XUL ||
|
||||
(localName != nsGkAtoms::observes &&
|
||||
localName != nsGkAtoms::_template)) {
|
||||
// Undo InstallAnonymousContent
|
||||
PRUint32 childCount = mContent->GetChildCount();
|
||||
#ifdef MOZ_XUL
|
||||
nsCOMPtr<nsIXULDocument> xuldoc(do_QueryInterface(doc));
|
||||
#endif
|
||||
for (PRUint32 k = 0; k < childCount; ++k) {
|
||||
nsIContent* child = mContent->GetChildAt(k);
|
||||
child->UnbindFromTree();
|
||||
#ifdef MOZ_XUL
|
||||
if (xuldoc) {
|
||||
xuldoc->RemoveSubtreeFromDocument(child);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Kill all anonymous content.
|
||||
mContent = nsnull;
|
||||
bindingManager->SetContentListFor(mBoundElement, nsnull);
|
||||
|
Loading…
Reference in New Issue
Block a user