Index: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
diff --git a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
index 87f4b581a09e63550590402feb1e681dbc117d29..47dd7dbf8625a9f1a8b0f96b9f8070f30d051a62 100644 |
--- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
+++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
@@ -312,11 +312,6 @@ namespace WebCore { |
{{ declare_value_function(property_id) }} |
{ |
- if (!value->isValueList()) |
- return; |
- |
- CSSValueList* list = toCSSValueList(value); |
- |
CounterDirectiveMap& map = state.style()->accessCounterDirectives(); |
typedef CounterDirectiveMap::iterator Iterator; |
@@ -324,6 +319,13 @@ namespace WebCore { |
for (Iterator it = map.begin(); it != end; ++it) |
it->value.clear{{action}}(); |
+ if (!value->isValueList()) { |
+ ASSERT(value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone); |
+ return; |
+ } |
+ |
+ CSSValueList* list = toCSSValueList(value); |
+ |
int length = list ? list->length() : 0; |
for (int i = 0; i < length; ++i) { |
CSSValue* currValue = list->itemWithoutBoundsCheck(i); |