From 5be5d493dfa87604a252198a9e3f68e5925ccae6 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Sat, 29 Jul 2017 12:07:54 +1000 Subject: [PATCH] Have check_allowed_in read gPropertyEabled table directly. --- components/style/gecko/generated/bindings.rs | 3 --- components/style/properties/properties.mako.rs | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 4a06048525a..5a8de33b06c 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -1418,9 +1418,6 @@ extern "C" { pub fn Gecko_ReleaseCSSValueSharedListArbitraryThread(aPtr: *mut nsCSSValueSharedList); } -extern "C" { - pub fn Gecko_PropertyId_IsPrefEnabled(id: nsCSSPropertyID) -> bool; -} extern "C" { pub fn Gecko_nsStyleFont_SetLang(font: *mut nsStyleFont, atom: *mut nsIAtom); diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 41e9b3e00ac..877ec1a1b9f 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -1184,8 +1184,9 @@ impl PropertyId { } % endif % if product == "gecko": + use gecko_bindings::structs; let id = self.to_nscsspropertyid().unwrap(); - unsafe { bindings::Gecko_PropertyId_IsPrefEnabled(id) } + unsafe { structs::nsCSSProps_gPropertyEnabled[id as usize] } % endif };