porting over changes from mozilla trunk

git-svn-id: svn://10.0.0.236/branches/ANGELON_MOZ12_BRANCH@141908 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brade%netscape.com
2003-04-28 21:09:46 +00:00
parent 36776f37ec
commit 4b73f6787f
37 changed files with 1165 additions and 1489 deletions

View File

@@ -425,6 +425,12 @@ NS_IMETHODIMP nsDocShell::GetInterface(const nsIID & aIID, void **aSink)
return NS_NOINTERFACE;
}
else if (aIID.Equals(NS_GET_IID(nsIClipboardDragDropHookList))
&& NS_SUCCEEDED(EnsureTransferableHookData())) {
*aSink = mTransferableHookData;
NS_ADDREF((nsISupports *)*aSink);
return NS_OK;
}
else if (aIID.Equals(NS_GET_IID(nsISelectionDisplay))) {
nsCOMPtr<nsIPresShell> shell;
nsresult rv = GetPresShell(getter_AddRefs(shell));
@@ -2966,6 +2972,8 @@ nsDocShell::Destroy()
delete mEditorData;
mEditorData = 0;
mTransferableHookData = nsnull;
// Save the state of the current document, before destroying the window.
// This is needed to capture the state of a frameset when the new document
// causes the frameset to be destroyed...
@@ -6562,6 +6570,17 @@ nsDocShell::EnsureEditorData()
return mEditorData ? NS_OK : NS_ERROR_FAILURE;
}
nsresult
nsDocShell::EnsureTransferableHookData()
{
if (!mTransferableHookData) {
mTransferableHookData = new nsTransferableHookData(); // owning addref
if (!mTransferableHookData) return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
}
NS_IMETHODIMP nsDocShell::EnsureFind()
{