mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Don't pref-gate properties in geckolib mode
This commit is contained in:
parent
9812034b96
commit
3772b4881b
3 changed files with 5 additions and 4 deletions
|
@ -60,7 +60,7 @@
|
||||||
match_ignore_ascii_case! { try!(input.expect_ident()),
|
match_ignore_ascii_case! { try!(input.expect_ident()),
|
||||||
% for value in values:
|
% for value in values:
|
||||||
"${value}" => {
|
"${value}" => {
|
||||||
% if value in experimental_values:
|
% if value in experimental_values and product == "servo":
|
||||||
if !::util::prefs::PREFS.get("layout.${value}.enabled")
|
if !::util::prefs::PREFS.get("layout.${value}.enabled")
|
||||||
.as_boolean().unwrap_or(false) {
|
.as_boolean().unwrap_or(false) {
|
||||||
return Err(())
|
return Err(())
|
||||||
|
|
|
@ -767,7 +767,7 @@ impl PropertyDeclaration {
|
||||||
return PropertyDeclarationParseResult::UnknownProperty
|
return PropertyDeclarationParseResult::UnknownProperty
|
||||||
}
|
}
|
||||||
% endif
|
% endif
|
||||||
% if property.experimental:
|
% if property.experimental and product == "servo":
|
||||||
if !::util::prefs::PREFS.get("${property.experimental}")
|
if !::util::prefs::PREFS.get("${property.experimental}")
|
||||||
.as_boolean().unwrap_or(false) {
|
.as_boolean().unwrap_or(false) {
|
||||||
return PropertyDeclarationParseResult::ExperimentalProperty
|
return PropertyDeclarationParseResult::ExperimentalProperty
|
||||||
|
@ -797,7 +797,7 @@ impl PropertyDeclaration {
|
||||||
return PropertyDeclarationParseResult::UnknownProperty
|
return PropertyDeclarationParseResult::UnknownProperty
|
||||||
}
|
}
|
||||||
% endif
|
% endif
|
||||||
% if shorthand.experimental:
|
% if shorthand.experimental and product == "servo":
|
||||||
if !::util::prefs::PREFS.get("${shorthand.experimental}")
|
if !::util::prefs::PREFS.get("${shorthand.experimental}")
|
||||||
.as_boolean().unwrap_or(false) {
|
.as_boolean().unwrap_or(false) {
|
||||||
return PropertyDeclarationParseResult::ExperimentalProperty
|
return PropertyDeclarationParseResult::ExperimentalProperty
|
||||||
|
|
|
@ -504,7 +504,8 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> {
|
||||||
Ok(AtRuleType::WithBlock(AtRulePrelude::FontFace))
|
Ok(AtRuleType::WithBlock(AtRulePrelude::FontFace))
|
||||||
},
|
},
|
||||||
"viewport" => {
|
"viewport" => {
|
||||||
if ::util::prefs::PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) {
|
if ::util::prefs::PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) ||
|
||||||
|
cfg!(feature = "gecko") {
|
||||||
Ok(AtRuleType::WithBlock(AtRulePrelude::Viewport))
|
Ok(AtRuleType::WithBlock(AtRulePrelude::Viewport))
|
||||||
} else {
|
} else {
|
||||||
Err(())
|
Err(())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue