Fixing bug 93513. Make window.open() use the base uri of the caller as the base, and not the document uri of the caller. r=danm@netscape.com, sr=rpotts@netscape.com

This commit is contained in:
jst%netscape.com 2001-11-30 07:49:32 +00:00
parent 166f0b62d4
commit e7c9e6b3a8

View File

@ -1037,8 +1037,13 @@ nsWindowWatcher::URIfromURL(const char *aURL,
if (domDoc) {
nsCOMPtr<nsIDocument> doc;
doc = do_QueryInterface(domDoc);
if (doc)
doc->GetDocumentURL(getter_AddRefs(baseURI));
if (doc) {
doc->GetBaseURL(*getter_AddRefs(baseURI));
if (!baseURI) {
doc->GetDocumentURL(getter_AddRefs(baseURI));
}
}
}
}