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

@@ -80,8 +80,6 @@
#include "nsPIDOMWindow.h"
#include "nsIDOMWindowCollection.h"
#include "nsIFocusController.h"
#include "nsIDOMWindowInternal.h"
#include "nsIScriptGlobalObject.h"
#include "nsIWindowWatcher.h"
#include "nsPIWindowWatcher.h"
#include "nsIPrompt.h"
@@ -304,20 +302,18 @@ nsDocShellTreeOwner::FindChildWithName(const PRUnichar *aName, PRBool aRecurse,
for (ctr = 0; ctr < count; ctr++) {
nsCOMPtr<nsIDOMWindow> frame;
frames->Item(ctr, getter_AddRefs(frame));
if (frame) {
nsCOMPtr<nsIScriptGlobalObject> sgo(do_QueryInterface(frame));
if (sgo) {
nsCOMPtr<nsIDocShellTreeItem> item =
do_QueryInterface(sgo->GetDocShell());
if (item && item != aRequestor) {
rv = item->FindItemWithName(aName, mWebBrowser->mDocShellAsItem,
aOriginalRequestor, aFoundItem);
if (NS_FAILED(rv) || *aFoundItem)
break;
}
nsCOMPtr<nsPIDOMWindow> w(do_QueryInterface(frame));
if (w) {
nsCOMPtr<nsIDocShellTreeItem> item = do_QueryInterface(w->GetDocShell());
if (item && item != aRequestor) {
rv = item->FindItemWithName(aName, mWebBrowser->mDocShellAsItem,
aOriginalRequestor, aFoundItem);
if (NS_FAILED(rv) || *aFoundItem)
break;
}
}
}
return rv;
}