зеркало из https://github.com/mozilla/gecko-dev.git
Bug 508159 - Remove some dead code in nsXULWindow. r=Neil
This commit is contained in:
Родитель
a8f1170400
Коммит
7c8222e40d
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче