Skip to content

Commit

Permalink
Make spec links mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jan 3, 2017
1 parent 9a2945b commit ca6ada8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/style/properties/data.py
Expand Up @@ -84,12 +84,14 @@ def arg_to_bool(arg):


class Longhand(object):
def __init__(self, style_struct, name, spec="NO SPEC", animatable=None, derived_from=None, keyword=None,
def __init__(self, style_struct, name, spec=None, animatable=None, derived_from=None, keyword=None,
predefined_type=None, custom_cascade=False, experimental=False, internal=False,
need_clone=False, need_index=False, gecko_ffi_name=None, depend_on_viewport_size=False,
allowed_in_keyframe_block=True, complex_color=False, cast_type='u8',
has_uncacheable_values=False, logical=False):
self.name = name
if not spec:
raise TypeError("Spec should be specified for %s" % name)
self.spec = spec
self.keyword = keyword
self.predefined_type = predefined_type
Expand Down Expand Up @@ -131,9 +133,11 @@ def __init__(self, style_struct, name, spec="NO SPEC", animatable=None, derived_


class Shorthand(object):
def __init__(self, name, sub_properties, spec="NO SPEC", experimental=False, internal=False,
def __init__(self, name, sub_properties, spec=None, experimental=False, internal=False,
allowed_in_keyframe_block=True):
self.name = name
if not spec:
raise TypeError("Spec should be specified for %s" % name)
self.spec = spec
self.ident = to_rust_ident(name)
self.camel_case = to_camel_case(self.ident)
Expand Down

0 comments on commit ca6ada8

Please sign in to comment.