| 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 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 }; | 60 }; |
| 61 } | 61 } |
| 62 | 62 |
| 63 #endif // %(class_name)s_h | 63 #endif // %(class_name)s_h |
| 64 """ | 64 """ |
| 65 | 65 |
| 66 GPERF_TEMPLATE = """ | 66 GPERF_TEMPLATE = """ |
| 67 %%{ | 67 %%{ |
| 68 %(license)s | 68 %(license)s |
| 69 | 69 |
| 70 #include "config.h" | |
| 71 #include "%(class_name)s.h" | 70 #include "%(class_name)s.h" |
| 72 #include "core/css/HashTools.h" | 71 #include "core/css/HashTools.h" |
| 73 #include <string.h> | 72 #include <string.h> |
| 74 | 73 |
| 75 #include "wtf/ASCIICType.h" | 74 #include "wtf/ASCIICType.h" |
| 76 #include "wtf/text/AtomicString.h" | 75 #include "wtf/text/AtomicString.h" |
| 77 #include "wtf/text/WTFString.h" | 76 #include "wtf/text/WTFString.h" |
| 78 | 77 |
| 79 namespace blink { | 78 namespace blink { |
| 80 static const char propertyNameStringsPool[] = { | 79 static const char propertyNameStringsPool[] = { |
| (...skipping 140 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 | 220 # 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'] | 221 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] |
| 223 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. | 222 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. |
| 224 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. | 223 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) | 224 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr
ocess.PIPE, universal_newlines=True) |
| 226 return gperf.communicate(gperf_input)[0] | 225 return gperf.communicate(gperf_input)[0] |
| 227 | 226 |
| 228 | 227 |
| 229 if __name__ == "__main__": | 228 if __name__ == "__main__": |
| 230 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) | 229 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) |
| OLD | NEW |