From f58ff4a4f74c3f0348e2a7d705914184ee61ea60 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Thu, 14 Apr 2016 20:24:56 -0700 Subject: [PATCH] Make raw_longhand take kwargs. --- components/style/properties.mako.rs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 94071314a0c..81c429bb0be 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -176,19 +176,14 @@ pub mod longhands { use parser::ParserContext; use values::specified; - <%def name="raw_longhand(name, keyword=None, derived_from=None, products='gecko,servo', - custom_cascade=False, experimental=False, internal=False, - gecko_ffi_name=None)"> + <%def name="raw_longhand(name, **kwargs)"> <% - if not CONFIG['product'] in products: + products = kwargs.pop("products", "gecko,servo") + if not CONFIG["product"] in products: return "" - property = Longhand(name, - derived_from=derived_from, - keyword=keyword, - custom_cascade=custom_cascade, - experimental=experimental, - internal=internal, - gecko_ffi_name=gecko_ffi_name) + + property = Longhand(name, **kwargs) + property.style_struct = THIS_STYLE_STRUCT THIS_STYLE_STRUCT.longhands.append(property) LONGHANDS.append(property) @@ -268,7 +263,7 @@ pub mod longhands { ); } - % if custom_cascade: + % if property.custom_cascade: cascade_property_custom(declaration, inherited_style, context,