From e8d54554c1aa6eff22b13fa6b37dd9edd42df733 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Mon, 18 Apr 2005 23:01:30 +0000 Subject: [PATCH] Remove code that just duplicates what SetAnonymousContentFor(content, nsnull) will do anyway. Bug 289391, r=sicking, sr=peterv, a=brendan --- content/xbl/src/nsBindingManager.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/content/xbl/src/nsBindingManager.cpp b/content/xbl/src/nsBindingManager.cpp index e783287240db..d6a40d30f767 100644 --- a/content/xbl/src/nsBindingManager.cpp +++ b/content/xbl/src/nsBindingManager.cpp @@ -434,30 +434,9 @@ nsBindingManager::ChangeDocumentFor(nsIContent* aContent, nsIDocument* aOldDocum nsIPresShell *shell = aOldDocument->GetShellAt(i); NS_ASSERTION(shell != nsnull, "Zoiks! nsIDocument::GetShellAt() broke"); - // See if the element has nsIAnonymousContentCreator-created - // anonymous content... + // now clear out the anonymous content for this node in the old presshell. // XXXbz this really doesn't belong here, somehow... either that, or we // need to better define what sort of bindings we're managing. - nsCOMPtr anonymousElements; - shell->GetAnonymousContentFor(aContent, getter_AddRefs(anonymousElements)); - - if (anonymousElements) { - // ...yep, so be sure to update the doc pointer in those - // elements, too. - PRUint32 count; - anonymousElements->Count(&count); - - while (PRInt32(--count) >= 0) { - nsCOMPtr content( do_QueryElementAt(anonymousElements, count)); - NS_ASSERTION(content != nsnull, "not an nsIContent"); - if (! content) - continue; - - content->UnbindFromTree(); - } - } - - // now clear out the anonymous content for this node in the old presshell. shell->SetAnonymousContentFor(aContent, nsnull); }