mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Add machinery to handle properties enabled in chrome.
This commit is contained in:
parent
128bb02e1d
commit
bbfb7a47eb
2 changed files with 69 additions and 27 deletions
|
@ -210,6 +210,13 @@ class Longhand(object):
|
|||
return bool(self.gecko_pref)
|
||||
return bool(self.servo_pref)
|
||||
|
||||
# FIXME(emilio): Shorthand and Longhand should really share a base class.
|
||||
def explicitly_enabled_in_ua_sheets(self):
|
||||
return self.internal
|
||||
|
||||
# TODO(emilio): Change the `internal` field to something like `enabled_in`.
|
||||
def explicitly_enabled_in_chrome(self):
|
||||
return False
|
||||
|
||||
|
||||
class Shorthand(object):
|
||||
|
@ -264,6 +271,12 @@ class Shorthand(object):
|
|||
return bool(self.gecko_pref)
|
||||
return bool(self.servo_pref)
|
||||
|
||||
def explicitly_enabled_in_ua_sheets(self):
|
||||
return self.internal
|
||||
|
||||
def explicitly_enabled_in_chrome(self):
|
||||
return False
|
||||
|
||||
|
||||
class Alias(object):
|
||||
def __init__(self, name, original):
|
||||
|
@ -276,6 +289,17 @@ class Alias(object):
|
|||
self.allowed_in_page_rule = original.allowed_in_page_rule
|
||||
self.allowed_in_keyframe_block = original.allowed_in_keyframe_block
|
||||
|
||||
def experimental(self, product):
|
||||
if product == "gecko":
|
||||
return bool(self.gecko_pref)
|
||||
return bool(self.servo_pref)
|
||||
|
||||
def explicitly_enabled_in_ua_sheets(self):
|
||||
return self.internal
|
||||
|
||||
def explicitly_enabled_in_chrome(self):
|
||||
return False
|
||||
|
||||
|
||||
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