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

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

Issue 15797004: Cleanup WebKit prefixed names for classes in css directory. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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
Index: Source/core/css/resolver/TransformBuilder.cpp
diff --git a/Source/core/css/resolver/TransformBuilder.cpp b/Source/core/css/resolver/TransformBuilder.cpp
index e57c8e4175dcafa06481337e1e03246875d8acaf..f4f1df6c23de03f176089164ae64723467bf205e 100644
--- a/Source/core/css/resolver/TransformBuilder.cpp
+++ b/Source/core/css/resolver/TransformBuilder.cpp
@@ -30,7 +30,7 @@
#include "core/css/resolver/TransformBuilder.h"
#include "core/css/CSSPrimitiveValueMappings.h"
-#include "core/css/WebKitCSSTransformValue.h"
+#include "core/css/CSSTransformValue.h"
#include "core/platform/graphics/transforms/Matrix3DTransformOperation.h"
#include "core/platform/graphics/transforms/MatrixTransformOperation.h"
#include "core/platform/graphics/transforms/PerspectiveTransformOperation.h"
@@ -56,31 +56,31 @@ static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyl
return primitiveValue ? primitiveValue->convertToLength<FixedFloatConversion | PercentConversion | CalculatedConversion | FractionConversion | ViewportPercentageConversion>(style, rootStyle, multiplier) : Length(Undefined);
}
-static TransformOperation::OperationType getTransformOperationType(WebKitCSSTransformValue::TransformOperationType type)
+static TransformOperation::OperationType getTransformOperationType(CSSTransformValue::TransformOperationType type)
{
switch (type) {
- case WebKitCSSTransformValue::ScaleTransformOperation: return TransformOperation::SCALE;
- case WebKitCSSTransformValue::ScaleXTransformOperation: return TransformOperation::SCALE_X;
- case WebKitCSSTransformValue::ScaleYTransformOperation: return TransformOperation::SCALE_Y;
- case WebKitCSSTransformValue::ScaleZTransformOperation: return TransformOperation::SCALE_Z;
- case WebKitCSSTransformValue::Scale3DTransformOperation: return TransformOperation::SCALE_3D;
- case WebKitCSSTransformValue::TranslateTransformOperation: return TransformOperation::TRANSLATE;
- case WebKitCSSTransformValue::TranslateXTransformOperation: return TransformOperation::TRANSLATE_X;
- case WebKitCSSTransformValue::TranslateYTransformOperation: return TransformOperation::TRANSLATE_Y;
- case WebKitCSSTransformValue::TranslateZTransformOperation: return TransformOperation::TRANSLATE_Z;
- case WebKitCSSTransformValue::Translate3DTransformOperation: return TransformOperation::TRANSLATE_3D;
- case WebKitCSSTransformValue::RotateTransformOperation: return TransformOperation::ROTATE;
- case WebKitCSSTransformValue::RotateXTransformOperation: return TransformOperation::ROTATE_X;
- case WebKitCSSTransformValue::RotateYTransformOperation: return TransformOperation::ROTATE_Y;
- case WebKitCSSTransformValue::RotateZTransformOperation: return TransformOperation::ROTATE_Z;
- case WebKitCSSTransformValue::Rotate3DTransformOperation: return TransformOperation::ROTATE_3D;
- case WebKitCSSTransformValue::SkewTransformOperation: return TransformOperation::SKEW;
- case WebKitCSSTransformValue::SkewXTransformOperation: return TransformOperation::SKEW_X;
- case WebKitCSSTransformValue::SkewYTransformOperation: return TransformOperation::SKEW_Y;
- case WebKitCSSTransformValue::MatrixTransformOperation: return TransformOperation::MATRIX;
- case WebKitCSSTransformValue::Matrix3DTransformOperation: return TransformOperation::MATRIX_3D;
- case WebKitCSSTransformValue::PerspectiveTransformOperation: return TransformOperation::PERSPECTIVE;
- case WebKitCSSTransformValue::UnknownTransformOperation: return TransformOperation::NONE;
+ case CSSTransformValue::ScaleTransformOperation: return TransformOperation::SCALE;
+ case CSSTransformValue::ScaleXTransformOperation: return TransformOperation::SCALE_X;
+ case CSSTransformValue::ScaleYTransformOperation: return TransformOperation::SCALE_Y;
+ case CSSTransformValue::ScaleZTransformOperation: return TransformOperation::SCALE_Z;
+ case CSSTransformValue::Scale3DTransformOperation: return TransformOperation::SCALE_3D;
+ case CSSTransformValue::TranslateTransformOperation: return TransformOperation::TRANSLATE;
+ case CSSTransformValue::TranslateXTransformOperation: return TransformOperation::TRANSLATE_X;
+ case CSSTransformValue::TranslateYTransformOperation: return TransformOperation::TRANSLATE_Y;
+ case CSSTransformValue::TranslateZTransformOperation: return TransformOperation::TRANSLATE_Z;
+ case CSSTransformValue::Translate3DTransformOperation: return TransformOperation::TRANSLATE_3D;
+ case CSSTransformValue::RotateTransformOperation: return TransformOperation::ROTATE;
+ case CSSTransformValue::RotateXTransformOperation: return TransformOperation::ROTATE_X;
+ case CSSTransformValue::RotateYTransformOperation: return TransformOperation::ROTATE_Y;
+ case CSSTransformValue::RotateZTransformOperation: return TransformOperation::ROTATE_Z;
+ case CSSTransformValue::Rotate3DTransformOperation: return TransformOperation::ROTATE_3D;
+ case CSSTransformValue::SkewTransformOperation: return TransformOperation::SKEW;
+ case CSSTransformValue::SkewXTransformOperation: return TransformOperation::SKEW_X;
+ case CSSTransformValue::SkewYTransformOperation: return TransformOperation::SKEW_Y;
+ case CSSTransformValue::MatrixTransformOperation: return TransformOperation::MATRIX;
+ case CSSTransformValue::Matrix3DTransformOperation: return TransformOperation::MATRIX_3D;
+ case CSSTransformValue::PerspectiveTransformOperation: return TransformOperation::PERSPECTIVE;
+ case CSSTransformValue::UnknownTransformOperation: return TransformOperation::NONE;
}
return TransformOperation::NONE;
}
@@ -97,10 +97,10 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
for (CSSValueListIterator i = inValue; i.hasMore(); i.advance()) {
CSSValue* currValue = i.value();
- if (!currValue->isWebKitCSSTransformValue())
+ if (!currValue->isCSSTransformValue())
continue;
- WebKitCSSTransformValue* transformValue = static_cast<WebKitCSSTransformValue*>(i.value());
+ CSSTransformValue* transformValue = static_cast<CSSTransformValue*>(i.value());
if (!transformValue->length())
continue;
@@ -117,16 +117,16 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
CSSPrimitiveValue* firstValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(0));
switch (transformValue->operationType()) {
- case WebKitCSSTransformValue::ScaleTransformOperation:
- case WebKitCSSTransformValue::ScaleXTransformOperation:
- case WebKitCSSTransformValue::ScaleYTransformOperation: {
+ case CSSTransformValue::ScaleTransformOperation:
+ case CSSTransformValue::ScaleXTransformOperation:
+ case CSSTransformValue::ScaleYTransformOperation: {
double sx = 1.0;
double sy = 1.0;
- if (transformValue->operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
+ if (transformValue->operationType() == CSSTransformValue::ScaleYTransformOperation)
sy = firstValue->getDoubleValue();
else {
sx = firstValue->getDoubleValue();
- if (transformValue->operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
+ if (transformValue->operationType() != CSSTransformValue::ScaleXTransformOperation) {
if (transformValue->length() > 1) {
CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
sy = secondValue->getDoubleValue();
@@ -137,18 +137,18 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(ScaleTransformOperation::create(sx, sy, 1.0, getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::ScaleZTransformOperation:
- case WebKitCSSTransformValue::Scale3DTransformOperation: {
+ case CSSTransformValue::ScaleZTransformOperation:
+ case CSSTransformValue::Scale3DTransformOperation: {
double sx = 1.0;
double sy = 1.0;
double sz = 1.0;
- if (transformValue->operationType() == WebKitCSSTransformValue::ScaleZTransformOperation)
+ if (transformValue->operationType() == CSSTransformValue::ScaleZTransformOperation)
sz = firstValue->getDoubleValue();
- else if (transformValue->operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
+ else if (transformValue->operationType() == CSSTransformValue::ScaleYTransformOperation)
sy = firstValue->getDoubleValue();
else {
sx = firstValue->getDoubleValue();
- if (transformValue->operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
+ if (transformValue->operationType() != CSSTransformValue::ScaleXTransformOperation) {
if (transformValue->length() > 2) {
CSSPrimitiveValue* thirdValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(2));
sz = thirdValue->getDoubleValue();
@@ -163,16 +163,16 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(ScaleTransformOperation::create(sx, sy, sz, getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::TranslateTransformOperation:
- case WebKitCSSTransformValue::TranslateXTransformOperation:
- case WebKitCSSTransformValue::TranslateYTransformOperation: {
+ case CSSTransformValue::TranslateTransformOperation:
+ case CSSTransformValue::TranslateXTransformOperation:
+ case CSSTransformValue::TranslateYTransformOperation: {
Length tx = Length(0, Fixed);
Length ty = Length(0, Fixed);
- if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
+ if (transformValue->operationType() == CSSTransformValue::TranslateYTransformOperation)
ty = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
else {
tx = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
- if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
+ if (transformValue->operationType() != CSSTransformValue::TranslateXTransformOperation) {
if (transformValue->length() > 1) {
CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
ty = convertToFloatLength(secondValue, style, rootStyle, zoomFactor);
@@ -186,18 +186,18 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(TranslateTransformOperation::create(tx, ty, Length(0, Fixed), getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::TranslateZTransformOperation:
- case WebKitCSSTransformValue::Translate3DTransformOperation: {
+ case CSSTransformValue::TranslateZTransformOperation:
+ case CSSTransformValue::Translate3DTransformOperation: {
Length tx = Length(0, Fixed);
Length ty = Length(0, Fixed);
Length tz = Length(0, Fixed);
- if (transformValue->operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
+ if (transformValue->operationType() == CSSTransformValue::TranslateZTransformOperation)
tz = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
- else if (transformValue->operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
+ else if (transformValue->operationType() == CSSTransformValue::TranslateYTransformOperation)
ty = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
else {
tx = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
- if (transformValue->operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
+ if (transformValue->operationType() != CSSTransformValue::TranslateXTransformOperation) {
if (transformValue->length() > 2) {
CSSPrimitiveValue* thirdValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(2));
tz = convertToFloatLength(thirdValue, style, rootStyle, zoomFactor);
@@ -215,29 +215,29 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(TranslateTransformOperation::create(tx, ty, tz, getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::RotateTransformOperation: {
+ case CSSTransformValue::RotateTransformOperation: {
double angle = firstValue->computeDegrees();
operations.operations().append(RotateTransformOperation::create(0, 0, 1, angle, getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::RotateXTransformOperation:
- case WebKitCSSTransformValue::RotateYTransformOperation:
- case WebKitCSSTransformValue::RotateZTransformOperation: {
+ case CSSTransformValue::RotateXTransformOperation:
+ case CSSTransformValue::RotateYTransformOperation:
+ case CSSTransformValue::RotateZTransformOperation: {
double x = 0;
double y = 0;
double z = 0;
double angle = firstValue->computeDegrees();
- if (transformValue->operationType() == WebKitCSSTransformValue::RotateXTransformOperation)
+ if (transformValue->operationType() == CSSTransformValue::RotateXTransformOperation)
x = 1;
- else if (transformValue->operationType() == WebKitCSSTransformValue::RotateYTransformOperation)
+ else if (transformValue->operationType() == CSSTransformValue::RotateYTransformOperation)
y = 1;
else
z = 1;
operations.operations().append(RotateTransformOperation::create(x, y, z, angle, getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::Rotate3DTransformOperation: {
+ case CSSTransformValue::Rotate3DTransformOperation: {
if (transformValue->length() < 4)
break;
CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
@@ -250,17 +250,17 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(RotateTransformOperation::create(x, y, z, angle, getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::SkewTransformOperation:
- case WebKitCSSTransformValue::SkewXTransformOperation:
- case WebKitCSSTransformValue::SkewYTransformOperation: {
+ case CSSTransformValue::SkewTransformOperation:
+ case CSSTransformValue::SkewXTransformOperation:
+ case CSSTransformValue::SkewYTransformOperation: {
double angleX = 0;
double angleY = 0;
double angle = firstValue->computeDegrees();
- if (transformValue->operationType() == WebKitCSSTransformValue::SkewYTransformOperation)
+ if (transformValue->operationType() == CSSTransformValue::SkewYTransformOperation)
angleY = angle;
else {
angleX = angle;
- if (transformValue->operationType() == WebKitCSSTransformValue::SkewTransformOperation) {
+ if (transformValue->operationType() == CSSTransformValue::SkewTransformOperation) {
if (transformValue->length() > 1) {
CSSPrimitiveValue* secondValue = toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(1));
angleY = secondValue->computeDegrees();
@@ -270,7 +270,7 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(SkewTransformOperation::create(angleX, angleY, getTransformOperationType(transformValue->operationType())));
break;
}
- case WebKitCSSTransformValue::MatrixTransformOperation: {
+ case CSSTransformValue::MatrixTransformOperation: {
if (transformValue->length() < 6)
break;
double a = firstValue->getDoubleValue();
@@ -282,7 +282,7 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(MatrixTransformOperation::create(a, b, c, d, e, f));
break;
}
- case WebKitCSSTransformValue::Matrix3DTransformOperation: {
+ case CSSTransformValue::Matrix3DTransformOperation: {
if (transformValue->length() < 16)
break;
TransformationMatrix matrix(toCSSPrimitiveValue(transformValue->itemWithoutBoundsCheck(0))->getDoubleValue(),
@@ -304,7 +304,7 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(Matrix3DTransformOperation::create(matrix));
break;
}
- case WebKitCSSTransformValue::PerspectiveTransformOperation: {
+ case CSSTransformValue::PerspectiveTransformOperation: {
Length p = Length(0, Fixed);
if (firstValue->isLength())
p = convertToFloatLength(firstValue, style, rootStyle, zoomFactor);
@@ -320,7 +320,7 @@ bool TransformBuilder::createTransformOperations(CSSValue* inValue, RenderStyle*
operations.operations().append(PerspectiveTransformOperation::create(p));
break;
}
- case WebKitCSSTransformValue::UnknownTransformOperation:
+ case CSSTransformValue::UnknownTransformOperation:
ASSERT_NOT_REACHED();
break;
}

Powered by Google App Engine
This is Rietveld 408576698