summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-06-30 07:24:17 +0200
committerGitHub <noreply@github.com>2018-06-30 07:24:17 +0200
commitc2fc3664d1d94178a48178b72dad462379b57449 (patch)
tree845967451c0e210648b9607092a9bf1f83eaef70 /layout
parent86c08f4c4e41ea6de54d7353a9bfec065bcf205a (diff)
parent6151dca6eac269a8dc4ca23552360aa7856eb9db (diff)
downloadUXP-c2fc3664d1d94178a48178b72dad462379b57449.tar
UXP-c2fc3664d1d94178a48178b72dad462379b57449.tar.gz
UXP-c2fc3664d1d94178a48178b72dad462379b57449.tar.lz
UXP-c2fc3664d1d94178a48178b72dad462379b57449.tar.xz
UXP-c2fc3664d1d94178a48178b72dad462379b57449.zip
Merge pull request #567 from SpockMan02/moz-mac-lion-theme
Undo Mozilla Bug 1302937; Reinstate -moz-mac-lion-theme media query
Diffstat (limited to 'layout')
-rw-r--r--layout/style/nsCSSRuleProcessor.cpp15
-rw-r--r--layout/style/nsMediaFeatures.cpp10
-rw-r--r--layout/style/test/test_media_queries.html7
3 files changed, 24 insertions, 8 deletions
diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp
index 8760a330e..810a8f8f0 100644
--- a/layout/style/nsCSSRuleProcessor.cpp
+++ b/layout/style/nsCSSRuleProcessor.cpp
@@ -1122,6 +1122,11 @@ InitSystemMetrics()
sSystemMetrics->AppendElement(nsGkAtoms::mac_graphite_theme);
}
+ rv = LookAndFeel::GetInt(LookAndFeel::eIntID_MacLionTheme, &metricResult);
+ if (NS_SUCCEEDED(rv) && metricResult) {
+ sSystemMetrics->AppendElement(nsGkAtoms::mac_lion_theme);
+ }
+
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_MacYosemiteTheme, &metricResult);
if (NS_SUCCEEDED(rv) && metricResult) {
sSystemMetrics->AppendElement(nsGkAtoms::mac_yosemite_theme);
@@ -1161,7 +1166,7 @@ InitSystemMetrics()
if (NS_SUCCEEDED(rv) && metricResult) {
sSystemMetrics->AppendElement(nsGkAtoms::touch_enabled);
}
-
+
rv = LookAndFeel::GetInt(LookAndFeel::eIntID_SwipeAnimationEnabled,
&metricResult);
if (NS_SUCCEEDED(rv) && metricResult) {
@@ -1539,7 +1544,7 @@ checkGenericEmptyMatches(Element* aElement,
do {
child = aElement->GetChildAt(++index);
// stop at first non-comment (and non-whitespace for
- // :-moz-only-whitespace) node
+ // :-moz-only-whitespace) node
} while (child && !IsSignificantChild(child, true, isWhitespaceSignificant));
return (child == nullptr);
}
@@ -2233,7 +2238,7 @@ static bool SelectorMatches(Element* aElement,
NS_ASSERTION(hasAttr, "HasAttr lied");
result = AttrMatchesValue(attr, value, isHTML);
}
-
+
attr = attr->mNext;
} while (attr && result);
}
@@ -3085,7 +3090,7 @@ nsCSSRuleProcessor::AppendFontFaceRules(
if (!aArray.AppendElements(cascade->mFontFaceRules))
return false;
}
-
+
return true;
}
@@ -3129,7 +3134,7 @@ nsCSSRuleProcessor::AppendPageRules(
return false;
}
}
-
+
return true;
}
diff --git a/layout/style/nsMediaFeatures.cpp b/layout/style/nsMediaFeatures.cpp
index 5a54d5455..854236e51 100644
--- a/layout/style/nsMediaFeatures.cpp
+++ b/layout/style/nsMediaFeatures.cpp
@@ -706,6 +706,14 @@ nsMediaFeatures::features[] = {
GetSystemMetric
},
{
+ &nsGkAtoms::_moz_mac_lion_theme,
+ nsMediaFeature::eMinMaxNotAllowed,
+ nsMediaFeature::eBoolInteger,
+ nsMediaFeature::eNoRequirements,
+ { &nsGkAtoms::mac_lion_theme },
+ GetSystemMetric
+ },
+ {
&nsGkAtoms::_moz_mac_yosemite_theme,
nsMediaFeature::eMinMaxNotAllowed,
nsMediaFeature::eBoolInteger,
@@ -728,7 +736,7 @@ nsMediaFeatures::features[] = {
nsMediaFeature::eNoRequirements,
{ &nsGkAtoms::windows_accent_color_is_dark },
GetSystemMetric
- },
+ },
{
&nsGkAtoms::_moz_windows_compositor,
nsMediaFeature::eMinMaxNotAllowed,
diff --git a/layout/style/test/test_media_queries.html b/layout/style/test/test_media_queries.html
index d503fad0b..59fe030c2 100644
--- a/layout/style/test/test_media_queries.html
+++ b/layout/style/test/test_media_queries.html
@@ -627,6 +627,7 @@ function run() {
expression_should_be_parseable("-moz-overlay-scrollbars");
expression_should_be_parseable("-moz-windows-default-theme");
expression_should_be_parseable("-moz-mac-graphite-theme");
+ expression_should_be_parseable("-moz-mac-lion-theme");
expression_should_be_parseable("-moz-mac-yosemite-theme");
expression_should_be_parseable("-moz-windows-accent-color-applies");
expression_should_be_parseable("-moz-windows-compositor");
@@ -643,6 +644,7 @@ function run() {
expression_should_be_parseable("-moz-overlay-scrollbars: 0");
expression_should_be_parseable("-moz-windows-default-theme: 0");
expression_should_be_parseable("-moz-mac-graphite-theme: 0");
+ expression_should_be_parseable("-moz-mac-lion-theme: 0");
expression_should_be_parseable("-moz-mac-yosemite-theme: 0");
expression_should_be_parseable("-moz-windows-accent-color-applies: 0");
expression_should_be_parseable("-moz-windows-compositor: 0");
@@ -659,6 +661,7 @@ function run() {
expression_should_be_parseable("-moz-overlay-scrollbars: 1");
expression_should_be_parseable("-moz-windows-default-theme: 1");
expression_should_be_parseable("-moz-mac-graphite-theme: 1");
+ expression_should_be_parseable("-moz-mac-lion-theme: 1");
expression_should_be_parseable("-moz-mac-yosemite-theme: 1");
expression_should_be_parseable("-moz-windows-accent-color-applies: 1");
expression_should_be_parseable("-moz-windows-compositor: 1");
@@ -675,6 +678,7 @@ function run() {
expression_should_not_be_parseable("-moz-overlay-scrollbars: -1");
expression_should_not_be_parseable("-moz-windows-default-theme: -1");
expression_should_not_be_parseable("-moz-mac-graphite-theme: -1");
+ expression_should_not_be_parseable("-moz-mac-lion-theme: -1");
expression_should_not_be_parseable("-moz-mac-yosemite-theme: -1");
expression_should_not_be_parseable("-moz-windows-accent-color-applies: -1");
expression_should_not_be_parseable("-moz-windows-compositor: -1");
@@ -691,6 +695,7 @@ function run() {
expression_should_not_be_parseable("-moz-overlay-scrollbars: true");
expression_should_not_be_parseable("-moz-windows-default-theme: true");
expression_should_not_be_parseable("-moz-mac-graphite-theme: true");
+ expression_should_not_be_parseable("-moz-mac-lion-theme: true");
expression_should_not_be_parseable("-moz-mac-yosemite-theme: true");
expression_should_not_be_parseable("-moz-windows-accent-color-applies: true");
expression_should_not_be_parseable("-moz-windows-compositor: true");
@@ -844,5 +849,3 @@ function handle_iframe_onload(event)
</pre>
</body>
</html>
-
-