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

Side by Side Diff: third_party/WebKit/Source/build/scripts/make_css_value_keywords.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 os.path 3 import os.path
4 import re 4 import re
5 import subprocess 5 import subprocess
6 import sys 6 import sys
7 7
8 from in_file import InFile 8 from in_file import InFile
9 from name_utilities import enum_for_css_keyword 9 from name_utilities import enum_for_css_keyword
10 from name_utilities import upper_first_letter 10 from name_utilities import upper_first_letter
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 %%} 65 %%}
66 %%struct-type 66 %%struct-type
67 struct Value; 67 struct Value;
68 %%omit-struct-type 68 %%omit-struct-type
69 %%language=C++ 69 %%language=C++
70 %%readonly-tables 70 %%readonly-tables
71 %%compare-strncmp 71 %%compare-strncmp
72 %%define class-name %(class_name)sHash 72 %%define class-name %(class_name)sHash
73 %%define lookup-function-name findValueImpl 73 %%define lookup-function-name findValueImpl
74 %%define hash-function-name value_hash_function 74 %%define hash-function-name value_hash_function
75 %%define slot-name nameOffset 75 %%define slot-name name_offset
76 %%define word-array-name value_word_list 76 %%define word-array-name value_word_list
77 %%pic 77 %%pic
78 %%enum 78 %%enum
79 %%%% 79 %%%%
80 %(value_keyword_to_enum_map)s 80 %(value_keyword_to_enum_map)s
81 %%%% 81 %%%%
82 const Value* findValue(register const char* str, register unsigned int len) 82 const Value* findValue(register const char* str, register unsigned int len)
83 { 83 {
84 return CSSValueKeywordsHash::findValueImpl(str, len); 84 return CSSValueKeywordsHash::findValueImpl(str, len);
85 } 85 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output 168 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output
169 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] 169 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
170 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. 170 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
171 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. 171 gperf_args.append('-D') # Allow duplicate hashes -> More compact code.
172 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True) 172 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True)
173 return gperf.communicate(gperf_input)[0] 173 return gperf.communicate(gperf_input)[0]
174 174
175 175
176 if __name__ == "__main__": 176 if __name__ == "__main__":
177 in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv) 177 in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698