| 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 29c660e30ba771b0d339df77d4e8c0e124cbd314..c751c937a56c4b28862002355611b5e651efd966 100644
|
| --- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| +++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
|
| @@ -23,7 +23,7 @@ void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolverState& stat
|
| void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolverState& state)
|
| {%- endmacro %}
|
| {% macro declare_value_function(property_id) %}
|
| -void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state, CSSValue* value)
|
| +void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state, CSSValue value)
|
| {%- endmacro %}
|
| {% macro set_value(property) %}
|
| {% if property.svg %}
|
| @@ -38,7 +38,7 @@ state.style()->{{property.setter}}
|
| {% if property.converter %}
|
| {{set_value(property)}}(StyleBuilderConverter::{{property.converter}}(state, value));
|
| {%- else %}
|
| -{{set_value(property)}}(static_cast<{{property.type_name}}>(*toCSSPrimitiveValue(value)));
|
| +{{set_value(property)}}(static_cast<{{property.type_name}}>(toCSSPrimitiveValue(value)));
|
| {%- endif %}
|
| {% endmacro %}
|
|
|
| @@ -103,8 +103,8 @@ namespace blink {
|
| {
|
| CSS{{animation}}Data& data = state.style()->access{{animation}}s();
|
| data.{{vector}}.clear();
|
| - for (auto& listValue : toCSSValueList(*value))
|
| - data.{{vector}}.append(CSSToStyleMap::mapAnimation{{attribute}}(listValue.get()));
|
| + for (auto& listValue : toCSSValueList(value))
|
| + data.{{vector}}.append(CSSToStyleMap::mapAnimation{{attribute}}(listValue));
|
| }
|
| {% endmacro %}
|
| {{apply_animation('CSSPropertyAnimationDelay', 'Delay', 'Animation')}}
|
| @@ -139,11 +139,11 @@ namespace blink {
|
|
|
| {{declare_value_function(property_id)}}
|
| {
|
| - if (!value->isPrimitiveValue())
|
| + if (!value.isPrimitiveValue())
|
| return;
|
|
|
| - CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
|
| - if (primitiveValue->getValueID() == {{auto_identity}})
|
| + CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
|
| + if (primitiveValue.getValueID() == {{auto_identity}})
|
| state.style()->{{auto_setter}}();
|
| else
|
| {{convert_and_set_value(property)}}
|
| @@ -339,22 +339,22 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| {
|
| state.style()->clear{{action}}Directives();
|
|
|
| - if (!value->isValueList()) {
|
| - ASSERT(value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone);
|
| + if (!value.isValueList()) {
|
| + ASSERT(value.isPrimitiveValue() && toCSSPrimitiveValue(value).getValueID() == CSSValueNone);
|
| return;
|
| }
|
|
|
| CounterDirectiveMap& map = state.style()->accessCounterDirectives();
|
|
|
| - CSSValueList* list = toCSSValueList(value);
|
| + CSSValueList& list = toCSSValueList(value);
|
|
|
| - int length = list ? list->length() : 0;
|
| + int length = list.length();
|
| for (int i = 0; i < length; ++i) {
|
| - CSSValue* currValue = list->item(i);
|
| - if (!currValue->isPrimitiveValue())
|
| + CSSValue currValue = list.item(i);
|
| + if (!currValue.isPrimitiveValue())
|
| continue;
|
|
|
| - Pair* pair = toCSSPrimitiveValue(currValue)->getPairValue();
|
| + Pair* pair = toCSSPrimitiveValue(currValue).getPairValue();
|
| if (!pair || !pair->first() || !pair->second())
|
| continue;
|
|
|
| @@ -411,13 +411,13 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| {
|
| FillLayer* currChild = &state.style()->{{access_layers}}();
|
| FillLayer* prevChild = 0;
|
| - if (value->isValueList() && !value->isImageSetValue()) {
|
| + if (value.isValueList() && !value.isImageSetValue()) {
|
| /* Walk each value and put it into a layer, creating new layers as needed. */
|
| - CSSValueList* valueList = toCSSValueList(value);
|
| - for (unsigned int i = 0; i < valueList->length(); i++) {
|
| + CSSValueList& valueList = toCSSValueList(value);
|
| + for (unsigned int i = 0; i < valueList.length(); i++) {
|
| if (!currChild)
|
| currChild = prevChild->ensureNext();
|
| - CSSToStyleMap::{{map_fill}}(state, currChild, valueList->item(i));
|
| + CSSToStyleMap::{{map_fill}}(state, currChild, valueList.item(i));
|
| prevChild = currChild;
|
| currChild = currChild->next();
|
| }
|
| @@ -513,35 +513,35 @@ static bool borderImageLengthMatchesAllSides(const BorderImageLengthBox& borderI
|
| {{declare_value_function(property_id)}}
|
| {
|
| String url;
|
| - if (value->isValueList()) {
|
| - CSSValueList* list = toCSSValueList(value);
|
| - ASSERT(list->length() > 1);
|
| + if (value.isValueList()) {
|
| + CSSValueList& list = toCSSValueList(value);
|
| + ASSERT(list.length() > 1);
|
|
|
| - if (!list->item(0)->isPrimitiveValue())
|
| + if (!list.item(0).isPrimitiveValue())
|
| return;
|
|
|
| - CSSPrimitiveValue* pValue = toCSSPrimitiveValue(list->item(0));
|
| - if (!pValue->isURI())
|
| + CSSPrimitiveValue& pValue = toCSSPrimitiveValue(list.item(0));
|
| + if (!pValue.isURI())
|
| return;
|
|
|
| - url = pValue->getStringValue();
|
| - value = list->item(1);
|
| + url = pValue.getStringValue();
|
| + value = list.item(1);
|
| }
|
| - if (value->isPrimitiveValue()) {
|
| - CSSPrimitiveValue* pValue = toCSSPrimitiveValue(value);
|
| + if (value.isPrimitiveValue()) {
|
| + CSSPrimitiveValue& pValue = toCSSPrimitiveValue(value);
|
| Color c;
|
| SVGPaintType ptype = SVG_PAINTTYPE_RGBCOLOR;
|
| - if (pValue->isRGBColor()) {
|
| - c = pValue->getRGBA32Value();
|
| + if (pValue.isRGBColor()) {
|
| + c = pValue.getRGBA32Value();
|
| ptype = url.isEmpty() ? SVG_PAINTTYPE_RGBCOLOR : SVG_PAINTTYPE_URI_RGBCOLOR;
|
| - } else if (pValue->getValueID() == CSSValueCurrentcolor) {
|
| + } else if (pValue.getValueID() == CSSValueCurrentcolor) {
|
| c = state.style()->color();
|
| ptype = url.isEmpty() ? SVG_PAINTTYPE_CURRENTCOLOR : SVG_PAINTTYPE_URI_CURRENTCOLOR;
|
| - } else if (pValue->getValueID() == CSSValueNone) {
|
| + } else if (pValue.getValueID() == CSSValueNone) {
|
| ptype = url.isEmpty() ? SVG_PAINTTYPE_NONE : SVG_PAINTTYPE_URI_NONE;
|
| - } else if (pValue->isURI()) {
|
| + } else if (pValue.isURI()) {
|
| ptype = SVG_PAINTTYPE_URI;
|
| - url = pValue->getStringValue();
|
| + url = pValue.getStringValue();
|
| } else {
|
| return;
|
| }
|
|
|