stylo: Add helpers for converting Gecko keywords to Servo, use to support keyword pres attrs

This commit is contained in:
Manish Goregaokar 2017-02-12 16:02:29 -08:00 committed by Manish Goregaokar
parent afccbf4a8c
commit b85e1f5f0c
10 changed files with 145 additions and 21 deletions

View file

@ -67,7 +67,7 @@ class Keyword(object):
raise Exception("Bad product: " + product)
def gecko_constant(self, value):
moz_stripped = value.replace("-moz-", '') if self.gecko_strip_moz_prefix else value
moz_stripped = value.replace("-moz-", '') if self.gecko_strip_moz_prefix else value.replace("-moz-", 'moz-')
mapped = self.consts_map.get(value)
if self.gecko_enum_prefix:
parts = moz_stripped.split('-')