Skip to content
Permalink
Browse files

style: Put overflow: -moz-scrollbar-* behind pref.

  • Loading branch information
upsuper authored and emilio committed Aug 18, 2018
1 parent c87668f commit e7945bbfcb77165d18f32a61416c7208e0b27b9d
Showing with 28 additions and 22 deletions.
  1. +28 −22 components/style/properties/shorthands/box.mako.rs
@@ -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)?;

0 comments on commit e7945bb

Please sign in to comment.
You can’t perform that action at this time.