Fixing bug 316794. Moving HandleDOMEvent() and Get/SetDocShell from nsIScriptGlobalObject to nsPIDOMWindow. r=mrbkap@gmail.com, sr=peterv@propagandism.org

git-svn-id: svn://10.0.0.236/trunk@185351 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com
2005-11-28 23:56:44 +00:00
parent e4c5fe4567
commit 895df6e6ca
125 changed files with 882 additions and 1124 deletions

View File

@@ -42,7 +42,7 @@
#include "nsDocShellTreeOwner.h"
#include "nsIAllocator.h"
#include "nsIScriptGlobalObject.h"
#include "nsPIDOMWindow.h"
nsCommandHandler::nsCommandHandler() :
mWindow(nsnull)
@@ -63,8 +63,8 @@ nsresult nsCommandHandler::GetCommandHandler(nsICommandHandler **aCommandHandler
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIScriptGlobalObject> globalObj( do_QueryInterface(mWindow) );
if (!globalObj)
nsCOMPtr<nsPIDOMWindow> window(do_QueryInterface(mWindow));
if (!window)
{
return NS_ERROR_FAILURE;
}
@@ -72,7 +72,7 @@ nsresult nsCommandHandler::GetCommandHandler(nsICommandHandler **aCommandHandler
// Get the document tree owner
nsCOMPtr<nsIDocShellTreeItem> docShellAsTreeItem =
do_QueryInterface(globalObj->GetDocShell());
do_QueryInterface(window->GetDocShell());
nsIDocShellTreeOwner *treeOwner = nsnull;
docShellAsTreeItem->GetTreeOwner(&treeOwner);