| Index: third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| index be006405746097cec04a4057975aa5b50506ff3f..2799b61bf90393d62a96d2c2391a43f8370fd733 100644
|
| --- a/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| @@ -39,8 +39,11 @@ state.style()->{{property.setter}}
|
| {% macro convert_and_set_value(property) %}
|
| {% if property.converter %}
|
| {{set_value(property)}}(StyleBuilderConverter::{{property.converter}}(state, value));
|
| -{%- else %}
|
| +{# TODO(sashab): Remove this list from this file. #}
|
| +{% elif property.type_name in ['short', 'unsigned short', 'int', 'unsigned int', 'unsigned', 'float', 'LineClampValue'] %}
|
| {{set_value(property)}}(toCSSPrimitiveValue(value).convertTo<{{property.type_name}}>());
|
| +{%- else %}
|
| +{{set_value(property)}}(toCSSIdentifierValue(value).convertTo<{{property.type_name}}>());
|
| {%- endif %}
|
| {% endmacro %}
|
| {% macro set_is_inherited(property) %}
|
| @@ -153,7 +156,7 @@ namespace blink {
|
|
|
| {{declare_value_function(property_id)}}
|
| {
|
| - if (value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() == {{auto_identity}})
|
| + if (value.isIdentifierValue() && toCSSIdentifierValue(value).getValueID() == {{auto_identity}})
|
| state.style()->{{auto_setter}}();
|
| else
|
| {{convert_and_set_value(property)}}
|
| @@ -348,8 +351,8 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| state.style()->clear{{action}}Directives();
|
|
|
| if (!value.isValueList()) {
|
| - DCHECK(value.isPrimitiveValue());
|
| - DCHECK_EQ(toCSSPrimitiveValue(value).getValueID(), CSSValueNone);
|
| + DCHECK(value.isIdentifierValue());
|
| + DCHECK_EQ(toCSSIdentifierValue(value).getValueID(), CSSValueNone);
|
| return;
|
| }
|
|
|
| @@ -535,9 +538,9 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| if (localValue->isURIValue()) {
|
| paintType = SVG_PAINTTYPE_URI;
|
| url = toCSSURIValue(localValue)->value();
|
| - } else if (localValue->isPrimitiveValue() && toCSSPrimitiveValue(localValue)->getValueID() == CSSValueNone) {
|
| + } else if (localValue->isIdentifierValue() && toCSSIdentifierValue(localValue)->getValueID() == CSSValueNone) {
|
| paintType = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE;
|
| - } else if (localValue->isPrimitiveValue() && toCSSPrimitiveValue(localValue)->getValueID() == CSSValueCurrentcolor) {
|
| + } else if (localValue->isIdentifierValue() && toCSSIdentifierValue(localValue)->getValueID() == CSSValueCurrentcolor) {
|
| color = state.style()->color();
|
| paintType = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
|
| } else {
|
|
|