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

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

Issue 2722503002: [CSS Typed OM] Specify and check separators for repeated properties (Closed)
Patch Set: Add "/" as a valid separator in CSSProperties.json5 Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl
index cc7ea7882e818228d17b6c5809f0dc1957f295c4..c20c9789c9363ea9ada5e92929e1fc3d2da7c07d 100644
--- a/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/CSSPropertyMetadata.cpp.tmpl
@@ -10,9 +10,9 @@ namespace blink {
{% for flag, function_name in switches %}
bool CSSPropertyMetadata::{{function_name}}(CSSPropertyID property) {
- switch(property) {
+ switch (property) {
case CSSPropertyInvalid:
- ASSERT_NOT_REACHED();
+ NOTREACHED();
return false;
{% for property_id, property in properties.items() if property[flag] %}
case {{property_id}}:
@@ -27,6 +27,18 @@ bool CSSPropertyMetadata::{{function_name}}(CSSPropertyID property) {
}
{% endfor %}
+char CSSPropertyMetadata::repetitionSeparator(CSSPropertyID property) {
+ switch (property) {
+ {% for property_id, property in properties.items() if property.separator %}
+ case {{property_id}}:
+ return '{{property.separator}}';
+ {% endfor %}
+ default:
+ NOTREACHED();
+ return 0;
+ }
+}
+
bool CSSPropertyMetadata::isEnabledProperty(CSSPropertyID unresolvedProperty) {
CSSPropertyID property = resolveCSSPropertyID(unresolvedProperty);
static std::bitset<numCSSProperties>* enabledProperties = nullptr;

Powered by Google App Engine
This is Rietveld 408576698