summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2011-03-08 19:03:34 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-08 19:03:34 -0800
commit42046545ce1012ef3f925011573d265339778bed (patch)
tree8540372be9b44c833fdfe3dc258e17b1e0e64346 /WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
parent67e4aa15702646d5ff50e9524f4e63eb9ed20122 (diff)
parent8d060c05a073fedcf8cd4142926ff5a5e1991de9 (diff)
downloadexternal_webkit-42046545ce1012ef3f925011573d265339778bed.zip
external_webkit-42046545ce1012ef3f925011573d265339778bed.tar.gz
external_webkit-42046545ce1012ef3f925011573d265339778bed.tar.bz2
Merge "Fix 2453890: animation via css -webkit-transform" into honeycomb-mr1
Diffstat (limited to 'WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r--WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index 4cd48a8..54346e5 100644
--- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -728,15 +728,21 @@ bool GraphicsLayerAndroid::createAnimationFromKeyframes(const KeyframeValueList&
case AnimatedPropertyInvalid: break;
case AnimatedPropertyWebkitTransform: break;
case AnimatedPropertyBackgroundColor: break;
+
case AnimatedPropertyOpacity: {
MLOG("ANIMATEDPROPERTYOPACITY");
- const FloatAnimationValue* startVal =
- static_cast<const FloatAnimationValue*>(valueList.at(0));
- const FloatAnimationValue* endVal =
- static_cast<const FloatAnimationValue*>(valueList.at(1));
- RefPtr<AndroidOpacityAnimation> anim = AndroidOpacityAnimation::create(startVal->value(),
- endVal->value(),
- animation,
+
+ KeyframeValueList* operationsList = new KeyframeValueList(AnimatedPropertyOpacity);
+ for (unsigned int i = 0; i < valueList.size(); i++) {
+ FloatAnimationValue* originalValue = (FloatAnimationValue*)valueList.at(i);
+ FloatAnimationValue* value = new FloatAnimationValue(originalValue->keyTime(),
+ originalValue->value(), 0);
+ // TODO: pass the timing function originalValue->timingFunction());
+ operationsList->insert(value);
+ }
+
+ RefPtr<AndroidOpacityAnimation> anim = AndroidOpacityAnimation::create(animation,
+ operationsList,
beginTime);
if (keyframesName.isEmpty())
anim->setName(propertyIdToString(valueList.property()));