summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-07-19 16:34:50 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-02-04 20:41:16 +0100
commit0f285318cdf3336aabda0cfa6bc306b2274f14e8 (patch)
tree3ff47def87ee9c18227c6d0b79428f3fc4498d63 /layout
parent3019e0ff28bfd2d2a65b59501e582bb26356c6d7 (diff)
downloaduxp-0f285318cdf3336aabda0cfa6bc306b2274f14e8.tar.gz
Add -moz-windows-accent-color-is-dark
#31 point 4
Diffstat (limited to 'layout')
-rw-r--r--layout/style/nsCSSRuleProcessor.cpp5
-rw-r--r--layout/style/nsMediaFeatures.cpp8
2 files changed, 13 insertions, 0 deletions
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
index 4dc7ea1c88..8760a330e1 100644
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -1132,6 +1132,11 @@ InitSystemMetrics()
sSystemMetrics->AppendElement(nsGkAtoms::windows_accent_color_applies);
}
+ rv = LookAndFeel::GetInt(LookAndFeel::eIntID_WindowsAccentColorIsDark, &metricResult);
+ if (NS_SUCCEEDED(rv) && metricResult) {
+ sSystemMetrics->AppendElement(nsGkAtoms::windows_accent_color_is_dark);
+ }
+
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_DWMCompositor, &metricResult);
if (NS_SUCCEEDED(rv) && metricResult) {
sSystemMetrics->AppendElement(nsGkAtoms::windows_compositor);
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
index f314835a40..052ce58e84 100644
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
@@ -724,6 +724,14 @@ nsMediaFeatures::features[] = {
GetSystemMetric
},
{
+ &nsGkAtoms::_moz_windows_accent_color_is_dark,
+ nsMediaFeature::eMinMaxNotAllowed,
+ nsMediaFeature::eBoolInteger,
+ nsMediaFeature::eNoRequirements,
+ { &nsGkAtoms::windows_accent_color_is_dark },
+ GetSystemMetric
+ },
+ {
&nsGkAtoms::_moz_windows_compositor,
nsMediaFeature::eMinMaxNotAllowed,
nsMediaFeature::eBoolInteger,