mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Remove cascade layers pref
These have been enabled by default for quite a while. Differential Revision: https://phabricator.services.mozilla.com/D175513
This commit is contained in:
parent
9ce567d7fe
commit
bc82d005ae
2 changed files with 2 additions and 17 deletions
|
@ -1188,14 +1188,6 @@ impl CSSWideKeyword {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn cascade_layes_enabled() -> bool {
|
||||
#[cfg(feature = "gecko")]
|
||||
return static_prefs::pref!("layout.css.cascade-layers.enabled");
|
||||
#[cfg(feature = "servo")]
|
||||
return false;
|
||||
}
|
||||
|
||||
impl CSSWideKeyword {
|
||||
/// Parses a CSS wide keyword from a CSS identifier.
|
||||
pub fn from_ident(ident: &str) -> Result<Self, ()> {
|
||||
|
@ -1204,7 +1196,7 @@ impl CSSWideKeyword {
|
|||
"inherit" => CSSWideKeyword::Inherit,
|
||||
"unset" => CSSWideKeyword::Unset,
|
||||
"revert" => CSSWideKeyword::Revert,
|
||||
"revert-layer" if cascade_layes_enabled() => CSSWideKeyword::RevertLayer,
|
||||
"revert-layer" => CSSWideKeyword::RevertLayer,
|
||||
_ => return Err(()),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -264,14 +264,7 @@ impl<'a, 'i> AtRuleParser<'i> for TopLevelRuleParser<'a> {
|
|||
}).ok()
|
||||
};
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
let layers_enabled = static_prefs::pref!("layout.css.cascade-layers.enabled");
|
||||
#[cfg(feature = "servo")]
|
||||
let layers_enabled = false;
|
||||
|
||||
let layer = if !layers_enabled {
|
||||
None
|
||||
} else if input.try_parse(|input| input.expect_ident_matching("layer")).is_ok() {
|
||||
let layer = if input.try_parse(|input| input.expect_ident_matching("layer")).is_ok() {
|
||||
Some(ImportLayer {
|
||||
name: None,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue