Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Unified Diff: Source/core/css/resolver/TransformBuilder.cpp

Issue 1225553002: CSSValue Immediates: Make CSSPrimitiveValue a container (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
Patch Set: Rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/css/resolver/ViewportStyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/TransformBuilder.cpp
diff --git a/Source/core/css/resolver/TransformBuilder.cpp b/Source/core/css/resolver/TransformBuilder.cpp
index d6786476bf4f35c00aba8e6d0d8fe16feeae2ef2..df926fad3634784968b811ec56b8fad75f56e054 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(CSSPrimitiveValue primitiveValue, const CSSToLengthConversionData& conversionData)
{
return primitiveValue.convertToLength(conversionData);
}
@@ -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));
+ 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));
+ 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));
+ 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));
+ CSSPrimitiveValue secondValue = toCSSPrimitiveValue(transformValue.item(1));
+ CSSPrimitiveValue thirdValue = toCSSPrimitiveValue(transformValue.item(2));
+ 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));
+ CSSPrimitiveValue secondValue = toCSSPrimitiveValue(transformValue.item(1));
angleY = secondValue.computeDegrees();
}
}
« no previous file with comments | « Source/core/css/resolver/StyleBuilderCustom.cpp ('k') | Source/core/css/resolver/ViewportStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698