зеркало из https://github.com/mozilla/gecko-dev.git
Backout the second part of bug 877767 ( 0d4883c469e6 ) per bug 888615 comment 4, rs=backout
This commit is contained in:
Родитель
b6a1409293
Коммит
59b72cd32c
|
@ -105,18 +105,6 @@ class GLManager;
|
|||
|
||||
@interface NSView (Undocumented)
|
||||
|
||||
// Draws the title string of a window.
|
||||
// Present on NSThemeFrame since at least 10.6.
|
||||
// _drawTitleBar is somewhat complex, and has changed over the years
|
||||
// since OS X 10.6. But in that time it's never done anything that
|
||||
// would break when called outside of -[NSView drawRect:] (which we
|
||||
// sometimes do), or whose output can't be redirected to a
|
||||
// CGContextRef object (which we also sometimes do). This is likely
|
||||
// to remain true for the indefinite future. However we should
|
||||
// check _drawTitleBar in each new major version of OS X. For more
|
||||
// information see bug 877767.
|
||||
- (void)_drawTitleBar:(NSRect)aRect;
|
||||
|
||||
// Returns an NSRect that is the bounding box for all an NSView's dirty
|
||||
// rectangles (ones that need to be redrawn). The full list of dirty
|
||||
// rectangles can be obtained by calling -[NSView _dirtyRegion] and then
|
||||
|
|
|
@ -151,7 +151,6 @@ uint32_t nsChildView::sLastInputEventCount = 0;
|
|||
- (void)clearCorners;
|
||||
|
||||
// Overlay drawing functions for traditional CGContext drawing
|
||||
- (void)drawTitleString;
|
||||
- (void)drawTitlebarHighlight;
|
||||
- (void)maskTopCornersInContext:(CGContextRef)aContext;
|
||||
|
||||
|
@ -2097,11 +2096,6 @@ nsChildView::UpdateTitlebarImageBuffer()
|
|||
NSGraphicsContext* context = [NSGraphicsContext graphicsContextWithGraphicsPort:ctx flipped:[frameView isFlipped]];
|
||||
[NSGraphicsContext setCurrentContext:context];
|
||||
|
||||
// Draw the title string.
|
||||
if ([frameView respondsToSelector:@selector(_drawTitleBar:)]) {
|
||||
[frameView _drawTitleBar:[frameView bounds]];
|
||||
}
|
||||
|
||||
// Draw the titlebar controls into the titlebar image.
|
||||
for (id view in [window titlebarControls]) {
|
||||
NSRect viewFrame = [view frame];
|
||||
|
@ -3099,7 +3093,6 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
}
|
||||
|
||||
if ([self isCoveringTitlebar]) {
|
||||
[self drawTitleString];
|
||||
[self drawTitlebarHighlight];
|
||||
[self maskTopCornersInContext:aContext];
|
||||
}
|
||||
|
@ -3269,26 +3262,6 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
CGContextRestoreGState(aContext);
|
||||
}
|
||||
|
||||
- (void)drawTitleString
|
||||
{
|
||||
NSView* frameView = [[[self window] contentView] superview];
|
||||
if (![frameView respondsToSelector:@selector(_drawTitleBar:)]) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSGraphicsContext* oldContext = [NSGraphicsContext currentContext];
|
||||
CGContextRef ctx = (CGContextRef)[oldContext graphicsPort];
|
||||
CGContextSaveGState(ctx);
|
||||
if ([oldContext isFlipped] != [frameView isFlipped]) {
|
||||
CGContextTranslateCTM(ctx, 0, [self bounds].size.height);
|
||||
CGContextScaleCTM(ctx, 1, -1);
|
||||
}
|
||||
[NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:ctx flipped:[frameView isFlipped]]];
|
||||
[frameView _drawTitleBar:[frameView bounds]];
|
||||
CGContextRestoreGState(ctx);
|
||||
[NSGraphicsContext setCurrentContext:oldContext];
|
||||
}
|
||||
|
||||
- (void)drawTitlebarHighlight
|
||||
{
|
||||
DrawTitlebarHighlight([self bounds].size, [self cornerRadius],
|
||||
|
|
Загрузка…
Ссылка в новой задаче