| Index: third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp
|
| index 3bea8d9fc973114d183019b4383d37792f7a4fd3..548cddcf7e8a65f35b7d3d95795f83540b6b6743 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp
|
| @@ -229,11 +229,25 @@ TransformOperations TransformBuilder::createTransformOperations(
|
| case TransformOperation::RotateY:
|
| case TransformOperation::RotateZ: {
|
| double angle = firstValue.computeDegrees();
|
| - double x = transformType == TransformOperation::RotateX;
|
| - double y = transformType == TransformOperation::RotateY;
|
| - double z = transformType == TransformOperation::RotateZ;
|
| - operations.operations().append(
|
| - RotateTransformOperation::create(x, y, z, angle, transformType));
|
| + if (transformValue->length() == 1) {
|
| + double x = transformType == TransformOperation::RotateX;
|
| + double y = transformType == TransformOperation::RotateY;
|
| + double z = transformType == TransformOperation::RotateZ;
|
| + operations.operations().append(
|
| + RotateTransformOperation::create(x, y, z, angle, transformType));
|
| + } else {
|
| + // For SVG 'transform' attributes we generate 3-argument rotate()
|
| + // functions.
|
| + DCHECK_EQ(transformValue->length(), 3u);
|
| + const CSSPrimitiveValue& secondValue =
|
| + toCSSPrimitiveValue(transformValue->item(1));
|
| + const CSSPrimitiveValue& thirdValue =
|
| + toCSSPrimitiveValue(transformValue->item(2));
|
| + operations.operations().append(
|
| + RotateAroundOriginTransformOperation::create(
|
| + angle, secondValue.computeLength<double>(conversionData),
|
| + thirdValue.computeLength<double>(conversionData)));
|
| + }
|
| break;
|
| }
|
| case TransformOperation::Rotate3D: {
|
|
|