| OLD | NEW |
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {{license()}} | 2 {{license()}} |
| 3 | 3 |
| 4 #include "core/css/CSSPropertyMetadata.h" | 4 #include "core/css/CSSPropertyMetadata.h" |
| 5 | 5 |
| 6 #include "platform/RuntimeEnabledFeatures.h" | 6 #include "platform/RuntimeEnabledFeatures.h" |
| 7 #include "wtf/BitArray.h" | 7 #include "wtf/BitArray.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 {% for flag, function_name in switches %} | 10 {% for flag, function_name in switches %} |
| 11 | 11 |
| 12 bool CSSPropertyMetadata::{{function_name}}(CSSPropertyID property) | 12 bool CSSPropertyMetadata::{{function_name}}(CSSPropertyID property) |
| 13 { | 13 { |
| 14 switch(property) { | 14 switch(property) { |
| 15 case CSSPropertyInvalid: | 15 case CSSPropertyInvalid: |
| 16 ASSERT_NOT_REACHED(); | 16 ASSERT_NOT_REACHED(); |
| 17 return false; | 17 return false; |
| 18 {% for property_id, property in properties.items() if property[flag] %} | 18 {% for property_id, property in properties.items() if property[flag] %} |
| 19 case {{property_id}}: | 19 case {{property_id}}: |
| 20 {% endfor %} | 20 {% endfor %} |
| 21 {% if function_name == "isInheritedProperty" %} |
| 22 case CSSPropertyVariable: |
| 23 {% endif %} |
| 21 return true; | 24 return true; |
| 22 default: | 25 default: |
| 23 return false; | 26 return false; |
| 24 } | 27 } |
| 25 } | 28 } |
| 26 {% endfor %} | 29 {% endfor %} |
| 27 | 30 |
| 28 // There is one more valid property ID than the total count of CSS properties | 31 // There is one more valid property ID than the total count of CSS properties |
| 29 // because of custom properties. | 32 // because of custom properties. |
| 30 static const int numValidPropertyIDs = numCSSProperties + 1; | 33 static const int numValidPropertyIDs = numCSSProperties + 1; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 52 void CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector(const CSSProperty
ID* properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) | 55 void CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector(const CSSProperty
ID* properties, size_t propertyCount, Vector<CSSPropertyID>& outVector) |
| 53 { | 56 { |
| 54 for (unsigned i = 0; i < propertyCount; i++) { | 57 for (unsigned i = 0; i < propertyCount; i++) { |
| 55 CSSPropertyID property = properties[i]; | 58 CSSPropertyID property = properties[i]; |
| 56 if (isEnabledProperty(property)) | 59 if (isEnabledProperty(property)) |
| 57 outVector.append(property); | 60 outVector.append(property); |
| 58 } | 61 } |
| 59 } | 62 } |
| 60 | 63 |
| 61 } // namespace blink | 64 } // namespace blink |
| OLD | NEW |