style: Add a generic way to deal with lists of values, ditch all uses of as_servo in style/animations.rs

This commit is contained in:
Emilio Cobos Álvarez 2016-06-30 16:50:09 -07:00
parent 07da4e4ea2
commit ba53c4ea8d
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 120 additions and 53 deletions

View file

@ -47,7 +47,7 @@ class Keyword(object):
class Longhand(object):
def __init__(self, style_struct, name, animatable=None, derived_from=None, keyword=None,
predefined_type=None, custom_cascade=False, experimental=False, internal=False,
need_clone=False, gecko_ffi_name=None):
need_clone=False, need_index=False, gecko_ffi_name=None):
self.name = name
self.keyword = keyword
self.predefined_type = predefined_type
@ -58,6 +58,7 @@ class Longhand(object):
self.custom_cascade = custom_cascade
self.internal = internal
self.need_clone = need_clone
self.need_index = need_index
self.gecko_ffi_name = gecko_ffi_name or "m" + self.camel_case
self.derived_from = (derived_from or "").split()