mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -48,7 +48,7 @@ use string_cache::Atom;
|
|||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
use style::context::ReflowGoal;
|
||||
use url::Url;
|
||||
use util::prefs::mozbrowser_enabled;
|
||||
use util::prefs::PREFS;
|
||||
use util::servo_version;
|
||||
|
||||
bitflags! {
|
||||
|
@ -145,7 +145,7 @@ impl HTMLIFrameElement {
|
|||
.send(ConstellationMsg::ScriptLoadedURLInIFrame(load_info))
|
||||
.unwrap();
|
||||
|
||||
if mozbrowser_enabled() {
|
||||
if PREFS.is_mozbrowser_enabled() {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowserloadstart
|
||||
self.dispatch_mozbrowser_event(MozBrowserEvent::LoadStart);
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ impl HTMLIFrameElement {
|
|||
// TODO(gw): Support mozbrowser event types that have detail which is not a string.
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API
|
||||
// for a list of mozbrowser events.
|
||||
assert!(mozbrowser_enabled());
|
||||
assert!(PREFS.is_mozbrowser_enabled());
|
||||
|
||||
if self.Mozbrowser() {
|
||||
let window = window_from_node(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue