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

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

Issue 2611823003: ABANDONED CL: Changes to compile and pass tests after Big Blink Rename (excluding functions). (Closed)
Patch Set: Inducing merge conflicts to force human review and changes after rename. Created 3 years, 11 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 in_generator 7 import in_generator
8 import license 8 import license
9 9
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 %%struct-type 108 %%struct-type
109 struct Property; 109 struct Property;
110 %%omit-struct-type 110 %%omit-struct-type
111 %%language=C++ 111 %%language=C++
112 %%readonly-tables 112 %%readonly-tables
113 %%global-table 113 %%global-table
114 %%compare-strncmp 114 %%compare-strncmp
115 %%define class-name %(class_name)sHash 115 %%define class-name %(class_name)sHash
116 %%define lookup-function-name findPropertyImpl 116 %%define lookup-function-name findPropertyImpl
117 %%define hash-function-name property_hash_function 117 %%define hash-function-name property_hash_function
118 %%define slot-name nameOffset 118 %%define slot-name name_offset
119 %%define word-array-name property_word_list 119 %%define word-array-name property_word_list
120 %%enum 120 %%enum
121 %%%% 121 %%%%
122 %(property_to_enum_map)s 122 %(property_to_enum_map)s
123 %%%% 123 %%%%
124 const Property* findProperty(register const char* str, register unsigned int len ) 124 const Property* findProperty(register const char* str, register unsigned int len )
125 { 125 {
126 return %(class_name)sHash::findPropertyImpl(str, len); 126 return %(class_name)sHash::findPropertyImpl(str, len);
127 } 127 }
128 128
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output 229 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output
230 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] 230 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
231 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. 231 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
232 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. 232 gperf_args.append('-D') # Allow duplicate hashes -> More compact code.
233 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True) 233 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True)
234 return gperf.communicate(gperf_input)[0] 234 return gperf.communicate(gperf_input)[0]
235 235
236 236
237 if __name__ == "__main__": 237 if __name__ == "__main__":
238 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) 238 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698