From 587a8d7b4bac5064ca7f409e73e0a321d6990d27 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 21 May 2015 17:49:56 -0400 Subject: [PATCH] Bug 1164625 - Don't redraw the titlebar for unified toolbar height changes when the titlebar is under Gecko's control. r=smichaud --- widget/cocoa/nsCocoaWindow.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm index ab41c2168031..bb7b773a1c46 100644 --- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -3279,10 +3279,12 @@ static const NSString* kStateShowsToolbarButton = @"showsToolbarButton"; mUnifiedToolbarHeight = aHeight; - // Redraw the title bar. If we're inside painting, we'll do it right now, - // otherwise we'll just invalidate it. - BOOL needSyncRedraw = ([NSView focusView] != nil); - [self setTitlebarNeedsDisplayInRect:[self titlebarRect] sync:needSyncRedraw]; + if (![self drawsContentsIntoWindowFrame]) { + // Redraw the title bar. If we're inside painting, we'll do it right now, + // otherwise we'll just invalidate it. + BOOL needSyncRedraw = ([NSView focusView] != nil); + [self setTitlebarNeedsDisplayInRect:[self titlebarRect] sync:needSyncRedraw]; + } } // Extending the content area into the title bar works by resizing the