some cocoa widget cleanup. no bug. r=cbarrett sr=pav
authorjoshmoz@gmail.com
Thu, 05 Apr 2007 17:26:53 -0700
changeset 384 c38e8b054daaf43ad799bf835f389b62fe83dde5
parent 383 fc0056f89fe691e293f24ff5b82f79f3562c3c72
child 385 32edb39e8e797f62c6d3941b8b768656db03c11b
push idunknown
push userunknown
push dateunknown
reviewerscbarrett, pav
milestone1.9a4pre
some cocoa widget cleanup. no bug. r=cbarrett sr=pav
widget/src/cocoa/nsChildView.h
widget/src/cocoa/nsCocoaWindow.h
widget/src/cocoa/nsCocoaWindow.mm
--- a/widget/src/cocoa/nsChildView.h
+++ b/widget/src/cocoa/nsChildView.h
@@ -59,30 +59,25 @@
 
 #include "nsIMouseListener.h"
 #include "nsIEventListener.h"
 #include "nsString.h"
 #include "nsIDragService.h"
 #include "nsIMenuBar.h"
 
 #include "nsplugindefs.h"
-#import <Quickdraw.h>
+
+#undef DARWIN
+#import <Carbon/Carbon.h>
+#import <Cocoa/Cocoa.h>
 
 class gfxASurface;
-
-#define NSRGB_2_COLOREF(color) \
-            RGB(NS_GET_R(color),NS_GET_G(color),NS_GET_B(color))
-
+class nsChildView;
 union nsPluginPort;
 
-#undef DARWIN
-#import <Cocoa/Cocoa.h>
-
-class nsChildView;
-
 @interface ChildView : NSView<
 #ifdef ACCESSIBILITY
                               mozAccessible,
 #endif
                               mozView, NSTextInput>
 {
 @private
   NSWindow* mWindow; // shortcut to the top window, [WEAK]
--- a/widget/src/cocoa/nsCocoaWindow.h
+++ b/widget/src/cocoa/nsCocoaWindow.h
@@ -47,17 +47,17 @@
 #include "nsPIWidgetCocoa.h"
 
 class nsCocoaWindow;
 class nsChildView;
 
 
 @interface WindowDelegate : NSObject
 {
-  nsCocoaWindow* mGeckoWindow; // [WEAK] (it owns us)
+  nsCocoaWindow* mGeckoWindow; // [WEAK] (we are owned by the window)
 }
 - (id)initWithGeckoWindow:(nsCocoaWindow*)geckoWind;
 - (void)windowDidResize:(NSNotification*)aNotification;
 - (void)sendGotFocusAndActivate;
 - (void)sendLostFocusAndDeactivate;
 - (nsCocoaWindow*)geckoWidget;
 @end
 
--- a/widget/src/cocoa/nsCocoaWindow.mm
+++ b/widget/src/cocoa/nsCocoaWindow.mm
@@ -384,20 +384,16 @@ NS_IMETHODIMP nsCocoaWindow::Create(nsIW
 NS_IMETHODIMP nsCocoaWindow::Destroy()
 {
   if (mPopupContentView)
     mPopupContentView->Destroy();
 
   nsBaseWidget::OnDestroy();
   nsBaseWidget::Destroy();
 
-  mMouseListener = nsnull;
-  mEventListener = nsnull;
-  mMenuListener = nsnull;
-  
   return NS_OK;
 }
 
 
 void* nsCocoaWindow::GetNativeData(PRUint32 aDataType)
 {
   void* retVal = nsnull;