зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to inbound.
This commit is contained in:
Коммит
a983d32d90
|
@ -1973,6 +1973,7 @@ GK_ATOM(windows_default_theme, "windows-default-theme")
|
||||||
GK_ATOM(mac_graphite_theme, "mac-graphite-theme")
|
GK_ATOM(mac_graphite_theme, "mac-graphite-theme")
|
||||||
GK_ATOM(mac_lion_theme, "mac-lion-theme")
|
GK_ATOM(mac_lion_theme, "mac-lion-theme")
|
||||||
GK_ATOM(windows_compositor, "windows-compositor")
|
GK_ATOM(windows_compositor, "windows-compositor")
|
||||||
|
GK_ATOM(windows_glass, "windows-glass")
|
||||||
GK_ATOM(touch_enabled, "touch-enabled")
|
GK_ATOM(touch_enabled, "touch-enabled")
|
||||||
GK_ATOM(maemo_classic, "maemo-classic")
|
GK_ATOM(maemo_classic, "maemo-classic")
|
||||||
GK_ATOM(menubar_drag, "menubar-drag")
|
GK_ATOM(menubar_drag, "menubar-drag")
|
||||||
|
@ -2000,6 +2001,7 @@ GK_ATOM(_moz_mac_graphite_theme, "-moz-mac-graphite-theme")
|
||||||
GK_ATOM(_moz_mac_lion_theme, "-moz-mac-lion-theme")
|
GK_ATOM(_moz_mac_lion_theme, "-moz-mac-lion-theme")
|
||||||
GK_ATOM(_moz_windows_compositor, "-moz-windows-compositor")
|
GK_ATOM(_moz_windows_compositor, "-moz-windows-compositor")
|
||||||
GK_ATOM(_moz_windows_classic, "-moz-windows-classic")
|
GK_ATOM(_moz_windows_classic, "-moz-windows-classic")
|
||||||
|
GK_ATOM(_moz_windows_glass, "-moz-windows-glass")
|
||||||
GK_ATOM(_moz_windows_theme, "-moz-windows-theme")
|
GK_ATOM(_moz_windows_theme, "-moz-windows-theme")
|
||||||
GK_ATOM(_moz_touch_enabled, "-moz-touch-enabled")
|
GK_ATOM(_moz_touch_enabled, "-moz-touch-enabled")
|
||||||
GK_ATOM(_moz_maemo_classic, "-moz-maemo-classic")
|
GK_ATOM(_moz_maemo_classic, "-moz-maemo-classic")
|
||||||
|
|
|
@ -1161,6 +1161,11 @@ InitSystemMetrics()
|
||||||
sSystemMetrics->AppendElement(nsGkAtoms::windows_compositor);
|
sSystemMetrics->AppendElement(nsGkAtoms::windows_compositor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsGlass, &metricResult);
|
||||||
|
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||||
|
sSystemMetrics->AppendElement(nsGkAtoms::windows_glass);
|
||||||
|
}
|
||||||
|
|
||||||
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsClassic, &metricResult);
|
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsClassic, &metricResult);
|
||||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||||
sSystemMetrics->AppendElement(nsGkAtoms::windows_classic);
|
sSystemMetrics->AppendElement(nsGkAtoms::windows_classic);
|
||||||
|
|
|
@ -547,6 +547,13 @@ nsMediaFeatures::features[] = {
|
||||||
{ &nsGkAtoms::windows_classic },
|
{ &nsGkAtoms::windows_classic },
|
||||||
GetSystemMetric
|
GetSystemMetric
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
&nsGkAtoms::_moz_windows_glass,
|
||||||
|
nsMediaFeature::eMinMaxNotAllowed,
|
||||||
|
nsMediaFeature::eBoolInteger,
|
||||||
|
{ &nsGkAtoms::windows_glass },
|
||||||
|
GetSystemMetric
|
||||||
|
},
|
||||||
{
|
{
|
||||||
&nsGkAtoms::_moz_touch_enabled,
|
&nsGkAtoms::_moz_touch_enabled,
|
||||||
nsMediaFeature::eMinMaxNotAllowed,
|
nsMediaFeature::eMinMaxNotAllowed,
|
||||||
|
|
|
@ -558,6 +558,7 @@ function run() {
|
||||||
expression_should_be_parseable("-moz-mac-lion-theme");
|
expression_should_be_parseable("-moz-mac-lion-theme");
|
||||||
expression_should_be_parseable("-moz-windows-compositor");
|
expression_should_be_parseable("-moz-windows-compositor");
|
||||||
expression_should_be_parseable("-moz-windows-classic");
|
expression_should_be_parseable("-moz-windows-classic");
|
||||||
|
expression_should_be_parseable("-moz-windows-glass");
|
||||||
expression_should_be_parseable("-moz-touch-enabled");
|
expression_should_be_parseable("-moz-touch-enabled");
|
||||||
expression_should_be_parseable("-moz-maemo-classic");
|
expression_should_be_parseable("-moz-maemo-classic");
|
||||||
|
|
||||||
|
@ -573,6 +574,7 @@ function run() {
|
||||||
expression_should_be_parseable("-moz-mac-lion-theme: 0");
|
expression_should_be_parseable("-moz-mac-lion-theme: 0");
|
||||||
expression_should_be_parseable("-moz-windows-compositor: 0");
|
expression_should_be_parseable("-moz-windows-compositor: 0");
|
||||||
expression_should_be_parseable("-moz-windows-classic: 0");
|
expression_should_be_parseable("-moz-windows-classic: 0");
|
||||||
|
expression_should_be_parseable("-moz-windows-glass: 0");
|
||||||
expression_should_be_parseable("-moz-touch-enabled: 0");
|
expression_should_be_parseable("-moz-touch-enabled: 0");
|
||||||
expression_should_be_parseable("-moz-maemo-classic: 0");
|
expression_should_be_parseable("-moz-maemo-classic: 0");
|
||||||
|
|
||||||
|
@ -588,6 +590,7 @@ function run() {
|
||||||
expression_should_be_parseable("-moz-mac-lion-theme: 1");
|
expression_should_be_parseable("-moz-mac-lion-theme: 1");
|
||||||
expression_should_be_parseable("-moz-windows-compositor: 1");
|
expression_should_be_parseable("-moz-windows-compositor: 1");
|
||||||
expression_should_be_parseable("-moz-windows-classic: 1");
|
expression_should_be_parseable("-moz-windows-classic: 1");
|
||||||
|
expression_should_be_parseable("-moz-windows-glass: 1");
|
||||||
expression_should_be_parseable("-moz-touch-enabled: 1");
|
expression_should_be_parseable("-moz-touch-enabled: 1");
|
||||||
expression_should_be_parseable("-moz-maemo-classic: 1");
|
expression_should_be_parseable("-moz-maemo-classic: 1");
|
||||||
|
|
||||||
|
@ -603,6 +606,7 @@ function run() {
|
||||||
expression_should_not_be_parseable("-moz-mac-lion-theme: -1");
|
expression_should_not_be_parseable("-moz-mac-lion-theme: -1");
|
||||||
expression_should_not_be_parseable("-moz-windows-compositor: -1");
|
expression_should_not_be_parseable("-moz-windows-compositor: -1");
|
||||||
expression_should_not_be_parseable("-moz-windows-classic: -1");
|
expression_should_not_be_parseable("-moz-windows-classic: -1");
|
||||||
|
expression_should_not_be_parseable("-moz-windows-glass: -1");
|
||||||
expression_should_not_be_parseable("-moz-touch-enabled: -1");
|
expression_should_not_be_parseable("-moz-touch-enabled: -1");
|
||||||
expression_should_not_be_parseable("-moz-maemo-classic: -1");
|
expression_should_not_be_parseable("-moz-maemo-classic: -1");
|
||||||
|
|
||||||
|
@ -618,6 +622,7 @@ function run() {
|
||||||
expression_should_not_be_parseable("-moz-mac-lion-theme: true");
|
expression_should_not_be_parseable("-moz-mac-lion-theme: true");
|
||||||
expression_should_not_be_parseable("-moz-windows-compositor: true");
|
expression_should_not_be_parseable("-moz-windows-compositor: true");
|
||||||
expression_should_not_be_parseable("-moz-windows-classic: true");
|
expression_should_not_be_parseable("-moz-windows-classic: true");
|
||||||
|
expression_should_not_be_parseable("-moz-windows-glass: true");
|
||||||
expression_should_not_be_parseable("-moz-touch-enabled: true");
|
expression_should_not_be_parseable("-moz-touch-enabled: true");
|
||||||
expression_should_not_be_parseable("-moz-maemo-classic: true");
|
expression_should_not_be_parseable("-moz-maemo-classic: true");
|
||||||
|
|
||||||
|
|
|
@ -250,6 +250,15 @@ public:
|
||||||
*/
|
*/
|
||||||
eIntID_WindowsClassic,
|
eIntID_WindowsClassic,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A Boolean value to determine whether the current Windows desktop theme
|
||||||
|
* supports Aero Glass.
|
||||||
|
*
|
||||||
|
* This is Windows-specific and is not implemented on other platforms
|
||||||
|
* (will return the default of NS_ERROR_FAILURE).
|
||||||
|
*/
|
||||||
|
eIntID_WindowsGlass,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A Boolean value to determine whether the device is a touch enabled
|
* A Boolean value to determine whether the device is a touch enabled
|
||||||
* device. Currently this is only supported by the Windows 7 Touch API.
|
* device. Currently this is only supported by the Windows 7 Touch API.
|
||||||
|
|
|
@ -43,9 +43,9 @@ public:
|
||||||
WIN2K3_VERSION = 0x502,
|
WIN2K3_VERSION = 0x502,
|
||||||
VISTA_VERSION = 0x600,
|
VISTA_VERSION = 0x600,
|
||||||
// WIN2K8_VERSION = VISTA_VERSION,
|
// WIN2K8_VERSION = VISTA_VERSION,
|
||||||
WIN7_VERSION = 0x601
|
WIN7_VERSION = 0x601,
|
||||||
// WIN2K8R2_VERSION = WIN7_VERSION
|
// WIN2K8R2_VERSION = WIN7_VERSION
|
||||||
// WIN8_VERSION = 0x602
|
WIN8_VERSION = 0x602
|
||||||
};
|
};
|
||||||
static WinVersion GetWindowsVersion();
|
static WinVersion GetWindowsVersion();
|
||||||
|
|
||||||
|
|
|
@ -396,6 +396,11 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
|
||||||
case eIntID_DWMCompositor:
|
case eIntID_DWMCompositor:
|
||||||
aResult = nsUXThemeData::CheckForCompositor();
|
aResult = nsUXThemeData::CheckForCompositor();
|
||||||
break;
|
break;
|
||||||
|
case eIntID_WindowsGlass:
|
||||||
|
// Aero Glass is only available prior to Windows 8 when DWM is used.
|
||||||
|
aResult = (nsUXThemeData::CheckForCompositor() &&
|
||||||
|
WinUtils::GetWindowsVersion() < WinUtils::WIN8_VERSION);
|
||||||
|
break;
|
||||||
case eIntID_AlertNotificationOrigin:
|
case eIntID_AlertNotificationOrigin:
|
||||||
aResult = 0;
|
aResult = 0;
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче