Bug 678825 - Also unify toolbars that are wider than the window. r=josh
authorMarkus Stange <mstange@themasta.com>
Wed, 17 Aug 2011 20:44:23 +0200
changeset 75431 05268baefef7ad036af54583ff5808157a223a19
parent 75430 b75337bbcf6bef9d887357e862a6c3fead406c0c
child 75432 4cdc35309098d4f19a394cc8b1ab4a141db1b4d2
push id21023
push usermak77@bonardo.net
push dateThu, 18 Aug 2011 09:39:20 +0000
treeherdermozilla-central@f69a10f23bf3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs678825
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 678825 - Also unify toolbars that are wider than the window. r=josh
widget/src/cocoa/nsNativeThemeCocoa.mm
--- a/widget/src/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/src/cocoa/nsNativeThemeCocoa.mm
@@ -1619,17 +1619,17 @@ static PRBool
 ToolbarCanBeUnified(CGContextRef cgContext, const HIRect& inBoxRect, NSWindow* aWindow)
 {
   if (![aWindow isKindOfClass:[ToolbarWindow class]] ||
       [(ToolbarWindow*)aWindow drawsContentsIntoWindowFrame])
     return PR_FALSE;
 
   float unifiedToolbarHeight = [(ToolbarWindow*)aWindow unifiedToolbarHeight];
   return inBoxRect.origin.x == 0 &&
-         inBoxRect.size.width == [aWindow frame].size.width &&
+         inBoxRect.size.width >= [aWindow frame].size.width &&
          inBoxRect.origin.y <= 0.0 &&
          inBoxRect.origin.y + inBoxRect.size.height <= unifiedToolbarHeight;
 }
 
 void
 nsNativeThemeCocoa::DrawUnifiedToolbar(CGContextRef cgContext, const HIRect& inBoxRect,
                                        NSWindow* aWindow)
 {