From 47d4238c0c88fdf81e68bf4dbbcb8030a6c0d754 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Fri, 27 Apr 2001 07:00:01 +0000 Subject: [PATCH] Remove my own droppings which crept into the valeski backout. git-svn-id: svn://10.0.0.236/trunk@93254 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 86 ---------------------------- 1 file changed, 86 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 9141d418a56..b26326d1015 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -55,7 +55,6 @@ #include "nsDocShell.h" #include "nsDocShellLoadInfo.h" #include "nsCDefaultURIFixup.h" -#include "nsDocShellEnumerator.h" // Helper Classes #include "nsDOMError.h" @@ -295,15 +294,6 @@ NS_IMETHODIMP nsDocShell::GetInterface(const nsIID& aIID, void** aSink) } return NS_NOINTERFACE; } - else if (aIID.Equals(NS_GET_IID(nsIWebBrowserFind))) - { - nsresult rv = EnsureFind(); - if (NS_FAILED(rv)) return rv; - - *aSink = mFind; - NS_ADDREF((nsISupports*)*aSink); - return NS_OK; - } else { return QueryInterface(aIID, aSink); @@ -785,35 +775,6 @@ nsDocShell::SetAllowSubframes(PRBool aAllowSubframes) return NS_OK; } -NS_IMETHODIMP -nsDocShell::GetDocShellEnumerator(PRInt32 aItemType, PRInt32 aDirection, nsISimpleEnumerator **outEnum) -{ - NS_ENSURE_ARG_POINTER(outEnum); - *outEnum = nsnull; - - nsDocShellEnumerator* docShellEnum; - if (aDirection == ENUMERATE_FORWARDS) - docShellEnum = new nsDocShellForwardsEnumerator; - else - docShellEnum = new nsDocShellBackwardsEnumerator; - - if (!docShellEnum) return NS_ERROR_OUT_OF_MEMORY; - - nsresult rv = docShellEnum->SetEnumDocShellType(aItemType); - if (NS_FAILED(rv)) return rv; - - rv = docShellEnum->SetEnumerationRootItem((nsIDocShellTreeItem *)this); - if (NS_FAILED(rv)) return rv; - - rv = docShellEnum->First(); - if (NS_FAILED(rv)) return rv; - - docShellEnum->AddRef(); // ensure we don't lose the last ref inside the QueryInterface - rv = docShellEnum->QueryInterface(NS_GET_IID(nsISimpleEnumerator), (void **)outEnum); - docShellEnum->Release(); - return rv; -} - NS_IMETHODIMP nsDocShell::GetAppType(PRUint32* aAppType) { *aAppType = mAppType; @@ -4663,53 +4624,6 @@ NS_IMETHODIMP nsDocShell::EnsureScriptEnvironment() return NS_OK; } -NS_IMETHODIMP nsDocShell::EnsureFind() -{ - nsresult rv; - if (!mFind) - { - mFind = do_CreateInstance("@mozilla.org/embedcomp/find;1", &rv); - if (NS_FAILED(rv)) return rv; - } - - // we promise that the nsIWebBrowserFind that we return has been set - // up to point to the focussed, or content window, so we have to - // set that up each time. - nsCOMPtr scriptGO; - rv = GetScriptGlobalObject(getter_AddRefs(scriptGO)); - if (NS_FAILED(rv)) return rv; - - // default to our window - nsCOMPtr rootWindow = do_QueryInterface(scriptGO); - nsCOMPtr windowToSearch = rootWindow; - - // if we can, search the focussed window - nsCOMPtr ourWindow = do_QueryInterface(scriptGO); - nsCOMPtr focusController; - if (ourWindow) - ourWindow->GetRootFocusController(getter_AddRefs(focusController)); - if (focusController) - { - nsCOMPtr focussedWindow; - focusController->GetFocusedWindow(getter_AddRefs(focussedWindow)); - if (focussedWindow) - { - rootWindow = focussedWindow; // constrain to the focussed window. - windowToSearch = focussedWindow; - } - } - - nsCOMPtr findInFrames = do_QueryInterface(mFind); - if (!findInFrames) return NS_ERROR_NO_INTERFACE; - - rv = findInFrames->SetRootSearchFrame(rootWindow); - if (NS_FAILED(rv)) return rv; - rv = findInFrames->SetCurrentSearchFrame(windowToSearch); - if (NS_FAILED(rv)) return rv; - - return NS_OK; -} - PRBool nsDocShell::IsFrame() { if(mParent)