mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #13673 - Manishearth:no-prefs-geckolib, r=emilio
Don't pref-gate properties in geckolib mode This led to me wasting a lot of time trying to figure out why my column-count implementation in gecko didn't work. We might eventually want to hook into the Gecko prefs, but the mechanism would probably be different r? @emilio <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13673) <!-- Reviewable:end -->
This commit is contained in:
commit
960d884fd4
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