mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Use static_prefs::pref!
.
It's much nicer. One nice thing about this is that the new code is subject to the existing threadedness checking, which identified that several of these should be atomic because they're accessed off the main thread. Differential Revision: https://phabricator.services.mozilla.com/D40792
This commit is contained in:
parent
ad1d028e40
commit
bb032c1ddc
17 changed files with 26 additions and 60 deletions
|
@ -673,7 +673,7 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {
|
|||
#[inline]
|
||||
#[cfg(feature = "gecko")]
|
||||
fn recompute_default_font_family_type_if_needed(&mut self) {
|
||||
use crate::gecko_bindings::{bindings, structs};
|
||||
use crate::gecko_bindings::bindings;
|
||||
use crate::values::computed::font::GenericFontFamily;
|
||||
|
||||
if !self.seen.contains(LonghandId::XLang) &&
|
||||
|
@ -681,7 +681,7 @@ impl<'a, 'b: 'a> Cascade<'a, 'b> {
|
|||
return;
|
||||
}
|
||||
|
||||
let use_document_fonts = unsafe { structs::StaticPrefs::sVarCache_browser_display_use_document_fonts != 0 };
|
||||
let use_document_fonts = static_prefs::pref!("browser.display.use_document_fonts") != 0;
|
||||
let builder = &mut self.context.builder;
|
||||
let (default_font_type, prioritize_user_fonts) = {
|
||||
let font = builder.get_font().gecko();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue