mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Handle properly potentially-disabled longhands in a shorthand.
This commit is contained in:
parent
15b0a32035
commit
3fd5f796f0
2 changed files with 24 additions and 1 deletions
|
@ -229,6 +229,11 @@ class Longhand(object):
|
|||
def enabled_in_content(self):
|
||||
return self.enabled_in == "content"
|
||||
|
||||
def may_be_disabled_in(self, shorthand, product):
|
||||
if product == "gecko":
|
||||
return self.gecko_pref and self.gecko_pref != shorthand.gecko_pref
|
||||
return self.servo_pref and self.servo_pref != shorthand.servo_pref
|
||||
|
||||
def base_type(self):
|
||||
if self.predefined_type and not self.is_vector:
|
||||
return "::values::specified::{}".format(self.predefined_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue