mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Generate property list from Servo data.
Bug: 1452542 Reviewed-by: emilio,froydnj MozReview-Commit-ID: CwK2oL88r6F
This commit is contained in:
parent
2cd06807fa
commit
78f9672b6c
2 changed files with 8 additions and 1 deletions
|
@ -21,7 +21,7 @@ RE_PYTHON_ADDR = re.compile(r'<.+? object at 0x[0-9a-fA-F]+>')
|
|||
|
||||
|
||||
def main():
|
||||
usage = "Usage: %s [ servo | gecko ] [ style-crate | html ]" % sys.argv[0]
|
||||
usage = "Usage: %s [ servo | gecko ] [ style-crate | geckolib <template> | html ]" % sys.argv[0]
|
||||
if len(sys.argv) < 3:
|
||||
abort(usage)
|
||||
product = sys.argv[1]
|
||||
|
@ -39,6 +39,12 @@ def main():
|
|||
template = os.path.join(BASE, "gecko.mako.rs")
|
||||
rust = render(template, data=properties)
|
||||
write(os.environ["OUT_DIR"], "gecko_properties.rs", rust)
|
||||
elif output == "geckolib":
|
||||
if len(sys.argv) < 4:
|
||||
abort(usage)
|
||||
template = sys.argv[3]
|
||||
header = render(template, data=properties)
|
||||
sys.stdout.write(header)
|
||||
elif output == "html":
|
||||
write_html(properties)
|
||||
|
||||
|
|
|
@ -385,6 +385,7 @@ class Alias(object):
|
|||
self.name = name
|
||||
self.ident = to_rust_ident(name)
|
||||
self.camel_case = to_camel_case(self.ident)
|
||||
self.original = original
|
||||
self.enabled_in = original.enabled_in
|
||||
self.servo_pref = original.servo_pref
|
||||
self.gecko_pref = gecko_pref
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue