Skip to content
Snippets Groups Projects
Commit 7c8222e4 authored by Markus Stange's avatar Markus Stange
Browse files

Bug 508159 - Remove some dead code in nsXULWindow. r=Neil

parent a8f11704
No related branches found
No related tags found
No related merge requests found
......@@ -1597,34 +1597,6 @@ NS_IMETHODIMP nsXULWindow::GetWindowDOMElement(nsIDOMElement** aDOMElement)
return NS_OK;
}
NS_IMETHODIMP nsXULWindow::GetDOMElementById(char* aID, nsIDOMElement** aDOMElement)
{
NS_ENSURE_STATE(mDocShell);
NS_ENSURE_ARG_POINTER(aDOMElement);
*aDOMElement = nsnull;
nsCOMPtr<nsIContentViewer> cv;
mDocShell->GetContentViewer(getter_AddRefs(cv));
if (!cv)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDocumentViewer> docv(do_QueryInterface(cv));
if (!docv)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDocument> doc;
docv->GetDocument(getter_AddRefs(doc));
nsCOMPtr<nsIDOMDocument> domdoc(do_QueryInterface(doc));
if (!domdoc)
return NS_ERROR_FAILURE;
NS_ENSURE_SUCCESS(domdoc->GetElementById(NS_ConvertASCIItoUTF16(aID), aDOMElement), NS_ERROR_FAILURE);
return NS_OK;
}
nsresult nsXULWindow::ContentShellAdded(nsIDocShellTreeItem* aContentShell,
PRBool aPrimary, PRBool aTargetable, const nsAString& aID)
{
......
......@@ -126,7 +126,6 @@ protected:
NS_IMETHOD GetWindowDOMWindow(nsIDOMWindowInternal** aDOMWindow);
NS_IMETHOD GetWindowDOMElement(nsIDOMElement** aDOMElement);
NS_IMETHOD GetDOMElementById(char* aID, nsIDOMElement** aDOMElement);
// See nsIDocShellTreeOwner for docs on next two methods
NS_HIDDEN_(nsresult) ContentShellAdded(nsIDocShellTreeItem* aContentShell,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment