Bug 462245 - Remove override of +[NSGrayFrame drawBevel:...] because it's unnecessary and causes a crash with ShapeShifter on 10.4, r=josh sr=roc a=beltzner
authorMarkus Stange <mstange@themasta.com>
Wed, 12 Nov 2008 14:18:18 +0100
changeset 21592 3eaa593394b48cad38aa5d864ba0dc9fa42e45eb
parent 21591 c0e944ed50432c7648236e95726207b1f7a8fd5a
child 21593 5865da85d4dd43702d3bacd55ff0448c8c9abc99
push id3604
push usermstange@themasta.com
push dateWed, 12 Nov 2008 13:19:42 +0000
treeherdermozilla-central@3eaa593394b4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh, roc, beltzner
bugs462245
milestone1.9.1b2pre
Bug 462245 - Remove override of +[NSGrayFrame drawBevel:...] because it's unnecessary and causes a crash with ShapeShifter on 10.4, r=josh sr=roc a=beltzner
widget/src/cocoa/nsCocoaWindow.mm
--- a/widget/src/cocoa/nsCocoaWindow.mm
+++ b/widget/src/cocoa/nsCocoaWindow.mm
@@ -2124,43 +2124,16 @@ void patternDraw(void* aInfo, CGContextR
   [self setFill];
 
   NS_OBJC_END_TRY_ABORT_BLOCK;
 }
 
 @end
 
 
-// This is an internal Apple class, which we need to work around a bug in. It is
-// the class responsible for drawing the titlebar for metal windows. It actually
-// is a few levels deep in the inhertiance graph, but we don't need to know about
-// all its superclasses.
-@interface NSGrayFrame : NSObject
-+ (void)drawBevel:(NSRect)bevel inFrame:(NSRect)frame topCornerRounded:(BOOL)top;
-+ (void)drawBevel:(NSRect)bevel inFrame:(NSRect)frame topCornerRounded:(BOOL)top bottomCornerRounded:(BOOL)bottom;
-@end
-
-@implementation NSGrayFrame(DrawingBugWorkaround)
-
-// Work around a bug in this method -- it draws a strange 1px border on the left and
-// right edges of a window. We don't want that, so call the similar method defined
-// in the superclass.
-+ (void)drawBevel:(NSRect)bevel inFrame:(NSRect)frame topCornerRounded:(BOOL)top bottomCornerRounded:(BOOL)bottom
-{
-  NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
-
-  if ([self respondsToSelector:@selector(drawBevel:inFrame:topCornerRounded:)])
-    [self drawBevel:bevel inFrame:frame topCornerRounded:top];
-
-  NS_OBJC_END_TRY_ABORT_BLOCK;
-}
-
-@end
-
-
 @interface NSWindow (MethodSwizzling)
 - (void)nsCocoaWindow_NSWindow_sendEvent:(NSEvent *)anEvent;
 @end
 
 @implementation NSWindow (MethodSwizzling)
 
 // An NSLeftMouseDown event can change the focus, but it doesn't always do
 // this correctly/appropriately.  As a result, Gecko keyboard events may be