Bug 587322 - Compilation broken on MOZ_WINSDK_TARGETVER < MOZ_NTDDI_LONGHORN. r=robarnold, a=dbaron
authorJacek Caban <jacek@codeweavers.com>
Sat, 21 Aug 2010 12:43:53 -0700
changeset 51171 4e5b0b3d1ea05b0bca1ccffe4fe217649ce724ab
parent 51170 d0b284052d2979bc26dfa84ceb2214493d69df64
child 51172 b970fa3804ee0973bb5180d58f3e0280de64e09d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrobarnold, dbaron
bugs587322
milestone2.0b5pre
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 587322 - Compilation broken on MOZ_WINSDK_TARGETVER < MOZ_NTDDI_LONGHORN. r=robarnold, a=dbaron
widget/src/build/nsWinWidgetFactory.cpp
widget/src/windows/nsUXThemeData.cpp
widget/src/windows/nsUXThemeData.h
--- a/widget/src/build/nsWinWidgetFactory.cpp
+++ b/widget/src/build/nsWinWidgetFactory.cpp
@@ -74,29 +74,30 @@
 #include "nsHTMLFormatConverter.h"
 
 #ifdef NS_PRINTING
 #include "nsDeviceContextSpecWin.h"
 #include "nsPrintOptionsWin.h"
 #include "nsPrintSession.h"
 #endif
 
+using namespace mozilla::widget;
+
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
 NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerWin)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsIdleServiceWin)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
 
 #if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_WIN7
-using namespace mozilla::widget;
 NS_GENERIC_FACTORY_CONSTRUCTOR(WinTaskbar)
 NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListBuilder)
 NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListItem)
 NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListSeparator)
 NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListLink)
 NS_GENERIC_FACTORY_CONSTRUCTOR(JumpListShortcut)
 #endif
 
--- a/widget/src/windows/nsUXThemeData.cpp
+++ b/widget/src/windows/nsUXThemeData.cpp
@@ -188,22 +188,24 @@ nsUXThemeData::GetTheme(nsUXThemeClass c
 
 HMODULE
 nsUXThemeData::GetThemeDLL() {
   if (!sThemeDLL && sIsXPOrLater)
     sThemeDLL = ::LoadLibraryW(kThemeLibraryName);
   return sThemeDLL;
 }
 
+#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
 HMODULE
 nsUXThemeData::GetDwmDLL() {
   if (!sDwmDLL && sIsVistaOrLater)
     sDwmDLL = ::LoadLibraryW(kDwmLibraryName);
   return sDwmDLL;
 }
+#endif
 
 const wchar_t *nsUXThemeData::GetClassName(nsUXThemeClass cls) {
   switch(cls) {
     case eUXButton:
       return L"Button";
     case eUXEdit:
       return L"Edit";
     case eUXTooltip:
--- a/widget/src/windows/nsUXThemeData.h
+++ b/widget/src/windows/nsUXThemeData.h
@@ -116,17 +116,19 @@ public:
   static PRBool sTitlebarInfoPopulated;
   static SIZE sCommandButtons[3];
 
   static void Initialize();
   static void Teardown();
   static void Invalidate();
   static HANDLE GetTheme(nsUXThemeClass cls);
   static HMODULE GetThemeDLL();
+#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN
   static HMODULE GetDwmDLL();
+#endif
 
   // nsWindow calls this to update desktop settings info
   static void InitTitlebarInfo();
   static void UpdateTitlebarInfo(HWND aWnd);
 
   static inline BOOL IsAppThemed() {
     return isAppThemed && isAppThemed();
   }