Make the choice of layout runtime setting

Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Martin Robinson 2023-06-28 10:07:08 +02:00
parent f11c6045e3
commit d31cdb682f
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8
262 changed files with 1740 additions and 3700 deletions

View file

@ -50,7 +50,7 @@ STYLE_STRUCT_LIST = [
def main():
usage = (
"Usage: %s [ servo-2013 | servo-2020 | gecko ] [ style-crate | geckolib <template> | html ]"
"Usage: %s [ servo | gecko ] [ style-crate | geckolib <template> | html ]"
% sys.argv[0]
)
if len(sys.argv) < 3:
@ -58,7 +58,7 @@ def main():
engine = sys.argv[1]
output = sys.argv[2]
if engine not in ["servo-2013", "servo-2020", "gecko"] or output not in [
if engine not in ["servo", "gecko"] or output not in [
"style-crate",
"geckolib",
"html",
@ -102,14 +102,10 @@ def main():
rust = render(template, data=properties)
write(OUT_DIR, "gecko_properties.rs", rust)
if engine in ["servo-2013", "servo-2020"]:
if engine == "servo-2013":
pref_attr = "servo_2013_pref"
if engine == "servo-2020":
pref_attr = "servo_2020_pref"
if engine == "servo":
properties_dict = {
kind: {
p.name: {"pref": getattr(p, pref_attr)}
p.name: {"pref": getattr(p, "servo_pref")}
for prop in properties_list
if prop.enabled_in_content()
for p in [prop] + prop.aliases