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