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 2006-05-17 02:38:51 +00:00
Родитель a1ff6eec94
Коммит 69fa4b03b6
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -43,7 +43,7 @@
#include "nsIDocument.h"
#include "nsIContent.h"
#include "nsIContentViewer.h"
#include "nsIScriptGlobalObject.h"
#include "nsPIDOMWindow.h"
#include "nsIDocShell.h"
#include "nsIDocShellTreeItem.h"
#include "nsIWebNavigation.h"
@ -81,10 +81,10 @@ inLayoutUtils::GetWindowFor(nsIDOMDocument* aDoc)
nsIPresShell*
inLayoutUtils::GetPresShellFor(nsISupports* aThing)
{
nsCOMPtr<nsIScriptGlobalObject> so = do_QueryInterface(aThing);
nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(aThing);
nsCOMPtr<nsIPresShell> presShell;
so->GetDocShell()->GetPresShell(getter_AddRefs(presShell));
window->GetDocShell()->GetPresShell(getter_AddRefs(presShell));
return presShell;
}