summaryrefslogtreecommitdiffstats
path: root/mfbt
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-02-20 10:25:50 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-20 10:25:50 +0100
commit9ecbf33313eee5c4e068e61451634cbfe4790694 (patch)
tree0cd5d9744f4595a2d4c1064d185e83c303592733 /mfbt
parent5d1eb0d3aa590338930553cb7e09c43c4840ef1a (diff)
downloadUXP-9ecbf33313eee5c4e068e61451634cbfe4790694.tar
UXP-9ecbf33313eee5c4e068e61451634cbfe4790694.tar.gz
UXP-9ecbf33313eee5c4e068e61451634cbfe4790694.tar.lz
UXP-9ecbf33313eee5c4e068e61451634cbfe4790694.tar.xz
UXP-9ecbf33313eee5c4e068e61451634cbfe4790694.zip
Clean up Firefox specific considerations from WindowsVersion.h
Tag #22.
Diffstat (limited to 'mfbt')
-rw-r--r--mfbt/WindowsVersion.h77
1 files changed, 4 insertions, 73 deletions
diff --git a/mfbt/WindowsVersion.h b/mfbt/WindowsVersion.h
index f8b071861..4d0cb374b 100644
--- a/mfbt/WindowsVersion.h
+++ b/mfbt/WindowsVersion.h
@@ -84,45 +84,12 @@ IsWindowsBuildOrLater(uint32_t aBuild)
return false;
}
-#if defined(_M_X64) || defined(_M_AMD64)
-// We support only Win7 or later on Win64.
-MOZ_ALWAYS_INLINE bool
-IsXPSP3OrLater()
-{
- return true;
-}
-
-MOZ_ALWAYS_INLINE bool
-IsWin2003OrLater()
-{
- return true;
-}
-
-MOZ_ALWAYS_INLINE bool
-IsWin2003SP2OrLater()
-{
- return true;
-}
-
-MOZ_ALWAYS_INLINE bool
-IsVistaOrLater()
-{
- return true;
-}
-
-MOZ_ALWAYS_INLINE bool
-IsVistaSP1OrLater()
-{
- return true;
-}
+// Although many of the older versions are not supported, we should keep
+// these entries for completeness (since they don't take any resources of
+// note), and to cater to corner cases for applications running e.g. in
+// Windows' compatibility mode.
MOZ_ALWAYS_INLINE bool
-IsWin7OrLater()
-{
- return true;
-}
-#else
-MOZ_ALWAYS_INLINE bool
IsXPSP3OrLater()
{
return IsWindowsVersionOrLater(0x05010300ul);
@@ -157,7 +124,6 @@ IsWin7OrLater()
{
return IsWindowsVersionOrLater(0x06010000ul);
}
-#endif
MOZ_ALWAYS_INLINE bool
IsWin7SP1OrLater()
@@ -190,41 +156,6 @@ IsNotWin7PreRTM()
IsWindowsBuildOrLater(7600);
}
-MOZ_ALWAYS_INLINE bool
-IsWin7AndPre2000Compatible() {
- /*
- * See Bug 1279171.
- * We'd like to avoid using WMF on specific OS version when compatibility
- * mode is in effect. The purpose of this function is to check if FF runs on
- * Win7 OS with application compatibility mode being set to 95/98/ME.
- * Those compatibility mode options (95/98/ME) can only display and
- * be selected for 32-bit application.
- * If the compatibility mode is in effect, the GetVersionEx function will
- * report the OS as it identifies itself, which may not be the OS that is
- * installed.
- * Note : 1) We only target for Win7 build number greater than 7600.
- * 2) GetVersionEx may be altered or unavailable for release after
- * Win8.1. Set pragma to avoid build warning as error.
- */
- bool isWin7 = IsNotWin7PreRTM() && !IsWin8OrLater();
- if (!isWin7) {
- return false;
- }
-
- OSVERSIONINFOEX info;
- ZeroMemory(&info, sizeof(OSVERSIONINFOEX));
-
- info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-#pragma warning(push)
-#pragma warning(disable:4996)
- bool success = GetVersionEx((LPOSVERSIONINFO) &info);
-#pragma warning(pop)
- if (!success) {
- return false;
- }
- return info.dwMajorVersion < 5;
-}
-
} // namespace mozilla
#endif /* mozilla_WindowsVersion_h */