зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1533562 - Remove override of -[NSThemeFrame _unifiedToolbarFrame]. r=spohl
This override has no effect in CoreAnimation-backed windows. The upcoming patches will implement an alternative approach. Differential Revision: https://phabricator.services.mozilla.com/D22644 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
61e81ce45e
Коммит
92aa2412e5
|
@ -2585,7 +2585,6 @@ already_AddRefed<nsIWidget> 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> 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];
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче