summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2010-01-26 08:20:50 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-26 08:20:50 -0800
commit6d2214b2ba7267b0ef3723540dc4591d41d101e3 (patch)
treedffb1e38f9f8a70255a90e2c057de0816ac03b5e /WebCore
parent0ef943ddd5a0d4509e2c6a495365bbb4eb6e088a (diff)
parent659f068656ed799af79f4a87fb3301693ea38079 (diff)
downloadexternal_webkit-6d2214b2ba7267b0ef3723540dc4591d41d101e3.zip
external_webkit-6d2214b2ba7267b0ef3723540dc4591d41d101e3.tar.gz
external_webkit-6d2214b2ba7267b0ef3723540dc4591d41d101e3.tar.bz2
Merge "translate3d() wasn't handled as we only have a 2D backend for the moment. But it should still work for the (x,y) components anyway... Fix bug http://b/2395354"
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index fa012b0..9d9d067 100644
--- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -588,6 +588,9 @@ bool GraphicsLayerAndroid::createTransformAnimationsFromKeyframes(const Keyframe
TLOG("(%x) animateTransform, valueList(%d) functionList(%d) duration(%.2f)", this,
valueList.size(), functionList.size(), animation->duration());
+ // FIXME: add support for the translate 3d operations (when
+ // we'll have an OpenGL backend)
+
for (unsigned int i = 0; i < valueList.size(); i++) {
const TransformOperations* operation = ((TransformAnimationValue*)valueList.at(i))->value();
Vector<RefPtr<TransformOperation> > ops = operation->operations();
@@ -596,7 +599,8 @@ bool GraphicsLayerAndroid::createTransformAnimationsFromKeyframes(const Keyframe
TransformOperation* op = ops[j].get();
TLOG("(%x) animateTransform, dealing with the %d:%d operation, current op: %d (translate is %d, rotate %d, scale %d)",
this, i, j, op->getOperationType(), TransformOperation::TRANSLATE, TransformOperation::ROTATE, TransformOperation::SCALE);
- if (op->getOperationType() == TransformOperation::TRANSLATE) {
+ if ((op->getOperationType() == TransformOperation::TRANSLATE) ||
+ (op->getOperationType() == TransformOperation::TRANSLATE_3D)) {
TranslateTransformOperation* translateOperation = (TranslateTransformOperation*) op;
IntSize bounds(m_size.width(), m_size.height());
float x = translateOperation->x(bounds);
@@ -636,6 +640,17 @@ bool GraphicsLayerAndroid::createTransformAnimationsFromKeyframes(const Keyframe
TLOG("(%x) animateTransform, the %d operation is a translation_y(%.2f)",
this, j, y);
doTranslation = true;
+ } else if (op->getOperationType() == TransformOperation::TRANSLATE_Z) {
+ TranslateTransformOperation* translateOperation = (TranslateTransformOperation*) op;
+ IntSize bounds(m_size.width(), m_size.height());
+ float z = translateOperation->z(bounds);
+ if (!i)
+ fromTranslateZ = z;
+ else
+ toTranslateZ = z;
+ TLOG("(%x) animateTransform, the %d operation is a translation_z(%.2f)",
+ this, j, z);
+ doTranslation = true;
} else if ((op->getOperationType() == TransformOperation::ROTATE)
|| (op->getOperationType() == TransformOperation::ROTATE_X)
|| (op->getOperationType() == TransformOperation::ROTATE_Y)) {