diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm index a0f5e09c1586..67d9a105e7c0 100644 --- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -2585,7 +2585,6 @@ already_AddRefed nsIWidget::CreateChildWindow() { - (NSPoint)FrameView__closeButtonOrigin; - (NSPoint)FrameView__fullScreenButtonOrigin; - (BOOL)FrameView__wantsFloatingTitlebar; -- (NSRect)FrameView__unifiedToolbarFrame; @end @implementation NSView (FrameViewMethodSwizzling) @@ -2611,18 +2610,6 @@ already_AddRefed nsIWidget::CreateChildWindow() { return NO; } -- (NSRect)FrameView__unifiedToolbarFrame { - NSRect defaultFrame = [self FrameView__unifiedToolbarFrame]; - if ([[self window] isKindOfClass:[ToolbarWindow class]]) { - CGFloat unifiedToolbarHeight = [(ToolbarWindow*)[self window] unifiedToolbarHeight]; - CGFloat topEdge = NSMaxY(defaultFrame); - CGFloat bottomEdge = topEdge - unifiedToolbarHeight; - return NSMakeRect(defaultFrame.origin.x, bottomEdge, defaultFrame.size.width, - unifiedToolbarHeight); - } - return defaultFrame; -} - @end static NSMutableSet* gSwizzledFrameViewClasses = nil; @@ -2702,8 +2689,6 @@ static NSMutableSet* gSwizzledFrameViewClasses = nil; class_getMethodImplementation([NSView class], @selector(FrameView__fullScreenButtonOrigin)); static IMP our_wantsFloatingTitlebar = class_getMethodImplementation([NSView class], @selector(FrameView__wantsFloatingTitlebar)); - static IMP our_unifiedToolbarFrame = - class_getMethodImplementation([NSView class], @selector(FrameView__unifiedToolbarFrame)); if (![gSwizzledFrameViewClasses containsObject:frameViewClass]) { // Either of these methods might be implemented in both a subclass of @@ -2729,12 +2714,6 @@ static NSMutableSet* gSwizzledFrameViewClasses = nil; nsToolkit::SwizzleMethods(frameViewClass, @selector(_wantsFloatingTitlebar), @selector(FrameView__wantsFloatingTitlebar)); } - IMP _unifiedToolbarFrame = - class_getMethodImplementation(frameViewClass, @selector(_unifiedToolbarFrame)); - if (_unifiedToolbarFrame && _unifiedToolbarFrame != our_unifiedToolbarFrame) { - nsToolkit::SwizzleMethods(frameViewClass, @selector(_unifiedToolbarFrame), - @selector(FrameView__unifiedToolbarFrame)); - } [gSwizzledFrameViewClasses addObject:frameViewClass]; }