From b0edbc3760297d4e10aae1b17aeb10f9560b46f5 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Fri, 22 Mar 2002 19:20:54 +0000 Subject: [PATCH] Bug #132643 --> add a new web browser chrome flag for a popup type. r=danm sr=hewitt --- embedding/browser/webBrowser/nsIWebBrowserChrome.idl | 1 + embedding/components/windowwatcher/src/nsWindowWatcher.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/embedding/browser/webBrowser/nsIWebBrowserChrome.idl b/embedding/browser/webBrowser/nsIWebBrowserChrome.idl index 4c9c9d45e359..29987b77aa7a 100644 --- a/embedding/browser/webBrowser/nsIWebBrowserChrome.idl +++ b/embedding/browser/webBrowser/nsIWebBrowserChrome.idl @@ -77,6 +77,7 @@ interface nsIWebBrowserChrome : nsISupports // special cases const unsigned long CHROME_WINDOW_MIN = 0x00004000; + const unsigned long CHROME_WINDOW_POPUP = 0x00008000; const unsigned long CHROME_WINDOW_RAISED = 0x02000000; const unsigned long CHROME_WINDOW_LOWERED = 0x04000000; diff --git a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp index b0d83e14bede..09f8f2d9fea2 100644 --- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp +++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp @@ -1142,6 +1142,9 @@ PRUint32 nsWindowWatcher::CalculateChromeFlags(const char *aFeatures, chromeFlags |= WinHasOption(aFeatures, "minimizable", 0, &presenceFlag) ? nsIWebBrowserChrome::CHROME_WINDOW_MIN : 0; + chromeFlags |= WinHasOption(aFeatures, "popup", 0, &presenceFlag) + ? nsIWebBrowserChrome::CHROME_WINDOW_POPUP : 0; + /* OK. Normal browser windows, in spite of a stated pattern of turning off all chrome not mentioned explicitly, will want the new OS chrome (window @@ -1211,6 +1214,7 @@ PRUint32 nsWindowWatcher::CalculateChromeFlags(const char *aFeatures, chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_CLOSE; chromeFlags &= ~nsIWebBrowserChrome::CHROME_WINDOW_LOWERED; chromeFlags &= ~nsIWebBrowserChrome::CHROME_WINDOW_RAISED; + chromeFlags &= ~nsIWebBrowserChrome::CHROME_WINDOW_POPUP; //XXX Temporarily removing this check to allow modal dialogs to be //raised from script. A more complete security based fix is needed. //chromeFlags &= ~nsIWebBrowserChrome::CHROME_MODAL;