Commit ba69ab86 authored by gavin@gavinsharp.com's avatar gavin@gavinsharp.com
Browse files

Bug 403036: nsAutoCompleteController::GetPopupWidget() is dead code, r=enndeakin, a=schrep

parent ac28d73c
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -58,11 +58,6 @@ REQUIRES = xpcom \
		unicharutil \
		toolkitcomps \
		widget \
		content \
		view \
		gfx \
		thebes \
		locale \
		necko \
	 	$(NULL)

+0 −35
Original line number Diff line number Diff line
@@ -49,12 +49,6 @@
#include "nsIIOService.h"
#include "nsToolkitCompsCID.h"
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsIDOMDocument.h"
#include "nsIDocument.h"
#include "nsIContent.h"
#include "nsIFrame.h"
#include "nsIPresShell.h"
#include "nsIAtomService.h"
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
@@ -1463,35 +1457,6 @@ nsAutoCompleteController::RowIndexToSearch(PRInt32 aRowIndex, PRInt32 *aSearchIn
  return NS_OK;
}

nsIWidget*
nsAutoCompleteController::GetPopupWidget()
{
  NS_ENSURE_TRUE(mInput, nsnull);

  nsCOMPtr<nsIAutoCompletePopup> autoCompletePopup;
  mInput->GetPopup(getter_AddRefs(autoCompletePopup));
  NS_ENSURE_TRUE(autoCompletePopup, nsnull);

  nsCOMPtr<nsIDOMNode> popup = do_QueryInterface(autoCompletePopup);
  NS_ENSURE_TRUE(popup, nsnull);

  nsCOMPtr<nsIDOMDocument> domDoc;
  popup->GetOwnerDocument(getter_AddRefs(domDoc));
  NS_ENSURE_TRUE(domDoc, nsnull);

  nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
  NS_ENSURE_TRUE(doc, nsnull);

  nsIPresShell* presShell = doc->GetPrimaryShell();
  NS_ENSURE_TRUE(presShell, nsnull);

  nsCOMPtr<nsIContent> content = do_QueryInterface(popup);
  nsIFrame* frame = presShell->GetPrimaryFrameFor(content);
  NS_ENSURE_TRUE(frame, nsnull);

  return frame->GetWindow();
}

NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteController)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteSimpleResult)
#ifdef MOZ_MORK
+0 −3
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@
#include "nsISupportsArray.h"
#include "nsITimer.h"
#include "nsIRollupListener.h"
#include "nsIWidget.h"
#include "nsTArray.h"

class nsAutoCompleteController : public nsIAutoCompleteController,
@@ -94,8 +93,6 @@ protected:
  
  nsresult RowIndexToSearch(PRInt32 aRowIndex, PRInt32 *aSearchIndex, PRInt32 *aItemIndex);

  nsIWidget* GetPopupWidget();

  // members //////////////////////////////////////////
  
  nsCOMPtr<nsIAutoCompleteInput> mInput;