aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/style/font_face.rs12
-rw-r--r--components/style/gecko/generated/structs_debug.rs4
-rw-r--r--components/style/gecko/generated/structs_release.rs4
3 files changed, 19 insertions, 1 deletions
diff --git a/components/style/font_face.rs b/components/style/font_face.rs
index 23f1496b157..77bf43d2017 100644
--- a/components/style/font_face.rs
+++ b/components/style/font_face.rs
@@ -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 {
(
$( #[$doc: meta] $name: tt $ident: ident / $gecko_ident: ident: $ty: ty, )*
@@ -275,7 +285,7 @@ macro_rules! font_face_descriptors_common {
-> Result<(), ParseError<'i>> {
match_ignore_ascii_case! { &*name,
$(
- $name => {
+ $name if is_descriptor_enabled!($name) => {
// DeclarationParser also calls parse_entirely
// so we’d normally not need to,
// but in this case we do because we set the value as a side effect
diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs
index 7d6eed0e140..e5534663c64 100644
--- a/components/style/gecko/generated/structs_debug.rs
+++ b/components/style/gecko/generated/structs_debug.rs
@@ -9046,6 +9046,10 @@ pub mod root {
pub _address: u8,
}
extern "C" {
+ #[link_name = "_ZN7mozilla10StylePrefs19sFontDisplayEnabledE"]
+ pub static mut StylePrefs_sFontDisplayEnabled: bool;
+ }
+ extern "C" {
#[link_name = "_ZN7mozilla10StylePrefs19sOpentypeSVGEnabledE"]
pub static mut StylePrefs_sOpentypeSVGEnabled: bool;
}
diff --git a/components/style/gecko/generated/structs_release.rs b/components/style/gecko/generated/structs_release.rs
index 7ab31bfc5d0..0a77e3bb564 100644
--- a/components/style/gecko/generated/structs_release.rs
+++ b/components/style/gecko/generated/structs_release.rs
@@ -8892,6 +8892,10 @@ pub mod root {
pub _address: u8,
}
extern "C" {
+ #[link_name = "_ZN7mozilla10StylePrefs19sFontDisplayEnabledE"]
+ pub static mut StylePrefs_sFontDisplayEnabled: bool;
+ }
+ extern "C" {
#[link_name = "_ZN7mozilla10StylePrefs19sOpentypeSVGEnabledE"]
pub static mut StylePrefs_sOpentypeSVGEnabled: bool;
}