SetJSStatus, SetJSDefaultStatus and SetOverLink now poke a DOM attribute on element WebBrowserChrome in the xul window if one exists. Renamed nsXULWindow::GetDOMElementFromDocShell to be nsXULWindow::GetWindowDOMElement. This cleans up having to pass in the same docShell over and over and make it mean more of what it is. Added a nsXULWindow::GetElementById which returns an element of the specified id within the xul window. nsContentTreeOwner doesn't need to cache the defaultStatus. nsWebShellWindow doesn't need to call ExecutStartupCode anymore as that was only there for nsIXULWindowCallbacks code which is gone. nsWebShellWindow doesn't need to cache mStatus or mDefaultStatus.

git-svn-id: svn://10.0.0.236/trunk@63143 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-03-16 05:45:26 +00:00
parent 1f3d9b7fe3
commit bb30d7f409
6 changed files with 55 additions and 69 deletions

View File

@@ -1285,8 +1285,6 @@ nsWebShellWindow::OnEndDocumentLoad(nsIDocumentLoader* loader,
}
#endif
ExecuteStartupCode();
#ifdef USE_NATIVE_MENUS
///////////////////////////////
// Find the Menubar DOM and Load the menus, hooking them up to the loaded commands
@@ -1416,39 +1414,6 @@ nsCOMPtr<nsIDOMDocument> nsWebShellWindow::GetNamedDOMDoc(const nsString & aWebS
//----------------------------------------
/**
* Get nsIDOMNode corresponding to a given webshell
* @param aShell the given webshell
* @return the corresponding DOM element, null if for some reason there is none
*/
nsCOMPtr<nsIDOMNode>
nsWebShellWindow::GetDOMNodeFromWebShell(nsIWebShell *aShell)
{
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aShell));
nsCOMPtr<nsIDOMElement> element;
GetDOMElementFromDocShell(docShell, getter_AddRefs(element));
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(element));
return node;
}
/**
* XXX Hack for XUL Window callbacks. MUST GO AWAY!!!!
*/
void nsWebShellWindow::ExecuteStartupCode()
{
nsCOMPtr<nsIDOMNode> webshellNode = GetDOMNodeFromWebShell(mWebShell);
nsCOMPtr<nsIDOMElement> webshellElement;
if (webshellNode)
webshellElement = do_QueryInterface(webshellNode);
// Execute the string in the onLoad attribute of the webshellElement.
nsString startupCode;
}
/* copy the window's size and position to the window tag */
void nsWebShellWindow::StoreBoundsToXUL(PRBool aPosition, PRBool aSize, PRBool aSizeMode)
{