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

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

Issue 1835773002: Rename AtomicString::string() to AtomicString::getString(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Windows Created 4 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 in_generator 7 import in_generator
8 import license 8 import license
9 9
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (propertyString.isNull()) { 142 if (propertyString.isNull()) {
143 const char* propertyName = propertyNameStringsPool + propertyNameStrings Offsets[index]; 143 const char* propertyName = propertyNameStringsPool + propertyNameStrings Offsets[index];
144 propertyString = AtomicString(propertyName, strlen(propertyName), Atomic String::ConstructFromLiteral); 144 propertyString = AtomicString(propertyName, strlen(propertyName), Atomic String::ConstructFromLiteral);
145 } 145 }
146 return propertyString; 146 return propertyString;
147 } 147 }
148 148
149 String getPropertyNameString(CSSPropertyID id) 149 String getPropertyNameString(CSSPropertyID id)
150 { 150 {
151 // We share the StringImpl with the AtomicStrings. 151 // We share the StringImpl with the AtomicStrings.
152 return getPropertyNameAtomicString(id).string(); 152 return getPropertyNameAtomicString(id).getString();
153 } 153 }
154 154
155 String getJSPropertyName(CSSPropertyID id) 155 String getJSPropertyName(CSSPropertyID id)
156 { 156 {
157 char result[maxCSSPropertyNameLength + 1]; 157 char result[maxCSSPropertyNameLength + 1];
158 const char* cssPropertyName = getPropertyName(id); 158 const char* cssPropertyName = getPropertyName(id);
159 const char* propertyNamePointer = cssPropertyName; 159 const char* propertyNamePointer = cssPropertyName;
160 if (!propertyNamePointer) 160 if (!propertyNamePointer)
161 return emptyString(); 161 return emptyString();
162 162
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output 231 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output
232 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] 232 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
233 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. 233 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
234 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. 234 gperf_args.append('-D') # Allow duplicate hashes -> More compact code.
235 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True) 235 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True)
236 return gperf.communicate(gperf_input)[0] 236 return gperf.communicate(gperf_input)[0]
237 237
238 238
239 if __name__ == "__main__": 239 if __name__ == "__main__":
240 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) 240 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8StringResource.h ('k') | third_party/WebKit/Source/core/css/CSSSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698