mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Make font-display descriptor behind the pref.
This commit is contained in:
parent
13df7e4c84
commit
df95a469a0
3 changed files with 19 additions and 1 deletions
|
@ -210,6 +210,16 @@ impl Parse for Source {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macro_rules! is_descriptor_enabled {
|
||||||
|
("font-display") => {
|
||||||
|
unsafe {
|
||||||
|
use gecko_bindings::structs::mozilla;
|
||||||
|
mozilla::StylePrefs_sFontDisplayEnabled
|
||||||
|
}
|
||||||
|
};
|
||||||
|
($name: tt) => { true }
|
||||||
|
}
|
||||||
|
|
||||||
macro_rules! font_face_descriptors_common {
|
macro_rules! font_face_descriptors_common {
|
||||||
(
|
(
|
||||||
$( #[$doc: meta] $name: tt $ident: ident / $gecko_ident: ident: $ty: ty, )*
|
$( #[$doc: meta] $name: tt $ident: ident / $gecko_ident: ident: $ty: ty, )*
|
||||||
|
@ -275,7 +285,7 @@ macro_rules! font_face_descriptors_common {
|
||||||
-> Result<(), ParseError<'i>> {
|
-> Result<(), ParseError<'i>> {
|
||||||
match_ignore_ascii_case! { &*name,
|
match_ignore_ascii_case! { &*name,
|
||||||
$(
|
$(
|
||||||
$name => {
|
$name if is_descriptor_enabled!($name) => {
|
||||||
// DeclarationParser also calls parse_entirely
|
// DeclarationParser also calls parse_entirely
|
||||||
// so we’d normally not need to,
|
// so we’d normally not need to,
|
||||||
// but in this case we do because we set the value as a side effect
|
// but in this case we do because we set the value as a side effect
|
||||||
|
|
|
@ -9045,6 +9045,10 @@ pub mod root {
|
||||||
pub struct StylePrefs {
|
pub struct StylePrefs {
|
||||||
pub _address: u8,
|
pub _address: u8,
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
#[link_name = "_ZN7mozilla10StylePrefs19sFontDisplayEnabledE"]
|
||||||
|
pub static mut StylePrefs_sFontDisplayEnabled: bool;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[link_name = "_ZN7mozilla10StylePrefs19sOpentypeSVGEnabledE"]
|
#[link_name = "_ZN7mozilla10StylePrefs19sOpentypeSVGEnabledE"]
|
||||||
pub static mut StylePrefs_sOpentypeSVGEnabled: bool;
|
pub static mut StylePrefs_sOpentypeSVGEnabled: bool;
|
||||||
|
|
|
@ -8891,6 +8891,10 @@ pub mod root {
|
||||||
pub struct StylePrefs {
|
pub struct StylePrefs {
|
||||||
pub _address: u8,
|
pub _address: u8,
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
#[link_name = "_ZN7mozilla10StylePrefs19sFontDisplayEnabledE"]
|
||||||
|
pub static mut StylePrefs_sFontDisplayEnabled: bool;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[link_name = "_ZN7mozilla10StylePrefs19sOpentypeSVGEnabledE"]
|
#[link_name = "_ZN7mozilla10StylePrefs19sOpentypeSVGEnabledE"]
|
||||||
pub static mut StylePrefs_sOpentypeSVGEnabled: bool;
|
pub static mut StylePrefs_sOpentypeSVGEnabled: bool;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue