Bug 513162 - Cleanup unused widget code and CID statics. r=vlad.
authorJim Mathies <jmathies@mozilla.com>
Thu, 24 Jun 2010 21:01:06 -0500
changeset 46190 ec0e7c69316ad4d20d7953aca2c5fc19286705fb
parent 46189 522df66198cf3802846f35a795d98059155237e4
child 46191 36684120d44c7ebe0c481252d49f44aae6af80c3
push idunknown
push userunknown
push dateunknown
reviewersvlad
bugs513162
milestone1.9.3a6pre
Bug 513162 - Cleanup unused widget code and CID statics. r=vlad.
layout/generic/nsFrame.cpp
layout/xul/base/src/nsBoxFrame.cpp
layout/xul/base/src/nsLeafBoxFrame.cpp
layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
widget/src/windows/nsWindow.cpp
widget/src/windows/nsWindow.h
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -126,17 +126,16 @@
 #include "nsSVGEffects.h"
 #endif
 
 #include "gfxContext.h"
 
 using namespace mozilla;
 
 static NS_DEFINE_CID(kLookAndFeelCID,  NS_LOOKANDFEEL_CID);
-static NS_DEFINE_CID(kWidgetCID, NS_CHILD_CID);
 
 // Struct containing cached metrics for box-wrapped frames.
 struct nsBoxLayoutMetrics
 {
   nsSize mPrefSize;
   nsSize mMinSize;
   nsSize mMaxSize;
 
--- a/layout/xul/base/src/nsBoxFrame.cpp
+++ b/layout/xul/base/src/nsBoxFrame.cpp
@@ -96,19 +96,16 @@
 #include "nsIPrivateDOMEvent.h"
 #include "nsContentUtils.h"
 #include "nsDisplayList.h"
 
 // Needed for Print Preview
 #include "nsIDocument.h"
 #include "nsIURI.h"
 
-
-static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID);
-
 //define DEBUG_REDRAW
 
 #define DEBUG_SPRING_SIZE 8
 #define DEBUG_BORDER_SIZE 2
 #define COIL_SIZE 8
 
 //#define TEST_SANITY
 
--- a/layout/xul/base/src/nsLeafBoxFrame.cpp
+++ b/layout/xul/base/src/nsLeafBoxFrame.cpp
@@ -54,18 +54,16 @@
 #include "nsIContent.h"
 #include "nsINameSpaceManager.h"
 #include "nsBoxLayoutState.h"
 #include "nsWidgetsCID.h"
 #include "nsIViewManager.h"
 #include "nsHTMLContainerFrame.h"
 #include "nsDisplayList.h"
 
-static NS_DEFINE_IID(kWidgetCID, NS_CHILD_CID);
-
 //
 // NS_NewLeafBoxFrame
 //
 // Creates a new Toolbar frame and returns it
 //
 nsIFrame*
 NS_NewLeafBoxFrame (nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
--- a/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
+++ b/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
@@ -106,18 +106,16 @@
 #include "nsEventDispatcher.h"
 #include "nsDisplayList.h"
 #include "nsTreeBoxObject.h"
 
 #ifdef IBMBIDI
 #include "nsBidiPresUtils.h"
 #endif
 
-static NS_DEFINE_CID(kWidgetCID, NS_CHILD_CID);
-
 // Enumeration function that cancels all the image requests in our cache
 static PLDHashOperator
 CancelImageRequest(const nsAString& aKey,
                    nsTreeImageCacheEntry aEntry, void* aData)
 {
   aEntry.request->CancelAndForgetObserver(NS_BINDING_ABORTED);
   return PL_DHASH_NEXT;
 }
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -1733,42 +1733,16 @@ NS_METHOD nsWindow::GetClientBounds(nsIn
     aRect.height = r.bottom - r.top;
 
   } else {
     aRect.SetRect(0,0,0,0);
   }
   return NS_OK;
 }
 
-// Get the bounds, but don't take into account the client size
-void nsWindow::GetNonClientBounds(nsIntRect &aRect)
-{
-  if (mWnd) {
-    RECT r;
-    VERIFY(::GetWindowRect(mWnd, &r));
-
-    // assign size
-    aRect.width = r.right - r.left;
-    aRect.height = r.bottom - r.top;
-
-    // convert coordinates if parent exists
-    HWND parent = ::GetParent(mWnd);
-    if (parent) {
-      RECT pr;
-      VERIFY(::GetWindowRect(parent, &pr));
-      r.left -= pr.left;
-      r.top -= pr.top;
-    }
-    aRect.x = r.left;
-    aRect.y = r.top;
-  } else {
-    aRect.SetRect(0,0,0,0);
-  }
-}
-
 // Like GetBounds, but don't offset by the parent
 NS_METHOD nsWindow::GetScreenBounds(nsIntRect &aRect)
 {
   if (mWnd) {
     RECT r;
     VERIFY(::GetWindowRect(mWnd, &r));
 
     aRect.width  = r.right - r.left;
--- a/widget/src/windows/nsWindow.h
+++ b/widget/src/windows/nsWindow.h
@@ -275,17 +275,16 @@ protected:
   /**
    * Window utilities
    */
   static BOOL             SetNSWindowPtr(HWND aWnd, nsWindow * ptr);
   LPARAM                  lParamToScreen(LPARAM lParam);
   LPARAM                  lParamToClient(LPARAM lParam);
   nsWindow*               GetParentWindow(PRBool aIncludeOwner);
   virtual void            SubclassWindow(BOOL bState);
-  void                    GetNonClientBounds(nsIntRect &aRect);
   PRBool                  CanTakeFocus();
 #if !defined(WINCE)
   static void             InitTrackPointHack();
 #endif
 
   /**
    * Event processing helpers
    */