mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Introduce PropertyDeclaration::to_physical.
Bug: 1309752 Reviewed-by: heycam MozReview-Commit-ID: FAL04K5G948
This commit is contained in:
parent
89880727ec
commit
be9acba801
2 changed files with 79 additions and 2 deletions
|
@ -237,6 +237,21 @@ class Longhand(object):
|
|||
def type():
|
||||
return "longhand"
|
||||
|
||||
# For a given logical property return all the physical
|
||||
# property names corresponding to it.
|
||||
def all_physical_mapped_properties(self):
|
||||
assert self.logical
|
||||
logical_side = None
|
||||
for s in LOGICAL_SIDES + LOGICAL_SIZES:
|
||||
if s in self.name:
|
||||
assert not logical_side
|
||||
logical_side = s
|
||||
assert logical_side
|
||||
physical = PHYSICAL_SIDES if logical_side in LOGICAL_SIDES else PHYSICAL_SIZES
|
||||
return [self.name.replace(logical_side, physical_side).replace("inset-", "") \
|
||||
for physical_side in physical]
|
||||
|
||||
|
||||
def experimental(self, product):
|
||||
if product == "gecko":
|
||||
return bool(self.gecko_pref)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue