#8539 Config preferences backend restructure

This commit is contained in:
Peter Hall 2019-02-14 12:53:59 +00:00
parent 34fda66dfa
commit 8bfd4dc1e2
53 changed files with 1748 additions and 680 deletions

View file

@ -22,7 +22,7 @@ use js::jsapi::{JSContext, JSObject};
use js::jsval::{ObjectValue, UndefinedValue};
#[cfg(target_os = "linux")]
use servo_config::opts;
use servo_config::prefs::PREFS;
use servo_config::pref;
use std::rc::Rc;
#[cfg(target_os = "linux")]
use tinyfiledialogs::{self, MessageBoxIcon, YesNo};
@ -307,11 +307,7 @@ pub fn get_descriptor_permission_state(
let state = if allowed_in_nonsecure_contexts(&permission_name) {
PermissionState::Prompt
} else {
if PREFS
.get("dom.permissions.testing.allowed_in_nonsecure_contexts")
.as_boolean()
.unwrap_or(false)
{
if pref!(dom.permissions.testing.allowed_in_nonsecure_contexts) {
PermissionState::Granted
} else {
settings