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:
@@ -61,12 +61,11 @@
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIFilePicker.h"
|
||||
#include "nsIDOMMouseEvent.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsILocalFile.h"
|
||||
#include "nsITextControlElement.h"
|
||||
#include "nsNodeInfoManager.h"
|
||||
@@ -315,9 +314,6 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||
if (!doc)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> parentWindow =
|
||||
do_QueryInterface(doc->GetScriptGlobalObject());
|
||||
|
||||
// Get Loc title
|
||||
nsXPIDLString title;
|
||||
nsContentUtils::GetLocalizedString(nsContentUtils::eFORMS_PROPERTIES,
|
||||
@@ -327,7 +323,7 @@ nsFileControlFrame::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||
if (!filePicker)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
result = filePicker->Init(parentWindow, title, nsIFilePicker::modeOpen);
|
||||
result = filePicker->Init(doc->GetWindow(), title, nsIFilePicker::modeOpen);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user