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

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

Issue 2380933002: Update generated CSSOM type checking to allow checking just the type (Closed)
Patch Set: Unparent branch Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
index e4fa5eefffd7870098bfef373f9c334c8a884b5c..d604cd813b5e75c314e445b0f48fc7f865bca0fb 100644
--- a/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
+++ b/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
@@ -8,6 +8,7 @@
#include "core/css/cssom/CSSOMKeywords.h"
#include "core/css/cssom/CSSKeywordValue.h"
#include "core/css/cssom/CSSLengthValue.h"
+#include "core/css/cssom/CSSStyleValue.h"
namespace blink {
@@ -26,12 +27,18 @@ bool CSSOMTypes::propertyCanTake(CSSPropertyID id, const CSSStyleValue& styleVal
return true;
}
+ return CSSOMTypes::propertyCanTakeType(id, styleValue.type());
+}
+
+bool CSSOMTypes::propertyCanTakeType(CSSPropertyID id, CSSStyleValue::StyleValueType type)
+{
+
switch (id) {
{% for property_id, property in properties.items() if property.typedom_types %}
case {{property_id}}:
return (
{% for type in property.typedom_types %}
- {{ "|| " if not loop.first }}styleValue.type() == CSSStyleValue::{{type}}Type
+ {{ "|| " if not loop.first }}type == CSSStyleValue::{{type}}Type
{% endfor %}
);
{% endfor %}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/CSSOMTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698