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

Differential Revision: https://phabricator.services.mozilla.com/D2845
This commit is contained in:
Xidorn Quan 2018-08-07 13:57:45 +00:00 committed by Emilio Cobos Álvarez
parent c87668fcd5
commit e7945bbfcb
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -20,30 +20,36 @@
input: &mut Parser<'i, 't>, input: &mut Parser<'i, 't>,
) -> Result<Longhands, ParseError<'i>> { ) -> Result<Longhands, ParseError<'i>> {
% if product == "gecko": % if product == "gecko":
let moz_kw_found = input.try(|input| { use gecko_bindings::structs;
try_match_ident_ignore_ascii_case! { input, let moz_kw_enabled = unsafe {
"-moz-scrollbars-horizontal" => { structs::StaticPrefs_sVarCache_layout_css_overflow_moz_scrollbars_enabled
Ok(expanded! { };
overflow_x: SpecifiedValue::Scroll, if moz_kw_enabled {
overflow_y: SpecifiedValue::Hidden, let moz_kw_found = input.try(|input| {
}) try_match_ident_ignore_ascii_case! { input,
} "-moz-scrollbars-horizontal" => {
"-moz-scrollbars-vertical" => { Ok(expanded! {
Ok(expanded! { overflow_x: SpecifiedValue::Scroll,
overflow_x: SpecifiedValue::Hidden, overflow_y: SpecifiedValue::Hidden,
overflow_y: SpecifiedValue::Scroll, })
}) }
} "-moz-scrollbars-vertical" => {
"-moz-scrollbars-none" => { Ok(expanded! {
Ok(expanded! { overflow_x: SpecifiedValue::Hidden,
overflow_x: SpecifiedValue::Hidden, overflow_y: SpecifiedValue::Scroll,
overflow_y: SpecifiedValue::Hidden, })
}) }
"-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 % endif
let overflow_x = parse_overflow(context, input)?; let overflow_x = parse_overflow(context, input)?;