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
This commit is contained in:
@@ -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<nsIScriptGlobalObject> scriptGO;
|
||||
rv = GetScriptGlobalObject(getter_AddRefs(scriptGO));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// default to our window
|
||||
nsCOMPtr<nsIDOMWindow> rootWindow = do_QueryInterface(scriptGO);
|
||||
nsCOMPtr<nsIDOMWindow> windowToSearch = rootWindow;
|
||||
|
||||
// if we can, search the focussed window
|
||||
nsCOMPtr<nsPIDOMWindow> ourWindow = do_QueryInterface(scriptGO);
|
||||
nsCOMPtr<nsIFocusController> focusController;
|
||||
if (ourWindow)
|
||||
ourWindow->GetRootFocusController(getter_AddRefs(focusController));
|
||||
if (focusController)
|
||||
{
|
||||
nsCOMPtr<nsIDOMWindowInternal> focussedWindow;
|
||||
focusController->GetFocusedWindow(getter_AddRefs(focussedWindow));
|
||||
if (focussedWindow)
|
||||
{
|
||||
rootWindow = focussedWindow; // constrain to the focussed window.
|
||||
windowToSearch = focussedWindow;
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWebBrowserFindInFrames> 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)
|
||||
|
||||
Reference in New Issue
Block a user