Making sure dialogs really look like dialogs.
git-svn-id: svn://10.0.0.236/trunk@38365 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1395,10 +1395,18 @@ nsWebShellWindow::NewWebShell(PRUint32 aChromeMask, PRBool aVisible,
|
||||
|
||||
nsCOMPtr<nsIWebShellWindow> newWindow;
|
||||
|
||||
PRBool openAsDialog = ((aChromeMask & NS_CHROME_OPEN_AS_DIALOG) != 0);
|
||||
|
||||
// XXX Check modal chrome flag to run a modal dialog!
|
||||
|
||||
if ((aChromeMask & NS_CHROME_OPEN_AS_CHROME) != 0) {
|
||||
// Just do a nice normal create of a web shell and
|
||||
// return it immediately.
|
||||
rv = appShell->CreateTopLevelWindow(nsnull, nsnull, PR_FALSE, getter_AddRefs(newWindow),
|
||||
// return it immediately.
|
||||
|
||||
if (openAsDialog)
|
||||
rv = appShell->CreateDialogWindow(nsnull, nsnull, PR_FALSE, getter_AddRefs(newWindow),
|
||||
nsnull, nsnull, NS_SIZETOCONTENT, NS_SIZETOCONTENT);
|
||||
else rv = appShell->CreateTopLevelWindow(nsnull, nsnull, PR_FALSE, getter_AddRefs(newWindow),
|
||||
nsnull, nsnull, NS_SIZETOCONTENT, NS_SIZETOCONTENT);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCOMPtr<nsIBrowserWindow> browser(do_QueryInterface(newWindow));
|
||||
@@ -1440,9 +1448,13 @@ nsWebShellWindow::NewWebShell(PRUint32 aChromeMask, PRBool aVisible,
|
||||
NS_RELEASE(uri);
|
||||
#endif // NECKO
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = appShell->CreateTopLevelWindow(nsnull, urlObj, PR_FALSE, getter_AddRefs(newWindow),
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (openAsDialog)
|
||||
rv = appShell->CreateDialogWindow(nsnull, urlObj, PR_FALSE, getter_AddRefs(newWindow),
|
||||
nsnull, nsnull, 615, 480);
|
||||
else rv = appShell->CreateTopLevelWindow(nsnull, urlObj, PR_FALSE, getter_AddRefs(newWindow),
|
||||
nsnull, nsnull, 615, 480);
|
||||
}
|
||||
|
||||
nsIAppShell *subshell;
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
||||
Reference in New Issue
Block a user