Bug 352093. Part 13: Remove nsIViewManager::GetWidget since no-one should be using it. r=bzbarsky
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 22 Jul 2009 12:45:11 +1200
changeset 30538 b01f80d5166a24dbb926897911cc1dfc669f7252
parent 30537 9b8e2261d5fac7452bc770dea1187303ca89d949
child 30539 0264033922812e6791812ea2203a578625ec80d9
push id8123
push userrocallahan@mozilla.com
push dateWed, 22 Jul 2009 00:48:09 +0000
treeherdermozilla-central@5b0d9f36c0b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs352093
milestone1.9.2a1pre
Bug 352093. Part 13: Remove nsIViewManager::GetWidget since no-one should be using it. r=bzbarsky
view/public/nsIViewManager.h
view/src/nsViewManager.cpp
view/src/nsViewManager.h
--- a/view/public/nsIViewManager.h
+++ b/view/public/nsIViewManager.h
@@ -55,18 +55,18 @@ enum nsRectVisibility {
   nsRectVisibility_kAboveViewport, 
   nsRectVisibility_kBelowViewport, 
   nsRectVisibility_kLeftOfViewport, 
   nsRectVisibility_kRightOfViewport, 
   nsRectVisibility_kZeroAreaRect
 }; 
 
 #define NS_IVIEWMANAGER_IID   \
-  { 0x50c0a18c, 0x3e39, 0x4606, \
-    { 0x85, 0x77, 0xe7, 0x3a, 0xcc, 0xb4, 0x66, 0xc9 } }
+  { 0x739bbc2b, 0x5c45, 0x40bb, \
+    { 0xb0, 0xbc, 0xe3, 0x1c, 0xe0, 0xf2, 0x19, 0xc2 } }
 
 class nsIViewManager : public nsISupports
 {
 public:
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IVIEWMANAGER_IID)
   /**
    * Initialize the ViewManager
@@ -412,23 +412,16 @@ public:
    * get the view that is is considered to be the root scrollable
    * view for the document.
    * @param aScrollable out parameter for root scrollable view
    * @return error status
    */
   NS_IMETHOD GetRootScrollableView(nsIScrollableView **aScrollable) = 0;
 
   /**
-   * Retrieve the widget at the root of the view manager. This is the
-   * widget associated with the root view, if the root view exists and has
-   * a widget.
-   */
-  NS_IMETHOD GetWidget(nsIWidget **aWidget) = 0;
-
-  /**
    * Retrieve the widget at the root of the nearest enclosing
    * view manager whose root view has a widget.
    */
   NS_IMETHOD GetRootWidget(nsIWidget **aWidget) = 0;
 
   /**
    * Force update of view manager widget
    * Callers should use UpdateView(view, NS_VMREFRESH_IMMEDIATE) in most cases instead
--- a/view/src/nsViewManager.cpp
+++ b/view/src/nsViewManager.cpp
@@ -1863,23 +1863,16 @@ NS_IMETHODIMP nsViewManager::SetRootScro
 }
 
 NS_IMETHODIMP nsViewManager::GetRootScrollableView(nsIScrollableView **aScrollable)
 {
   *aScrollable = mRootScrollable;
   return NS_OK;
 }
 
-NS_IMETHODIMP nsViewManager::GetWidget(nsIWidget **aWidget)
-{
-  *aWidget = GetWidget();
-  NS_IF_ADDREF(*aWidget);
-  return NS_OK;
-}
-
 NS_IMETHODIMP nsViewManager::GetRootWidget(nsIWidget **aWidget)
 {
   if (!mRootView) {
     *aWidget = nsnull;
     return NS_OK;
   }
   if (mRootView->HasWidget()) {
     *aWidget = mRootView->GetWidget();
--- a/view/src/nsViewManager.h
+++ b/view/src/nsViewManager.h
@@ -166,18 +166,16 @@ public:
   NS_IMETHOD  EnableRefresh(PRUint32 aUpdateFlags);
 
   virtual nsIViewManager* BeginUpdateViewBatch(void);
   NS_IMETHOD  EndUpdateViewBatch(PRUint32 aUpdateFlags);
 
   NS_IMETHOD  SetRootScrollableView(nsIScrollableView *aScrollable);
   NS_IMETHOD  GetRootScrollableView(nsIScrollableView **aScrollable);
 
-  NS_IMETHOD GetWidget(nsIWidget **aWidget);
-  nsIWidget* GetWidget() { return mRootView ? mRootView->GetWidget() : nsnull; }
   NS_IMETHOD GetRootWidget(nsIWidget **aWidget);
   NS_IMETHOD ForceUpdate();
  
   NS_IMETHOD IsPainting(PRBool& aIsPainting);
   NS_IMETHOD GetLastUserEventTime(PRUint32& aTime);
   void ProcessInvalidateEvent();
   static PRUint32 gLastUserEventTime;