Chromium Code Reviews| Index: Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl |
| diff --git a/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl b/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl |
| index 584375a87001b3609309db10b202efd3c6e52e4a..307b791879fa5a7d700323515fc69f4b7e24e04b 100644 |
| --- a/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl |
| +++ b/Source/build/scripts/templates/StylePropertyShorthand.cpp.tmpl |
| @@ -29,15 +29,15 @@ |
| namespace WebCore { |
| {% for property_id, property in properties.items() %} |
| -const StylePropertyShorthand& {{property.camel_case_name}}Shorthand() |
| +const StylePropertyShorthand& {{property.lower_camel_name}}Shorthand() |
| { |
| - static const CSSPropertyID {{property.camel_case_name}}Properties[] = { |
| + static const CSSPropertyID {{property.lower_camel_name}}Properties[] = { |
| {% for longhand_id in property.camel_case_longhands %} |
| {{longhand_id}}, |
| {% endfor %} |
| }; |
| - DEFINE_STATIC_LOCAL(StylePropertyShorthand, {{property.camel_case_name}}Longhands, ({{property_id}}, {{property.camel_case_name}}Properties, WTF_ARRAY_LENGTH({{property.camel_case_name}}Properties))); |
| - return {{property.camel_case_name}}Longhands; |
| + DEFINE_STATIC_LOCAL(StylePropertyShorthand, {{property.lower_camel_name}}Longhands, ({{property_id}}, {{property.lower_camel_name}}Properties, WTF_ARRAY_LENGTH({{property.lower_camel_name}}Properties))); |
| + return {{property.lower_camel_name}}Longhands; |
| } |
| {% endfor %} |
| @@ -47,13 +47,13 @@ const StylePropertyShorthand& shorthandForProperty(CSSPropertyID propertyID) |
| DEFINE_STATIC_LOCAL(StylePropertyShorthand, emptyShorthand, ()); |
| switch (propertyID) { |
| {% for property_id, property in properties.items() %} |
| - {% if property.camel_case_name not in ["width", "height", "marker"] %} |
| + {% if property.lower_camel_name != "marker" %} |
|
Nils Barth (inactive)
2014/07/07 16:43:28
The |if| can be merged into the |for| statement, r
|
| case {{property_id}}: |
| - {% if property.runtime_conditional_getter %} |
| - if (!RuntimeEnabledFeatures::{{property.runtime_conditional_getter}}()) |
| + {% if property.runtime_enabled_shorthand %} |
| + if (!RuntimeEnabledFeatures::{{property.runtime_enabled_shorthand}}Enabled()) |
| return emptyShorthand; |
| {% endif %} |
| - return {{property.camel_case_name}}Shorthand(); |
| + return {{property.lower_camel_name}}Shorthand(); |
| {% endif %} |
| {% endfor %} |
| default: { |
| @@ -69,7 +69,7 @@ void getMatchingShorthandsForLonghand(CSSPropertyID propertyID, Vector<StyleProp |
| {% for longhand_id, shorthands in longhands_dictionary.items() %} |
| case {{longhand_id}}: { |
| {% for shorthand in shorthands %} |
| - result->uncheckedAppend({{shorthand.camel_case_name}}Shorthand()); |
| + result->uncheckedAppend({{shorthand.lower_camel_name}}Shorthand()); |
| {% endfor %} |
| break; |
| } |