mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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,
|
||||
Hash,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToCss,
|
||||
|
@ -2098,10 +2097,28 @@ pub enum Overflow {
|
|||
Scroll,
|
||||
Auto,
|
||||
#[cfg(feature = "gecko")]
|
||||
#[parse(aliases = "-moz-hidden-unscrollable")]
|
||||
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 {
|
||||
/// Return true if the value will create a scrollable box.
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue