mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
style: Refactor some enabledness checks.
There are some common checks that could get some easy-to-use aliases. Differential Revision: https://phabricator.services.mozilla.com/D25117
This commit is contained in:
parent
76c0ae565e
commit
bd77cd64b9
4 changed files with 111 additions and 105 deletions
|
@ -223,8 +223,7 @@ impl SupportsCondition {
|
|||
#[cfg(feature = "gecko")]
|
||||
fn eval_moz_bool_pref(name: &CStr, cx: &ParserContext) -> bool {
|
||||
use crate::gecko_bindings::bindings;
|
||||
use crate::stylesheets::Origin;
|
||||
if cx.stylesheet_origin != Origin::UserAgent && !cx.chrome_rules_enabled() {
|
||||
if !cx.in_ua_or_chrome_sheet() {
|
||||
return false;
|
||||
}
|
||||
unsafe { bindings::Gecko_GetBoolPrefValue(name.as_ptr()) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue