mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
#8539 Config preferences backend restructure
This commit is contained in:
parent
34fda66dfa
commit
8bfd4dc1e2
53 changed files with 1748 additions and 680 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue