mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Part 1 - Ignore any properties which aren't valid for a style rule when generating CSS2Properties and testing propertie
To know the valid rules for each property, we need to put this information into the Servo prop list and add an appropriate getter to Longhand/Shorthand. Differential Revision: https://phabricator.services.mozilla.com/D105825
This commit is contained in:
parent
cbf2a91ec8
commit
cdce0d3b34
1 changed files with 10 additions and 0 deletions
|
@ -261,6 +261,11 @@ class Property(object):
|
|||
self.extra_prefixes = parse_property_aliases(extra_prefixes)
|
||||
self.flags = flags.split() if flags else []
|
||||
|
||||
def rule_types_allowed_names(self):
|
||||
for name in RULE_VALUES:
|
||||
if self.rule_types_allowed & RULE_VALUES[name] != 0:
|
||||
yield name
|
||||
|
||||
def experimental(self, engine):
|
||||
if engine == "gecko":
|
||||
return bool(self.gecko_pref)
|
||||
|
@ -598,6 +603,11 @@ class Alias(object):
|
|||
def type():
|
||||
return "alias"
|
||||
|
||||
def rule_types_allowed_names(self):
|
||||
for name in RULE_VALUES:
|
||||
if self.rule_types_allowed & RULE_VALUES[name] != 0:
|
||||
yield name
|
||||
|
||||
def experimental(self, engine):
|
||||
if engine == "gecko":
|
||||
return bool(self.gecko_pref)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue