mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Put overflow: -moz-hidden-unscrollable behind a pref on Nightly
Differential Revision: https://phabricator.services.mozilla.com/D141759
This commit is contained in:
parent
32dd0b27e4
commit
ece2a74709
1 changed files with 19 additions and 2 deletions
|
@ -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]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue