mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Further changes required by Servo
This commit is contained in:
parent
8bb7d98f0c
commit
5c0f044d39
4 changed files with 26 additions and 4 deletions
|
@ -1067,6 +1067,14 @@ 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, ()> {
|
||||
|
@ -1075,7 +1083,7 @@ impl CSSWideKeyword {
|
|||
"inherit" => CSSWideKeyword::Inherit,
|
||||
"unset" => CSSWideKeyword::Unset,
|
||||
"revert" => CSSWideKeyword::Revert,
|
||||
"revert-layer" if static_prefs::pref!("layout.css.cascade-layers.enabled") => CSSWideKeyword::RevertLayer,
|
||||
"revert-layer" if cascade_layes_enabled() => CSSWideKeyword::RevertLayer,
|
||||
_ => return Err(()),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue