Backed out changeset cac4e8a16532 (bug 771273)

This commit is contained in:
Justin Lebar
2012-07-23 15:39:03 -04:00
parent de08c9f6e8
commit 074e2c17c8
3 changed files with 26 additions and 52 deletions

View File

@@ -2747,10 +2747,6 @@ nsDocShell::GetSameTypeParent(nsIDocShellTreeItem ** aParent)
NS_ENSURE_ARG_POINTER(aParent);
*aParent = nsnull;
if (mIsBrowserFrame) {
return NS_OK;
}
nsCOMPtr<nsIDocShellTreeItem> parent =
do_QueryInterface(GetAsSupports(mParent));
if (!parent)
@@ -2765,27 +2761,6 @@ nsDocShell::GetSameTypeParent(nsIDocShellTreeItem ** aParent)
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetParentIgnoreBrowserFrame(nsIDocShell** aParent)
{
NS_ENSURE_ARG_POINTER(aParent);
*aParent = nsnull;
nsCOMPtr<nsIDocShellTreeItem> parent =
do_QueryInterface(GetAsSupports(mParent));
if (!parent)
return NS_OK;
PRInt32 parentType;
NS_ENSURE_SUCCESS(parent->GetItemType(&parentType), NS_ERROR_FAILURE);
if (parentType == mItemType) {
nsCOMPtr<nsIDocShell> parentDS = do_QueryInterface(parent);
parentDS.forget(aParent);
}
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetRootTreeItem(nsIDocShellTreeItem ** aRootTreeItem)
{
@@ -11118,9 +11093,16 @@ NS_IMETHODIMP nsDocShell::EnsureFind()
bool
nsDocShell::IsFrame()
{
nsCOMPtr<nsIDocShellTreeItem> parent;
GetSameTypeParent(getter_AddRefs(parent));
return !!parent;
nsCOMPtr<nsIDocShellTreeItem> parent =
do_QueryInterface(GetAsSupports(mParent));
if (parent) {
PRInt32 parentType = ~mItemType; // Not us
parent->GetItemType(&parentType);
if (parentType == mItemType) // This is a frame
return true;
}
return false;
}
/* boolean IsBeingDestroyed (); */