DescriptionApply whitelist file to structure elements.
Resources specified with structure elements were being included in
.pak and .h files even if they were not included in a specified
whitelist file.
The .pak file issue is fixed in build.py by including structure nodes
in the collection of node types that are checked against the whitelist.
This seems to be an oversight as the code has a comment like "Apply
the same trick that data_pack.py uses" but the corresponding code in
data_pack.py was updated to include structure noded in [1]. This method
that contained this code is no longer in data_pack.py.
The .h file issue is fixed in rc_header.py by treating structure nodes
in the same manner as message nodes (i.e. only output them if they're
active). The correct fix seems to be to set output_all_resource_defines
to true in all the .grd files, but until then a structure element should
not generate an entry in a header file if it's not in the whitelist.
https://chromiumcodereview.appspot.com/10386189/diff/29002/grit/format/data_pack.py
BUG=None
R=joaodasilva@chromium.org, newt@chromium.org
Committed: https://code.google.com/p/grit-i18n/source/detail?r=179
Patch Set 1 #Patch Set 2 : add unit test, remove rc_header change #Patch Set 3 : remove last bits of diff in rc_header #Patch Set 4 : remove debug print statement #
Total comments: 2
Patch Set 5 : fix indent #
Messages
Total messages: 23 (2 generated)
|