mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 1620035 - Convert GenerateComputedDOMStyleGenerated.py and GenerateCSSPropsGenerated.py to py3; r=firefox-build-system-reviewers,rstewart
Depends on D65379 Differential Revision: https://phabricator.services.mozilla.com/D65380 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1c8f1349ca
commit
05e6591e3b
@ -49,7 +49,7 @@ def generate(output, dataFile):
|
||||
output.write("};\n\n")
|
||||
|
||||
# Generate kIDLNameSortPositionTable
|
||||
ps = sorted(properties, key=lambda p: p.idlname)
|
||||
ps = sorted(properties, key=lambda p: p.idlname if p.idlname else '')
|
||||
ps = [(p, position) for position, p in enumerate(ps)]
|
||||
ps.sort(key=lambda item: item[0].index)
|
||||
output.write("const int32_t nsCSSProps::"
|
||||
|
@ -54,10 +54,9 @@ static constexpr Entry kEntries[] = {
|
||||
|
||||
properties = runpy.run_path(dataFile)["data"]
|
||||
properties = filter(exposed_on_getcs, properties)
|
||||
properties.sort(key=order_key)
|
||||
|
||||
TEMPLATE = " {{ eCSSProperty_{}, &nsComputedDOMStyle::{} }},\n"
|
||||
for p in properties:
|
||||
for p in sorted(properties, key=order_key):
|
||||
output.write(TEMPLATE.format(p.id, getter_entry(p)))
|
||||
|
||||
output.write("};\n")
|
||||
|
@ -290,12 +290,10 @@ if CONFIG['COMPILE_ENVIRONMENT']:
|
||||
])
|
||||
GeneratedFile('nsComputedDOMStyleGenerated.inc',
|
||||
script='GenerateComputedDOMStyleGenerated.py',
|
||||
py2=True,
|
||||
entry_point='generate',
|
||||
inputs=['!ServoCSSPropList.py'])
|
||||
GeneratedFile('nsCSSPropsGenerated.inc',
|
||||
script='GenerateCSSPropsGenerated.py',
|
||||
py2=True,
|
||||
entry_point='generate',
|
||||
inputs=['!ServoCSSPropList.py'])
|
||||
GeneratedFile('ServoStyleConsts.h', script='/build/RunCbindgen.py',
|
||||
|
Loading…
x
Reference in New Issue
Block a user