diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/WebKit/blackberry/Api/WebAnimation.cpp | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit/blackberry/Api/WebAnimation.cpp')
-rw-r--r-- | Source/WebKit/blackberry/Api/WebAnimation.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/WebKit/blackberry/Api/WebAnimation.cpp b/Source/WebKit/blackberry/Api/WebAnimation.cpp index 4ae50de48..38cb36c9f 100644 --- a/Source/WebKit/blackberry/Api/WebAnimation.cpp +++ b/Source/WebKit/blackberry/Api/WebAnimation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Research In Motion Limited. All rights reserved. + * Copyright (C) 2012, 2013 Research In Motion Limited. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,6 +24,7 @@ #include "GraphicsLayer.h" #include "LayerCompositingThread.h" #include "LayerWebKitThread.h" +#include "ScaleTransformOperation.h" #include "WebAnimation_p.h" #include <BlackBerryPlatformMessageClient.h> @@ -47,6 +48,25 @@ WebAnimation WebAnimation::fadeAnimation(const BlackBerry::Platform::String& nam return tmp; } +WebAnimation WebAnimation::shrinkAnimation(const BlackBerry::Platform::String& name, float from, float to, double duration) +{ + WebAnimation tmp; + tmp.d->name = name; + tmp.d->animation = Animation::create(); + tmp.d->animation->setDuration(duration); + tmp.d->keyframes = KeyframeValueList(AnimatedPropertyWebkitTransform); + + TransformOperations startOperation; + startOperation.operations().append(ScaleTransformOperation::create(from, from, TransformOperation::SCALE)); + tmp.d->keyframes.insert(new TransformAnimationValue(0, &startOperation)); + + TransformOperations endOperation; + endOperation.operations().append(ScaleTransformOperation::create(to, to, TransformOperation::SCALE)); + tmp.d->keyframes.insert(new TransformAnimationValue(1.0, &endOperation)); + + return tmp; +} + BlackBerry::Platform::String WebAnimation::name() const { return d->name; |