Bug 783338 - Correct widget height on VS2012 (subsystem >= 6). r=jimm
authorMark Straver <mark@wolfbeast.com>
Fri, 16 Nov 2012 18:34:31 -0500
changeset 113562 1b01cb2b0cd7c7eecfaa8e3a80200ca105062040
parent 113561 980bc25895063b73cf0e8367d092dbb1b8915731
child 113563 76584699a51c245b5c6120d74ef475af7a3afe13
push id18235
push userryanvm@gmail.com
push dateFri, 16 Nov 2012 23:34:32 +0000
treeherdermozilla-inbound@410afbab7278 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs783338
milestone19.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 783338 - Correct widget height on VS2012 (subsystem >= 6). r=jimm
widget/windows/nsNativeThemeWin.cpp
--- a/widget/windows/nsNativeThemeWin.cpp
+++ b/widget/windows/nsNativeThemeWin.cpp
@@ -2071,26 +2071,28 @@ nsNativeThemeWin::GetMinimumWidgetSize(n
       AddPaddingRect(aResult, CAPTIONBUTTON_CLOSE);
       *aIsOverridable = false;
       return NS_OK;
 
     case NS_THEME_WINDOW_TITLEBAR:
     case NS_THEME_WINDOW_TITLEBAR_MAXIMIZED:
       aResult->height = GetSystemMetrics(SM_CYCAPTION);
       aResult->height += GetSystemMetrics(SM_CYFRAME);
+      aResult->height += GetSystemMetrics(SM_CXPADDEDBORDER);
       *aIsOverridable = false;
       return NS_OK;
 
     case NS_THEME_WINDOW_BUTTON_BOX:
     case NS_THEME_WINDOW_BUTTON_BOX_MAXIMIZED:
       if (nsUXThemeData::CheckForCompositor()) {
         QueryForButtonData(aFrame);
         aResult->width = nsUXThemeData::sCommandButtons[CMDBUTTONIDX_BUTTONBOX].cx;
         aResult->height = nsUXThemeData::sCommandButtons[CMDBUTTONIDX_BUTTONBOX].cy
-                          - GetSystemMetrics(SM_CYFRAME);
+                          - GetSystemMetrics(SM_CYFRAME)
+                          - GetSystemMetrics(SM_CXPADDEDBORDER);
         if (aWidgetType == NS_THEME_WINDOW_BUTTON_BOX_MAXIMIZED) {
           aResult->width += 1;
           aResult->height -= 2;
         }
         *aIsOverridable = false;
         return NS_OK;
       }
       break;