From e7c9e6b3a840009760ea95efddfc0a936003ead6 Mon Sep 17 00:00:00 2001 From: "jst%netscape.com" Date: Fri, 30 Nov 2001 07:49:32 +0000 Subject: [PATCH] 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 --- .../components/windowwatcher/src/nsWindowWatcher.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp index d4df21941f1a..92312e44cb37 100644 --- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp +++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp @@ -1037,8 +1037,13 @@ nsWindowWatcher::URIfromURL(const char *aURL, if (domDoc) { nsCOMPtr 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)); + } + } } }