some cocoa widget cleanup. no bug. r=cbarrett sr=pav
some cocoa widget cleanup. no bug. r=cbarrett sr=pav
--- 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;