style: Put overflow: -moz-hidden-unscrollable behind a pref on Nightly

Differential Revision: https://phabricator.services.mozilla.com/D141759
This commit is contained in:
Emilio Cobos Álvarez 2023-06-06 23:59:59 +02:00 committed by Oriol Brufau
parent 32dd0b27e4
commit ece2a74709

View file

@ -2083,7 +2083,6 @@ impl BreakWithin {
Eq, Eq,
Hash, Hash,
MallocSizeOf, MallocSizeOf,
Parse,
PartialEq, PartialEq,
SpecifiedValueInfo, SpecifiedValueInfo,
ToCss, ToCss,
@ -2098,10 +2097,28 @@ pub enum Overflow {
Scroll, Scroll,
Auto, Auto,
#[cfg(feature = "gecko")] #[cfg(feature = "gecko")]
#[parse(aliases = "-moz-hidden-unscrollable")]
Clip, Clip,
} }
// This can be derived once we remove or keep `-moz-hidden-unscrollable`
// indefinitely.
impl Parse for Overflow {
fn parse<'i, 't>(_: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
Ok(try_match_ident_ignore_ascii_case! { input,
"visible" => Self::Visible,
"hidden" => Self::Hidden,
"scroll" => Self::Scroll,
"auto" => Self::Auto,
#[cfg(feature = "gecko")]
"clip" => Self::Clip,
#[cfg(feature = "gecko")]
"-moz-hidden-unscrollable" if static_prefs::pref!("layout.css.overflow-moz-hidden-unscrollable.enabled") => {
Overflow::Clip
},
})
}
}
impl Overflow { impl Overflow {
/// Return true if the value will create a scrollable box. /// Return true if the value will create a scrollable box.
#[inline] #[inline]