mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Allow shorthands to be restricted to specific products.
This commit is contained in:
parent
a12493f5fe
commit
2b8f809852
2 changed files with 10 additions and 3 deletions
|
@ -145,7 +145,11 @@ class PropertiesData(object):
|
|||
|
||||
return longand
|
||||
|
||||
def declare_shorthand(self, name, sub_properties, *args, **kwargs):
|
||||
def declare_shorthand(self, name, sub_properties, products="gecko servo", *args, **kwargs):
|
||||
products = products.split()
|
||||
if self.product not in products:
|
||||
return
|
||||
|
||||
sub_properties = [self.longhands_by_name[s] for s in sub_properties]
|
||||
shorthand = Shorthand(name, sub_properties, *args, **kwargs)
|
||||
self.shorthands.append(shorthand)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue