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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl

Issue 1581223003: Ensure that custom property declarations are treated as inherited (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/variables/recompute-variables-when-parent-style-updates.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/css/variables/recompute-variables-when-parent-style-updates.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698