From dea08f4ca083dce50d7554d4c8a659f72c1673c0 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Thu, 14 Apr 2016 20:39:50 -0700 Subject: [PATCH] Make longhand take kwargs. --- components/style/properties.mako.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 81c429bb0be..ec19cc9d15d 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -310,21 +310,16 @@ pub mod longhands { } - <%def name="longhand(name, derived_from=None, keyword=None, products='gecko,servo', - custom_cascade=False, experimental=False, internal=False, - gecko_ffi_name=None)"> - <%self:raw_longhand name="${name}" derived_from="${derived_from}" keyword="${keyword}" - products="${products}" custom_cascade="${custom_cascade}" - experimental="${experimental}" internal="${internal}" - gecko_ffi_name="${gecko_ffi_name}"> + <%def name="longhand(name, **kwargs)"> + <%call expr="raw_longhand(name, **kwargs)"> ${caller.body()} - % if not derived_from: + % if not LONGHANDS_BY_NAME[name].derived_from: pub fn parse_specified(context: &ParserContext, input: &mut Parser) -> Result, ()> { parse(context, input).map(DeclaredValue::Value) } % endif - + <%def name="single_keyword_computed(name, values, products='gecko,servo',