Bug 508159 - Remove some dead code in nsXULWindow. r=Neil
authorMarkus Stange <mstange@themasta.com>
Wed, 05 Aug 2009 11:07:58 +1200
changeset 31127 730139d746fe9995d7440efd4eb0808163f44a7b
parent 31126 d98069ba3d396b65417478386072d4a0c7a901dd
child 31128 be99b00e43f60d67baf024252d17203065d40519
push id8386
push usermstange@themasta.com
push dateTue, 04 Aug 2009 23:09:05 +0000
treeherdermozilla-central@730139d746fe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersNeil
bugs508159
milestone1.9.2a1pre
Bug 508159 - Remove some dead code in nsXULWindow. r=Neil
xpfe/appshell/src/nsXULWindow.cpp
xpfe/appshell/src/nsXULWindow.h
--- a/xpfe/appshell/src/nsXULWindow.cpp
+++ b/xpfe/appshell/src/nsXULWindow.cpp
@@ -1592,44 +1592,16 @@ NS_IMETHODIMP nsXULWindow::GetWindowDOME
   NS_ENSURE_TRUE(domdoc, NS_ERROR_FAILURE);
 
   domdoc->GetDocumentElement(aDOMElement);
   NS_ENSURE_TRUE(*aDOMElement, NS_ERROR_FAILURE);
 
   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)
 {
   nsContentShellInfo* shellInfo = nsnull;
 
   PRUint32 i, count = mContentShells.Length();
   nsWeakPtr contentShellWeak = do_GetWeakReference(aContentShell);
   for (i = 0; i < count; i++) {
--- a/xpfe/appshell/src/nsXULWindow.h
+++ b/xpfe/appshell/src/nsXULWindow.h
@@ -121,17 +121,16 @@ protected:
    PRBool     LoadMiscPersistentAttributesFromXUL();
    nsresult   LoadChromeHidingFromXUL();
    NS_IMETHOD LoadWindowClassFromXUL();
    NS_IMETHOD LoadIconFromXUL();
    NS_IMETHOD SavePersistentAttributes();
 
    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,
                                           PRBool aPrimary, PRBool aTargetable,
                                           const nsAString& aID);
    NS_HIDDEN_(nsresult) ContentShellRemoved(nsIDocShellTreeItem* aContentShell);
    NS_IMETHOD SizeShellTo(nsIDocShellTreeItem* aShellItem, PRInt32 aCX, 
       PRInt32 aCY);