Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
style: Put overflow: -moz-scrollbar-* behind pref.
  • Loading branch information
upsuper authored and emilio committed Aug 18, 2018
1 parent c87668f commit e7945bb
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions components/style/properties/shorthands/box.mako.rs
Expand Up @@ -20,30 +20,36 @@
input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> {
% if product == "gecko":
let moz_kw_found = input.try(|input| {
try_match_ident_ignore_ascii_case! { input,
"-moz-scrollbars-horizontal" => {
Ok(expanded! {
overflow_x: SpecifiedValue::Scroll,
overflow_y: SpecifiedValue::Hidden,
})
}
"-moz-scrollbars-vertical" => {
Ok(expanded! {
overflow_x: SpecifiedValue::Hidden,
overflow_y: SpecifiedValue::Scroll,
})
}
"-moz-scrollbars-none" => {
Ok(expanded! {
overflow_x: SpecifiedValue::Hidden,
overflow_y: SpecifiedValue::Hidden,
})
use gecko_bindings::structs;
let moz_kw_enabled = unsafe {
structs::StaticPrefs_sVarCache_layout_css_overflow_moz_scrollbars_enabled
};
if moz_kw_enabled {
let moz_kw_found = input.try(|input| {
try_match_ident_ignore_ascii_case! { input,
"-moz-scrollbars-horizontal" => {
Ok(expanded! {
overflow_x: SpecifiedValue::Scroll,
overflow_y: SpecifiedValue::Hidden,
})
}
"-moz-scrollbars-vertical" => {
Ok(expanded! {
overflow_x: SpecifiedValue::Hidden,
overflow_y: SpecifiedValue::Scroll,
})
}
"-moz-scrollbars-none" => {
Ok(expanded! {
overflow_x: SpecifiedValue::Hidden,
overflow_y: SpecifiedValue::Hidden,
})
}
}
});
if moz_kw_found.is_ok() {
return moz_kw_found
}
});
if moz_kw_found.is_ok() {
return moz_kw_found
}
% endif
let overflow_x = parse_overflow(context, input)?;
Expand Down

0 comments on commit e7945bb

Please sign in to comment.