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 %} |