summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-03-08 14:20:31 -0800
committerRussell Brenner <russellbrenner@google.com>2011-03-08 16:43:43 -0800
commit8d060c05a073fedcf8cd4142926ff5a5e1991de9 (patch)
tree75568185c4a640e20b8b2b41d56f0cd3a4870ce5 /WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
parent4ffd02f8c673bc6ce1a6b96f9fd3b21e8337ec7c (diff)
downloadexternal_webkit-8d060c05a073fedcf8cd4142926ff5a5e1991de9.zip
external_webkit-8d060c05a073fedcf8cd4142926ff5a5e1991de9.tar.gz
external_webkit-8d060c05a073fedcf8cd4142926ff5a5e1991de9.tar.bz2
Fix 2453890: animation via css -webkit-transform
Followed model used for transform animations. Tested with http://www.webkit.org/blog-files/leaves/. Fixes http://b/2453890. Change-Id: Ie71217743b6e1ee9ab0e023fdff44e8c65c8d477
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 7963ae0..26bce59 100644
--- a/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -734,15 +734,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()));