Index: third_party/WebKit/Source/build/scripts/make_css_property_names.py |
diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_names.py b/third_party/WebKit/Source/build/scripts/make_css_property_names.py |
index b3e05b07a39d058c7fff93bb6dfacb065522f3c4..d754ab12b9144e2b0d0ba6fdbaa2237c72126ed4 100755 |
--- a/third_party/WebKit/Source/build/scripts/make_css_property_names.py |
+++ b/third_party/WebKit/Source/build/scripts/make_css_property_names.py |
@@ -94,12 +94,6 @@ |
// warning C4302: 'type cast': truncation from 'char (*)[28]' to 'long' |
// warning C4311: 'type cast': pointer truncation from 'char (*)[18]' to 'long' |
#pragma warning(disable : 4302 4311) |
-#endif |
- |
-#if defined(__clang__) |
-#pragma clang diagnostic push |
-// TODO(thakis): Remove once we use a gperf that no longer produces "register". |
-#pragma clang diagnostic ignored "-Wdeprecated-register" |
#endif |
namespace blink { |
@@ -128,59 +122,55 @@ |
%%%% |
%(property_to_enum_map)s |
%%%% |
- |
-#if defined(__clang__) |
-#pragma clang diagnostic pop |
-#endif |
- |
-const Property* findProperty(const char* str, unsigned int len) { |
- return %(class_name)sHash::findPropertyImpl(str, len); |
-} |
- |
-const char* getPropertyName(CSSPropertyID id) { |
- DCHECK(isCSSPropertyIDWithName(id)); |
- int index = id - firstCSSProperty; |
- return propertyNameStringsPool + propertyNameStringsOffsets[index]; |
-} |
- |
-const AtomicString& getPropertyNameAtomicString(CSSPropertyID id) { |
- DCHECK(isCSSPropertyIDWithName(id)); |
- int index = id - firstCSSProperty; |
- static AtomicString* propertyStrings = |
- new AtomicString[lastUnresolvedCSSProperty]; // Leaked. |
- AtomicString& propertyString = propertyStrings[index]; |
- if (propertyString.isNull()) { |
- propertyString = AtomicString(propertyNameStringsPool + |
- propertyNameStringsOffsets[index]); |
- } |
- return propertyString; |
-} |
- |
-String getPropertyNameString(CSSPropertyID id) { |
- // We share the StringImpl with the AtomicStrings. |
- return getPropertyNameAtomicString(id).getString(); |
-} |
- |
-String getJSPropertyName(CSSPropertyID id) { |
- char result[maxCSSPropertyNameLength + 1]; |
- const char* cssPropertyName = getPropertyName(id); |
- const char* propertyNamePointer = cssPropertyName; |
- if (!propertyNamePointer) |
- return emptyString; |
- |
- char* resultPointer = result; |
- while (char character = *propertyNamePointer++) { |
- if (character == '-') { |
- char nextCharacter = *propertyNamePointer++; |
- if (!nextCharacter) |
- break; |
- character = (propertyNamePointer - 2 != cssPropertyName) |
- ? toASCIIUpper(nextCharacter) : nextCharacter; |
+const Property* findProperty(register const char* str, register unsigned int len) |
+{ |
+ return %(class_name)sHash::findPropertyImpl(str, len); |
+} |
+ |
+const char* getPropertyName(CSSPropertyID id) |
+{ |
+ DCHECK(isCSSPropertyIDWithName(id)); |
+ int index = id - firstCSSProperty; |
+ return propertyNameStringsPool + propertyNameStringsOffsets[index]; |
+} |
+ |
+const AtomicString& getPropertyNameAtomicString(CSSPropertyID id) |
+{ |
+ DCHECK(isCSSPropertyIDWithName(id)); |
+ int index = id - firstCSSProperty; |
+ static AtomicString* propertyStrings = new AtomicString[lastUnresolvedCSSProperty]; // Intentionally never destroyed. |
+ AtomicString& propertyString = propertyStrings[index]; |
+ if (propertyString.isNull()) |
+ propertyString = AtomicString(propertyNameStringsPool + propertyNameStringsOffsets[index]); |
+ return propertyString; |
+} |
+ |
+String getPropertyNameString(CSSPropertyID id) |
+{ |
+ // We share the StringImpl with the AtomicStrings. |
+ return getPropertyNameAtomicString(id).getString(); |
+} |
+ |
+String getJSPropertyName(CSSPropertyID id) |
+{ |
+ char result[maxCSSPropertyNameLength + 1]; |
+ const char* cssPropertyName = getPropertyName(id); |
+ const char* propertyNamePointer = cssPropertyName; |
+ if (!propertyNamePointer) |
+ return emptyString; |
+ |
+ char* resultPointer = result; |
+ while (char character = *propertyNamePointer++) { |
+ if (character == '-') { |
+ char nextCharacter = *propertyNamePointer++; |
+ if (!nextCharacter) |
+ break; |
+ character = (propertyNamePointer - 2 != cssPropertyName) ? toASCIIUpper(nextCharacter) : nextCharacter; |
+ } |
+ *resultPointer++ = character; |
} |
- *resultPointer++ = character; |
- } |
- *resultPointer = '\\0'; |
- return String(result); |
+ *resultPointer = '\\0'; |
+ return String(result); |
} |
CSSPropertyID cssPropertyID(const String& string) |