| Index: Source/core/css/resolver/TransformBuilder.cpp
|
| diff --git a/Source/core/css/resolver/TransformBuilder.cpp b/Source/core/css/resolver/TransformBuilder.cpp
|
| index df926fad3634784968b811ec56b8fad75f56e054..91c9aa6a381b76ccfae9417859031d66ea947b84 100644
|
| --- a/Source/core/css/resolver/TransformBuilder.cpp
|
| +++ b/Source/core/css/resolver/TransformBuilder.cpp
|
| @@ -43,7 +43,7 @@
|
|
|
| namespace blink {
|
|
|
| -static Length convertToFloatLength(CSSPrimitiveValue primitiveValue, const CSSToLengthConversionData& conversionData)
|
| +static Length convertToFloatLength(const CSSPrimitiveValue& primitiveValue, const CSSToLengthConversionData& conversionData)
|
| {
|
| return primitiveValue.convertToLength(conversionData);
|
| }
|
| @@ -79,7 +79,7 @@ static TransformOperation::OperationType getTransformOperationType(CSSValueID ty
|
| }
|
| }
|
|
|
| -void TransformBuilder::createTransformOperations(CSSValue& inValue, const CSSToLengthConversionData& conversionData, TransformOperations& outOperations)
|
| +void TransformBuilder::createTransformOperations(const CSSValue& inValue, const CSSToLengthConversionData& conversionData, TransformOperations& outOperations)
|
| {
|
| ASSERT(!outOperations.size());
|
| if (!inValue.isValueList()) {
|
| @@ -92,7 +92,7 @@ void TransformBuilder::createTransformOperations(CSSValue& inValue, const CSSToL
|
| CSSFunctionValue& transformValue = toCSSFunctionValue(value);
|
| TransformOperation::OperationType transformType = getTransformOperationType(transformValue.functionType());
|
|
|
| - CSSPrimitiveValue firstValue = toCSSPrimitiveValue(transformValue.item(0));
|
| + const CSSPrimitiveValue& firstValue = toCSSPrimitiveValue(transformValue.item(0));
|
|
|
| switch (transformType) {
|
| case TransformOperation::Scale:
|
| @@ -106,7 +106,7 @@ void TransformBuilder::createTransformOperations(CSSValue& inValue, const CSSToL
|
| sx = firstValue.getDoubleValue();
|
| if (transformType != TransformOperation::ScaleX) {
|
| if (transformValue.length() > 1) {
|
| - CSSPrimitiveValue secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| + const CSSPrimitiveValue& secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| sy = secondValue.getDoubleValue();
|
| } else {
|
| sy = sx;
|
| @@ -142,7 +142,7 @@ void TransformBuilder::createTransformOperations(CSSValue& inValue, const CSSToL
|
| tx = convertToFloatLength(firstValue, conversionData);
|
| if (transformType != TransformOperation::TranslateX) {
|
| if (transformValue.length() > 1) {
|
| - CSSPrimitiveValue secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| + const CSSPrimitiveValue& secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| ty = convertToFloatLength(secondValue, conversionData);
|
| }
|
| }
|
| @@ -178,9 +178,9 @@ void TransformBuilder::createTransformOperations(CSSValue& inValue, const CSSToL
|
| break;
|
| }
|
| case TransformOperation::Rotate3D: {
|
| - CSSPrimitiveValue secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| - CSSPrimitiveValue thirdValue = toCSSPrimitiveValue(transformValue.item(2));
|
| - CSSPrimitiveValue fourthValue = toCSSPrimitiveValue(transformValue.item(3));
|
| + const CSSPrimitiveValue& secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| + const CSSPrimitiveValue& thirdValue = toCSSPrimitiveValue(transformValue.item(2));
|
| + const CSSPrimitiveValue& fourthValue = toCSSPrimitiveValue(transformValue.item(3));
|
| double x = firstValue.getDoubleValue();
|
| double y = secondValue.getDoubleValue();
|
| double z = thirdValue.getDoubleValue();
|
| @@ -200,7 +200,7 @@ void TransformBuilder::createTransformOperations(CSSValue& inValue, const CSSToL
|
| angleX = angle;
|
| if (transformType == TransformOperation::Skew) {
|
| if (transformValue.length() > 1) {
|
| - CSSPrimitiveValue secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| + const CSSPrimitiveValue& secondValue = toCSSPrimitiveValue(transformValue.item(1));
|
| angleY = secondValue.computeDegrees();
|
| }
|
| }
|
|
|