Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/WebKit/Source/build/scripts/make_css_property_names.py

Issue 2822953002: Remove old wtf/ directory. (Closed)
Patch Set: Fixup *.typemap files. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 json5_generator 7 import json5_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/CoreExport.h" 17 #include "core/CoreExport.h"
18 #include "wtf/Assertions.h" 18 #include "platform/wtf/Assertions.h"
19 #include <stddef.h> 19 #include <stddef.h>
20 20
21 namespace WTF { 21 namespace WTF {
22 class AtomicString; 22 class AtomicString;
23 class String; 23 class String;
24 } 24 }
25 25
26 namespace blink { 26 namespace blink {
27 27
28 enum CSSPropertyID { 28 enum CSSPropertyID {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 """ 78 """
79 79
80 GPERF_TEMPLATE = """ 80 GPERF_TEMPLATE = """
81 %%{ 81 %%{
82 %(license)s 82 %(license)s
83 83
84 #include "%(class_name)s.h" 84 #include "%(class_name)s.h"
85 #include "core/css/HashTools.h" 85 #include "core/css/HashTools.h"
86 #include <string.h> 86 #include <string.h>
87 87
88 #include "wtf/ASCIICType.h" 88 #include "platform/wtf/ASCIICType.h"
89 #include "wtf/text/AtomicString.h" 89 #include "platform/wtf/text/AtomicString.h"
90 #include "wtf/text/WTFString.h" 90 #include "platform/wtf/text/WTFString.h"
91 91
92 #ifdef _MSC_VER 92 #ifdef _MSC_VER
93 // Disable the warnings from casting a 64-bit pointer to 32-bit long 93 // Disable the warnings from casting a 64-bit pointer to 32-bit long
94 // warning C4302: 'type cast': truncation from 'char (*)[28]' to 'long' 94 // warning C4302: 'type cast': truncation from 'char (*)[28]' to 'long'
95 // warning C4311: 'type cast': pointer truncation from 'char (*)[18]' to 'long' 95 // warning C4311: 'type cast': pointer truncation from 'char (*)[18]' to 'long'
96 #pragma warning(disable : 4302 4311) 96 #pragma warning(disable : 4302 4311)
97 #endif 97 #endif
98 98
99 #if defined(__clang__) 99 #if defined(__clang__)
100 #pragma clang diagnostic push 100 #pragma clang diagnostic push
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 # CalledProcessError like subprocess would do when shell=True is set. 248 # CalledProcessError like subprocess would do when shell=True is set.
249 try: 249 try:
250 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=s ubprocess.PIPE, universal_newlines=True) 250 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=s ubprocess.PIPE, universal_newlines=True)
251 return gperf.communicate(gperf_input)[0] 251 return gperf.communicate(gperf_input)[0]
252 except OSError: 252 except OSError:
253 raise subprocess.CalledProcessError(127, gperf_args, output='Command not found.') 253 raise subprocess.CalledProcessError(127, gperf_args, output='Command not found.')
254 254
255 255
256 if __name__ == "__main__": 256 if __name__ == "__main__":
257 json5_generator.Maker(CSSPropertyNamesWriter).main() 257 json5_generator.Maker(CSSPropertyNamesWriter).main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698