Bug 869091: Fix a couple of build warnings in Cocoa widgets. r=smichaud

This commit is contained in:
Josh Aas 2013-05-08 00:06:18 -05:00
parent 4a110f4861
commit b4dc5afa74

View File

@ -707,7 +707,7 @@ nsChildView::GetCGContextForTitlebarDrawing(NSSize aSize)
void
nsChildView::WillPaint()
{
[mView maybeDrawInTitlebar];
[(ChildView*)mView maybeDrawInTitlebar];
}
void
@ -2681,11 +2681,12 @@ NSEvent* gLastDragMouseDownEvent = nil;
if (!mGeckoChild) {
return;
}
ToolbarWindow* win = [self window];
NSWindow* win = [self window];
if (!win || ![win isKindOfClass:[ToolbarWindow class]]) {
return;
}
if (![win drawsContentsIntoWindowFrame]) {
ToolbarWindow* toolbarWin = (ToolbarWindow*)win;
if (![toolbarWin drawsContentsIntoWindowFrame]) {
return;
}
@ -2695,8 +2696,8 @@ NSEvent* gLastDragMouseDownEvent = nil;
// "unified toolbar". Our ChildView ('self') is the same size as the frame
// view and covers it. Our ChildView has a flipped coordinate system, but
// the frame view doesn't.
NSRect titlebarRect = [win titlebarRect];
NSView* frameView = [[win contentView] superview];
NSRect titlebarRect = [toolbarWin titlebarRect];
NSView* frameView = [[toolbarWin contentView] superview];
NSRect dirtyRect = NSIntersectionRect([frameView _dirtyRect], titlebarRect);
// Flip dirtyRect's coordinate system.
dirtyRect.origin.y = [frameView bounds].size.height -