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

Side by Side Diff: Source/build/scripts/make_css_value_keywords.py

Issue 51073002: Move HashTools.h to core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « Source/build/scripts/make_css_property_names.py ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import in_generator 9 import in_generator
10 import license 10 import license
(...skipping 24 matching lines...) Expand all
35 35
36 #endif // %(class_name)s_h 36 #endif // %(class_name)s_h
37 """ 37 """
38 38
39 GPERF_TEMPLATE = """ 39 GPERF_TEMPLATE = """
40 %%{ 40 %%{
41 %(license)s 41 %(license)s
42 42
43 #include "config.h" 43 #include "config.h"
44 #include "%(class_name)s.h" 44 #include "%(class_name)s.h"
45 #include "core/platform/HashTools.h" 45 #include "core/css/HashTools.h"
46 #include <string.h> 46 #include <string.h>
47 47
48 namespace WebCore { 48 namespace WebCore {
49 static const char valueListStringPool[] = { 49 static const char valueListStringPool[] = {
50 "\\0" 50 "\\0"
51 %(value_keyword_strings)s 51 %(value_keyword_strings)s
52 }; 52 };
53 53
54 static const unsigned short valueListStringOffsets[] = { 54 static const unsigned short valueListStringOffsets[] = {
55 %(value_keyword_offsets)s 55 %(value_keyword_offsets)s
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 'quirks_mode_or_ua_sheet_mode_values_keywords': '\n '.join(map(se lf._case_value_keyword, self._value_keywords_with_mode('QuirksOrUASheet'))), 170 'quirks_mode_or_ua_sheet_mode_values_keywords': '\n '.join(map(se lf._case_value_keyword, self._value_keywords_with_mode('QuirksOrUASheet'))),
171 } 171 }
172 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output 172 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output
173 gperf_args = ['gperf', '--key-positions=*', '-D', '-n', '-s', '2'] 173 gperf_args = ['gperf', '--key-positions=*', '-D', '-n', '-s', '2']
174 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE) 174 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE)
175 return gperf.communicate(gperf_input)[0] 175 return gperf.communicate(gperf_input)[0]
176 176
177 177
178 if __name__ == "__main__": 178 if __name__ == "__main__":
179 in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv) 179 in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « Source/build/scripts/make_css_property_names.py ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698