bug 841436 - remove nolonger needed qi from nsIDocShell to nsIDocShellTreeItem r=bz

This commit is contained in:
Trevor Saunders
2013-02-12 17:02:51 -05:00
parent eb9422d043
commit 443e419ad9
50 changed files with 216 additions and 361 deletions

View File

@@ -53,8 +53,6 @@
#include "nsIMarkupDocumentViewer.h"
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIDocShellTreeItem.h"
#include "nsIDocShellTreeNode.h"
#include "nsIDocShellTreeOwner.h"
#include "nsIDocShell.h"
#include "nsIBaseWindow.h"
@@ -1330,14 +1328,11 @@ AttachContainerRecurse(nsIDocShell* aShell)
}
// Now recurse through the children
nsCOMPtr<nsIDocShellTreeNode> node = do_QueryInterface(aShell);
NS_ASSERTION(node, "docshells must implement nsIDocShellTreeNode");
int32_t childCount;
node->GetChildCount(&childCount);
aShell->GetChildCount(&childCount);
for (int32_t i = 0; i < childCount; ++i) {
nsCOMPtr<nsIDocShellTreeItem> childItem;
node->GetChildAt(i, getter_AddRefs(childItem));
aShell->GetChildAt(i, getter_AddRefs(childItem));
AttachContainerRecurse(nsCOMPtr<nsIDocShell>(do_QueryInterface(childItem)));
}
}
@@ -1487,14 +1482,11 @@ DetachContainerRecurse(nsIDocShell *aShell)
}
// Now recurse through the children
nsCOMPtr<nsIDocShellTreeNode> node = do_QueryInterface(aShell);
NS_ASSERTION(node, "docshells must implement nsIDocShellTreeNode");
int32_t childCount;
node->GetChildCount(&childCount);
aShell->GetChildCount(&childCount);
for (int32_t i = 0; i < childCount; ++i) {
nsCOMPtr<nsIDocShellTreeItem> childItem;
node->GetChildAt(i, getter_AddRefs(childItem));
aShell->GetChildAt(i, getter_AddRefs(childItem));
DetachContainerRecurse(nsCOMPtr<nsIDocShell>(do_QueryInterface(childItem)));
}
}