mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Refactor util::prefs
operations to be methods on static struct.
This commit is contained in:
parent
307844a8c1
commit
22928f50ac
30 changed files with 166 additions and 162 deletions
|
@ -36,7 +36,7 @@ use util;
|
|||
use util::geometry::{PagePx, ViewportPx};
|
||||
use util::ipc::OptionalIpcSender;
|
||||
use util::opts::{self, Opts};
|
||||
use util::prefs::{self, Pref};
|
||||
use util::prefs::{PREFS, Pref};
|
||||
use webrender_traits;
|
||||
|
||||
pub enum ChildProcess {
|
||||
|
@ -234,7 +234,7 @@ impl Pipeline {
|
|||
panic_chan: state.panic_chan,
|
||||
script_port: script_port,
|
||||
opts: (*opts::get()).clone(),
|
||||
prefs: prefs::get_cloned(),
|
||||
prefs: PREFS.cloned(),
|
||||
layout_to_paint_chan: layout_to_paint_chan,
|
||||
pipeline_port: pipeline_port,
|
||||
pipeline_namespace_id: state.pipeline_namespace_id,
|
||||
|
@ -378,7 +378,7 @@ impl Pipeline {
|
|||
pub fn trigger_mozbrowser_event(&self,
|
||||
subpage_id: SubpageId,
|
||||
event: MozBrowserEvent) {
|
||||
assert!(prefs::mozbrowser_enabled());
|
||||
assert!(PREFS.is_mozbrowser_enabled());
|
||||
|
||||
let event = ConstellationControlMsg::MozBrowserEvent(self.id,
|
||||
subpage_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue