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
|
@ -24,7 +24,7 @@ use string_cache::Atom;
|
|||
use style::font_face::{EffectiveSources, Source};
|
||||
use style::properties::longhands::font_family::computed_value::FontFamily;
|
||||
use url::Url;
|
||||
use util::prefs;
|
||||
use util::prefs::PREFS;
|
||||
use util::thread::spawn_named;
|
||||
use webrender_traits;
|
||||
|
||||
|
@ -456,7 +456,7 @@ impl FontCacheThread {
|
|||
|
||||
// derived from http://stackoverflow.com/a/10864297/3830
|
||||
fn is_supported_font_type(toplevel: &TopLevel, sublevel: &SubLevel) -> bool {
|
||||
if !prefs::get_pref("network.mime.sniff").as_boolean().unwrap_or(false) {
|
||||
if !PREFS.get("network.mime.sniff").as_boolean().unwrap_or(false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue