mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add spec argument to property helpers
This commit is contained in:
parent
68ecb04847
commit
29c2db4457
3 changed files with 8 additions and 3 deletions
|
@ -84,12 +84,13 @@ def arg_to_bool(arg):
|
|||
|
||||
|
||||
class Longhand(object):
|
||||
def __init__(self, style_struct, name, animatable=None, derived_from=None, keyword=None,
|
||||
def __init__(self, style_struct, name, spec="NO SPEC", 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
|
||||
self.spec = spec
|
||||
self.keyword = keyword
|
||||
self.predefined_type = predefined_type
|
||||
self.ident = to_rust_ident(name)
|
||||
|
@ -130,9 +131,10 @@ class Longhand(object):
|
|||
|
||||
|
||||
class Shorthand(object):
|
||||
def __init__(self, name, sub_properties, experimental=False, internal=False,
|
||||
def __init__(self, name, sub_properties, spec="NO SPEC", experimental=False, internal=False,
|
||||
allowed_in_keyframe_block=True):
|
||||
self.name = name
|
||||
self.spec = spec
|
||||
self.ident = to_rust_ident(name)
|
||||
self.camel_case = to_camel_case(self.ident)
|
||||
self.derived_from = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue