OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 import subprocess | 3 import subprocess |
4 import sys | 4 import sys |
5 | 5 |
6 import css_properties | 6 import css_properties |
7 import in_generator | 7 import in_generator |
8 import license | 8 import license |
9 | 9 |
10 | 10 |
11 HEADER_TEMPLATE = """ | 11 HEADER_TEMPLATE = """ |
12 %(license)s | 12 %(license)s |
13 | 13 |
14 #ifndef %(class_name)s_h | 14 #ifndef %(class_name)s_h |
15 #define %(class_name)s_h | 15 #define %(class_name)s_h |
16 | 16 |
17 #include "core/css/CSSParserMode.h" | 17 #include "core/css/parser/CSSParserMode.h" |
18 #include "wtf/HashFunctions.h" | 18 #include "wtf/HashFunctions.h" |
19 #include "wtf/HashTraits.h" | 19 #include "wtf/HashTraits.h" |
20 #include <string.h> | 20 #include <string.h> |
21 | 21 |
22 namespace WTF { | 22 namespace WTF { |
23 class AtomicString; | 23 class AtomicString; |
24 class String; | 24 class String; |
25 } | 25 } |
26 | 26 |
27 namespace blink { | 27 namespace blink { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 # FIXME: If we could depend on Python 2.7, we would use subprocess.check
_output | 221 # FIXME: If we could depend on Python 2.7, we would use subprocess.check
_output |
222 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] | 222 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] |
223 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. | 223 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. |
224 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. | 224 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. |
225 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr
ocess.PIPE, universal_newlines=True) | 225 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr
ocess.PIPE, universal_newlines=True) |
226 return gperf.communicate(gperf_input)[0] | 226 return gperf.communicate(gperf_input)[0] |
227 | 227 |
228 | 228 |
229 if __name__ == "__main__": | 229 if __name__ == "__main__": |
230 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) | 230 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) |
OLD | NEW |