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

This commit is contained in:
jst@mozilla.jstenback.com
2005-11-28 23:56:44 +00:00
parent 47c23270b2
commit 3434d072e9
102 changed files with 790 additions and 1012 deletions
+2 -6
View File
@@ -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;