From c558d21cc3ca20a9596ec647682f93c8b816c41a Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Sat, 31 Jul 1999 21:08:10 +0000 Subject: [PATCH] Fixing nsIXUlWindowCallbacks bustage. I accidentally commented out the ExecuteStartupCode() function, which still needs to be called for now. git-svn-id: svn://10.0.0.236/trunk@41741 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/appshell/src/nsWebShellWindow.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index 364ea5b5ae3..0ab41f176db 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -1812,7 +1812,7 @@ nsWebShellWindow::OnEndDocumentLoad(nsIDocumentLoader* loader, mLockedUntilChromeLoad = PR_FALSE; } -#ifdef XP_MAC +#ifdef XP_MAC // Anyone still using native menus should add themselves here. // register as document listener // this is needed for menus nsCOMPtr cv; @@ -1830,16 +1830,18 @@ nsWebShellWindow::OnEndDocumentLoad(nsIDocumentLoader* loader, doc->AddObserver(NS_STATIC_CAST(nsIDocumentObserver*, this)); } +#endif ExecuteStartupCode(); +#ifdef XP_MAC // Anyone still using native menus should add themselves here. /////////////////////////////// // Find the Menubar DOM and Load the menus, hooking them up to the loaded commands /////////////////////////////// nsCOMPtr menubarDOMDoc(GetNamedDOMDoc(nsAutoString("this"))); // XXX "this" is a small kludge for code reused if (menubarDOMDoc) { -#ifdef XP_MAC +#ifdef XP_MAC // Anyone using native non-dynamic menus should add themselves here. LoadMenus(menubarDOMDoc, mWindow); // Context Menu test nsCOMPtr element; @@ -2220,13 +2222,9 @@ void nsWebShellWindow::ExecuteStartupCode() // Execute the string in the onLoad attribute of the webshellElement. nsString startupCode; - // This is now triggered from elsewhere. - //if (webshellElement && NS_SUCCEEDED(webshellElement->GetAttribute("onload", startupCode))) - // ExecuteJavaScriptString(startupCode); - + if (mCallbacks) mCallbacks->ConstructAfterJavaScript(mWebShell); - }