mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Put overflow: -moz-scrollbar-* behind pref.
Differential Revision: https://phabricator.services.mozilla.com/D2845
This commit is contained in:
parent
c87668fcd5
commit
e7945bbfcb
1 changed files with 28 additions and 22 deletions
|
@ -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)?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue