Bug 1533562 - Remove code that deals with non-rounded bottom corners on regular windows. r=spohl

Rounded bottom corners have been the default since 10.7.
We still have square corners on windows without titlebars, such as the address
bar autocomplete dropdown, or the reftest window.

Differential Revision: https://phabricator.services.mozilla.com/D22643

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-04-29 16:59:25 +00:00
Родитель 890482c332
Коммит bf8b839110
3 изменённых файлов: 1 добавлений и 11 удалений

Просмотреть файл

@ -3397,7 +3397,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
// This is the analog of nsChildView::MaybeDrawRoundedCorners for CGContexts. // This is the analog of nsChildView::MaybeDrawRoundedCorners for CGContexts.
// We only need to mask the top corners here because Cocoa does the masking // We only need to mask the top corners here because Cocoa does the masking
// for the window's bottom corners automatically (starting with 10.7). // for the window's bottom corners automatically.
- (void)maskTopCornersInContext:(CGContextRef)aContext { - (void)maskTopCornersInContext:(CGContextRef)aContext {
CGFloat radius = [self cornerRadius]; CGFloat radius = [self cornerRadius];
int32_t devPixelCornerRadius = mGeckoChild->CocoaPointsToDevPixels(radius); int32_t devPixelCornerRadius = mGeckoChild->CocoaPointsToDevPixels(radius);

Просмотреть файл

@ -99,11 +99,6 @@ typedef struct _nsCocoaWindowList {
// original value. // original value.
- (void)_setWindowNumber:(NSInteger)aNumber; - (void)_setWindowNumber:(NSInteger)aNumber;
// If we set the window's stylemask to be textured, the corners on the bottom of
// the window are rounded by default. We use this private method to make
// the corners square again, a la Safari. Starting with 10.7, all windows have
// rounded bottom corners, so this call doesn't have any effect there.
- (void)setBottomCornerRounded:(BOOL)rounded;
- (BOOL)bottomCornerRounded; - (BOOL)bottomCornerRounded;
// Present in the same form on OS X since at least OS X 10.5. // Present in the same form on OS X since at least OS X 10.5.

Просмотреть файл

@ -3170,11 +3170,6 @@ static const NSString* kStateCollectionBehavior = @"collectionBehavior";
mSheetAttachmentPosition = aContentRect.size.height; mSheetAttachmentPosition = aContentRect.size.height;
mWindowButtonsRect = NSZeroRect; mWindowButtonsRect = NSZeroRect;
mFullScreenButtonRect = NSZeroRect; mFullScreenButtonRect = NSZeroRect;
// setBottomCornerRounded: is a private API call, so we check to make sure
// we respond to it just in case.
if ([self respondsToSelector:@selector(setBottomCornerRounded:)])
[self setBottomCornerRounded:YES];
} }
return self; return self;