Remove GetContentShellById from nsIWebShellWindow & impl as it's already defined in nsIXULWindow. b=122861 r=timeless@mac.com sr=jag@netscape.com

This commit is contained in:
locka%iol.ie 2002-02-05 12:41:47 +00:00
Родитель d223dd0666
Коммит d1e0b4e3c3
3 изменённых файлов: 3 добавлений и 24 удалений

Просмотреть файл

@ -63,9 +63,6 @@ public:
NS_IMETHOD GetWidget(nsIWidget *& aWidget) = 0;
NS_IMETHOD GetDOMWindow(nsIDOMWindowInternal** aDOMWindow) = 0;
NS_IMETHOD ConvertWebShellToDOMWindow(nsIWebShell* aShell, nsIDOMWindowInternal** aDOMWindow) = 0;
NS_IMETHOD GetContentShellById(const nsString& anID, nsIWebShell** aResult) = 0;
NS_IMETHOD LockUntilChromeLoad() = 0;
NS_IMETHOD GetLockedState(PRBool& aResult) = 0;

Просмотреть файл

@ -1055,22 +1055,6 @@ void nsWebShellWindow::LoadMenus(nsIDOMDocument * aDOMDoc, nsIWidget * aParentWi
} // nsWebShellWindow::LoadMenus
#endif
//------------------------------------------------------------------------------
NS_IMETHODIMP
nsWebShellWindow::GetContentShellById(const nsString& aID, nsIWebShell** aChildShell)
{
// Set to null just to be certain
*aChildShell = nsnull;
nsCOMPtr<nsIDocShellTreeItem> content;
nsXULWindow::GetContentShellById(aID.get(), getter_AddRefs(content));
if(!content)
return NS_ERROR_FAILURE;
CallQueryInterface(content, aChildShell);
return NS_OK;
}
//------------------------------------------------------------------------------
NS_IMETHODIMP
@ -1439,7 +1423,6 @@ void nsWebShellWindow::LoadContentAreas() {
nsString contentAreaID,
contentURL;
char *urlChar;
nsIWebShell *contentShell;
nsresult rv;
for (endPos = 0; endPos < (PRInt32)searchSpec.Length(); ) {
// extract contentAreaID and URL substrings
@ -1456,13 +1439,14 @@ void nsWebShellWindow::LoadContentAreas() {
endPos++;
// see if we have a webshell with a matching contentAreaID
rv = GetContentShellById(contentAreaID, &contentShell);
nsCOMPtr<nsIDocShellTreeItem> content;
rv = GetContentShellById(contentAreaID.get(), getter_AddRefs(content));
if (NS_SUCCEEDED(rv)) {
urlChar = ToNewCString(contentURL);
if (urlChar) {
nsUnescape(urlChar);
contentURL.AssignWithConversion(urlChar);
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(contentShell));
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(content));
webNav->LoadURI(contentURL.get(),
nsIWebNavigation::LOAD_FLAGS_NONE,
nsnull,
@ -1470,7 +1454,6 @@ void nsWebShellWindow::LoadContentAreas() {
nsnull);
nsMemory::Free(urlChar);
}
NS_RELEASE(contentShell);
}
}
}

Просмотреть файл

@ -85,7 +85,6 @@ public:
// nsISupports interface...
NS_DECL_ISUPPORTS
NS_IMETHOD GetContentShellById(const nsString& anID, nsIWebShell** aResult);
NS_IMETHOD LockUntilChromeLoad() { mLockedUntilChromeLoad = PR_TRUE; return NS_OK; }
NS_IMETHOD GetLockedState(PRBool& aResult) { aResult = mLockedUntilChromeLoad; return NS_OK; }