diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index 8c784ac1eb5..68edd747931 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -271,6 +271,7 @@ mod bindings { .include(add_include("mozilla/dom/NameSpaceConstants.h")) .include(add_include("mozilla/LookAndFeel.h")) .include(add_include("mozilla/ServoBindings.h")) + .include(add_include("nsCSSFontFaceRule.h")) .include(add_include("nsMediaFeatures.h")) .include(add_include("nsMediaList.h")) // FIXME(emilio): Incrementally remove these "pub use"s. Probably @@ -337,6 +338,7 @@ mod bindings { "nsBorderColors", "nscolor", "nsChangeHint", + "nsCSSFontFaceRule", "nsCSSKeyword", "nsCSSPropertyID", "nsCSSProps", @@ -609,6 +611,7 @@ mod bindings { "StyleBasicShape", "StyleBasicShapeType", "StyleShapeSource", + "nsCSSFontFaceRule", "nsCSSKeyword", "nsCSSPropertyID", "nsCSSShadowArray", diff --git a/components/style/gecko_bindings/sugar/refptr.rs b/components/style/gecko_bindings/sugar/refptr.rs index 0202afb3292..5953652f3a5 100644 --- a/components/style/gecko_bindings/sugar/refptr.rs +++ b/components/style/gecko_bindings/sugar/refptr.rs @@ -235,10 +235,7 @@ impl PartialEq for RefPtr { unsafe impl Send for RefPtr {} unsafe impl Sync for RefPtr {} -// Companion of NS_DECL_THREADSAFE_FFI_REFCOUNTING. -// -// Gets you a free RefCounted impl implemented via FFI. -macro_rules! impl_threadsafe_refcount { +macro_rules! impl_refcount { ($t:ty, $addref:ident, $release:ident) => ( unsafe impl RefCounted for $t { fn addref(&self) { @@ -248,6 +245,18 @@ macro_rules! impl_threadsafe_refcount { ::gecko_bindings::bindings::$release(self as *const _ as *mut _) } } + ); +} + +impl_refcount!(::gecko_bindings::structs::nsCSSFontFaceRule, + Gecko_CSSFontFaceRule_AddRef, Gecko_CSSFontFaceRule_Release); + +// Companion of NS_DECL_THREADSAFE_FFI_REFCOUNTING. +// +// Gets you a free RefCounted impl implemented via FFI. +macro_rules! impl_threadsafe_refcount { + ($t:ty, $addref:ident, $release:ident) => ( + impl_refcount!($t, $addref, $release); unsafe impl ThreadSafeRefCounted for $t {} ); }