Bug 1166867 - Support -moz-os-version: windows-win10. r=jimm

This commit is contained in:
Tim Nguyen 2015-05-21 12:16:00 +02:00
parent 682368e167
commit 93dcf227cd
3 changed files with 11 additions and 7 deletions

View File

@ -61,6 +61,7 @@ const OperatingSystemVersionInfo osVersionStrings[] = {
{ LookAndFeel::eOperatingSystemVersion_WindowsVista, L"windows-vista" },
{ LookAndFeel::eOperatingSystemVersion_Windows7, L"windows-win7" },
{ LookAndFeel::eOperatingSystemVersion_Windows8, L"windows-win8" },
{ LookAndFeel::eOperatingSystemVersion_Windows10, L"windows-win10" }
};
#endif

View File

@ -165,7 +165,7 @@ public:
// Hyperlink color extracted from the system, not affected by the
// browser.anchor_color user pref.
// There is no OS-specified safe background color for this text,
// There is no OS-specified safe background color for this text,
// but it is used regularly within Windows and the Gnome DE on Dialog and
// Window colors.
eColorID__moz_nativehyperlinktext,
@ -393,13 +393,13 @@ public:
* is shown.
*/
eIntID_PhysicalHomeButton,
/*
* Controls whether overlay scrollbars display when the user moves
* the mouse in a scrollable frame.
*/
eIntID_ScrollbarDisplayOnMouseMove,
/*
* Overlay scrollbar animation constants.
*/
@ -430,6 +430,7 @@ public:
eOperatingSystemVersion_WindowsVista,
eOperatingSystemVersion_Windows7,
eOperatingSystemVersion_Windows8,
eOperatingSystemVersion_Windows10,
eOperatingSystemVersion_Unknown
};
@ -444,7 +445,7 @@ public:
enum {
// single arrow at each end
eScrollArrowStyle_Single =
eScrollArrow_StartBackward | eScrollArrow_EndForward,
eScrollArrow_StartBackward | eScrollArrow_EndForward,
// both arrows at bottom/right, none at top/left
eScrollArrowStyle_BothAtBottom =
eScrollArrow_EndBackward | eScrollArrow_EndForward,

View File

@ -28,7 +28,9 @@ nsLookAndFeel::GetOperatingSystemVersion()
return version;
}
if (IsWin8OrLater()) {
if (IsWin10OrLater()) {
version = eOperatingSystemVersion_Windows10;
} else if (IsWin8OrLater()) {
version = eOperatingSystemVersion_Windows8;
} else if (IsWin7OrLater()) {
version = eOperatingSystemVersion_Windows7;
@ -59,7 +61,7 @@ static nsresult GetColorFromTheme(nsUXThemeClass cls,
static int32_t GetSystemParam(long flag, int32_t def)
{
DWORD value;
DWORD value;
return ::SystemParametersInfo(flag, 0, &value, 0) ? value : def;
}
@ -354,7 +356,7 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
aResult = ::GetSystemMetrics(SM_CYDRAG) - 1;
break;
case eIntID_UseAccessibilityTheme:
// High contrast is a misnomer under Win32 -- any theme can be used with it,
// High contrast is a misnomer under Win32 -- any theme can be used with it,
// e.g. normal contrast with large fonts, low contrast, etc.
// The high contrast flag really means -- use this theme and don't override it.
aResult = nsUXThemeData::IsHighContrastOn();