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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user