Add gecko leagcy logical properties aliases

This commit is contained in:
Xidorn Quan 2017-01-10 20:21:41 +11:00
parent e494a0f0a7
commit 2f2044e4b7
4 changed files with 16 additions and 3 deletions

View file

@ -14,6 +14,14 @@ ALL_SIDES = [(side, False) for side in PHYSICAL_SIDES] + [(side, True) for side
ALL_SIZES = [(size, False) for size in PHYSICAL_SIZES] + [(size, True) for size in LOGICAL_SIZES]
def maybe_moz_logical_alias(product, side, prop):
if product == "gecko" and side[1]:
axis, dir = side[0].split("-")
if axis == "inline":
return prop % dir
return None
def to_rust_ident(name):
name = name.replace("-", "_")
if name in ["static", "super", "box", "move"]: # Rust keywords