summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2010-01-25 22:43:15 +0000
committerNicolas Roard <nicolas@android.com>2010-01-26 16:19:40 +0000
commit659f068656ed799af79f4a87fb3301693ea38079 (patch)
treee9d7c25cfebe3c39b3f4e3c6b4b1c6fb0c527086 /WebCore
parent5106648b32c4af91bb26f2a5af60a2c1eac14a78 (diff)
downloadexternal_webkit-659f068656ed799af79f4a87fb3301693ea38079.zip
external_webkit-659f068656ed799af79f4a87fb3301693ea38079.tar.gz
external_webkit-659f068656ed799af79f4a87fb3301693ea38079.tar.bz2
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)) {