mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Make nscssproperty a method of longhand/shorthand/alias class.
This commit is contained in:
parent
2aee174b6d
commit
1599357cff
4 changed files with 22 additions and 30 deletions
|
@ -299,6 +299,12 @@ class Longhand(object):
|
|||
return computed
|
||||
return "<{} as ToAnimatedValue>::AnimatedValue".format(computed)
|
||||
|
||||
def nscsspropertyid(self):
|
||||
ident = self.ident
|
||||
if ident == "float":
|
||||
ident = "float_"
|
||||
return "nsCSSPropertyID::eCSSProperty_%s" % ident
|
||||
|
||||
|
||||
class Shorthand(object):
|
||||
def __init__(self, name, sub_properties, spec=None, servo_pref=None, gecko_pref=None,
|
||||
|
@ -362,6 +368,9 @@ class Shorthand(object):
|
|||
def enabled_in_content(self):
|
||||
return self.enabled_in == "content"
|
||||
|
||||
def nscsspropertyid(self):
|
||||
return "nsCSSPropertyID::eCSSProperty_%s" % self.ident
|
||||
|
||||
|
||||
class Alias(object):
|
||||
def __init__(self, name, original):
|
||||
|
@ -388,6 +397,9 @@ class Alias(object):
|
|||
def enabled_in_content(self):
|
||||
return self.enabled_in == "content"
|
||||
|
||||
def nscsspropertyid(self):
|
||||
return "nsCSSPropertyID::eCSSPropertyAlias_%s" % self.camel_case
|
||||
|
||||
|
||||
class Method(object):
|
||||
def __init__(self, name, return_type=None, arg_types=None, is_mut=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue