From 2a1378d3ffcd8b2e78894a3c199ce81762057eb0 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Fri, 29 Oct 1999 02:05:16 +0000 Subject: [PATCH] I added logic to the viewers browser window to disable javascript initiated popups during web crawling --- webshell/tests/viewer/nsBrowserWindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webshell/tests/viewer/nsBrowserWindow.cpp b/webshell/tests/viewer/nsBrowserWindow.cpp index 57bc56f7e4c5..e99c86a78d67 100644 --- a/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/webshell/tests/viewer/nsBrowserWindow.cpp @@ -1911,6 +1911,14 @@ nsBrowserWindow::NewWebShell(PRUint32 aChromeMask, { nsresult rv = NS_OK; + if (mWebCrawler) { + if (mWebCrawler->Crawling() || mWebCrawler->LoadingURLList()) { + // Do not fly javascript popups when we are crawling + aNewWebShell = nsnull; + return NS_ERROR_NOT_IMPLEMENTED; + } + } + // Create new window. By default, the refcnt will be 1 because of // the registration of the browser window in gBrowsers. nsNativeBrowserWindow* browser;