summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-04-30 07:11:27 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-04-30 07:11:27 (GMT)
commitf9f2fc0084a5590fb19a8b1baf3ed52f4eb3c9b9 (patch)
tree58d640719d397d7ad46d29cdef9a0f75f0c62924
parenteeaea3e7e3697c78567ad6ad51b6e30ccc712ee8 (diff)
downloadQt-f9f2fc0084a5590fb19a8b1baf3ed52f4eb3c9b9.zip
Qt-f9f2fc0084a5590fb19a8b1baf3ed52f4eb3c9b9.tar.gz
Qt-f9f2fc0084a5590fb19a8b1baf3ed52f4eb3c9b9.tar.bz2
Updated WebKit to 2c346f58ae70470d88dcd856bfe59b04a144b65a
Integrated changes: || <https://webkit.org/b/38075> || [Qt] GraphicsLayer: Reverse animations don't work in some use cases || || <https://webkit.org/b/38076> || [Qt] GraphicsLayer: flicker when starting an animation before the previous one ended. ||
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog40
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp61
4 files changed, 73 insertions, 32 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 95bb920..5c76b5c 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-2c346f58ae70470d88dcd856bfe59b04a144b65a
+540ae4ccd25609e1bfe1673195ce126255e36774
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 64d55a9..3b7a26b 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- 1a40220a82197023c1b1ac6eff027be6dd3168d3
+ 2c346f58ae70470d88dcd856bfe59b04a144b65a
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 7c340fd..8db76e8 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,43 @@
+2010-04-29 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] GraphicsLayer: flicker when starting an animation before the previous one ended.
+ https://bugs.webkit.org/show_bug.cgi?id=38076
+
+ This was due to the cude in the removeAnimations functions, which called deleteLater() without stopping the
+ animation synchronously. The delay between the call to that function and the actual call to the animation's destructor
+ is when the flicker occured. We fix this by calling stop() synchronously, and making sure that the value is reverted
+ upon stop (updateState) and not upon the object's destruction.
+
+ http://staff.washington.edu/fmf/2009/03/25/iphone-3d-css-transformations/ now doesn't flicker when
+ the animation is toggled frequently.
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::TransformAnimationQt::~TransformAnimationQt):
+ (WebCore::TransformAnimationQt::applyFrame):
+ (WebCore::TransformAnimationQt::updateState):
+ (WebCore::OpacityAnimationQt::~OpacityAnimationQt):
+ (WebCore::OpacityAnimationQt::updateState):
+ (WebCore::GraphicsLayerQt::removeAnimationsForProperty):
+ (WebCore::GraphicsLayerQt::removeAnimationsForKeyframes):
+
+2010-04-29 Noam Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Reverse animations don't work in some use cases
+ https://bugs.webkit.org/show_bug.cgi?id=38075
+
+ This was due to a code path special-casing reverse animations, that became obselete when we aligned our animation code
+ with the CA implementation. That special case code path is now a bug - and this patch removes it.
+
+ http://staff.washington.edu/fmf/2009/03/25/iphone-3d-css-transformations/ now runs the reverse
+ animation correctly.
+
+ * platform/graphics/qt/GraphicsLayerQt.cpp:
+ (WebCore::TransformAnimationQt::applyFrame):
+
2010-04-29 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
index 3782446..1c4c275 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp
@@ -1168,8 +1168,6 @@ public:
{
if (m_fillsForwards)
setCurrentTime(1);
- else if (m_layer && m_layer.data()->m_layer)
- m_layer.data()->setBaseTransform(m_layer.data()->m_layer->transform());
}
// the idea is that we let WebCore manage the transform-operations
@@ -1180,33 +1178,25 @@ public:
{
TransformationMatrix transformMatrix;
- // sometimes the animation values from WebCore are misleading and we have to use the actual matrix as source
- // The Mac implementation simply doesn't try to accelerate those (e.g. 360deg rotation), but we do.
- if (progress == 1 || !targetOperations.size() || sourceOperations == targetOperations) {
- TransformationMatrix sourceMatrix;
- sourceOperations.apply(m_boxSize, sourceMatrix);
- transformMatrix = m_sourceMatrix;
- transformMatrix.blend(sourceMatrix, 1 - progress);
- } else {
- bool validTransformLists = true;
- const int sourceOperationCount = sourceOperations.size();
- if (sourceOperationCount) {
- if (targetOperations.size() != sourceOperationCount)
- validTransformLists = false;
- else
- for (size_t j = 0; j < sourceOperationCount && validTransformLists; ++j)
- if (!sourceOperations.operations()[j]->isSameType(*targetOperations.operations()[j]))
- validTransformLists = false;
- }
+ bool validTransformLists = true;
+ const int sourceOperationCount = sourceOperations.size();
+ if (sourceOperationCount) {
+ if (targetOperations.size() != sourceOperationCount)
+ validTransformLists = false;
+ else
+ for (size_t j = 0; j < sourceOperationCount && validTransformLists; ++j)
+ if (!sourceOperations.operations()[j]->isSameType(*targetOperations.operations()[j]))
+ validTransformLists = false;
+ }
- if (validTransformLists) {
- for (size_t i = 0; i < targetOperations.size(); ++i)
- targetOperations.operations()[i]->blend(sourceOperations.at(i), progress)->apply(transformMatrix, m_boxSize);
- } else {
- targetOperations.apply(m_boxSize, transformMatrix);
- transformMatrix.blend(m_sourceMatrix, progress);
- }
+ if (validTransformLists) {
+ for (size_t i = 0; i < targetOperations.size(); ++i)
+ targetOperations.operations()[i]->blend(sourceOperations.at(i), progress)->apply(transformMatrix, m_boxSize);
+ } else {
+ targetOperations.apply(m_boxSize, transformMatrix);
+ transformMatrix.blend(m_sourceMatrix, progress);
}
+
m_layer.data()->setBaseTransform(transformMatrix);
if (m_fillsForwards)
m_layer.data()->m_layer->setTransform(m_layer.data()->m_baseTransform);
@@ -1225,7 +1215,10 @@ public:
m_sourceMatrix = m_layer.data()->m_layer->transform();
m_layer.data()->m_transformAnimationRunning = true;
} else if (newState == QAbstractAnimation::Stopped) {
+ // We update the transform back to the default. This already takes fill-modes into account.
m_layer.data()->m_transformAnimationRunning = false;
+ if (m_layer && m_layer.data()->m_layer)
+ m_layer.data()->setBaseTransform(m_layer.data()->m_layer->transform());
}
}
@@ -1243,8 +1236,6 @@ public:
{
if (m_fillsForwards)
setCurrentTime(1);
- else if (m_layer && m_layer.data()->m_layer)
- m_layer.data()->setOpacity(m_layer.data()->m_layer->opacity());
}
virtual void applyFrame(const qreal& fromValue, const qreal& toValue, qreal progress)
{
@@ -1266,6 +1257,12 @@ public:
if (m_layer)
m_layer.data()->m_opacityAnimationRunning = (newState == QAbstractAnimation::Running);
+
+ // If stopped, we update the opacity back to the default. This already takes fill-modes into account.
+ if (newState == Stopped)
+ if (m_layer && m_layer.data()->m_layer)
+ m_layer.data()->setOpacity(m_layer.data()->m_layer->opacity());
+
}
};
@@ -1331,6 +1328,8 @@ void GraphicsLayerQt::removeAnimationsForProperty(AnimatedPropertyID id)
if (*it) {
AnimationQtBase* anim = static_cast<AnimationQtBase*>(it->data());
if (anim && anim->m_webkitPropertyID == id) {
+ // We need to stop the animation right away, or it might flicker before it's deleted.
+ anim->stop();
anim->deleteLater();
it = m_impl->m_animations.erase(it);
--it;
@@ -1345,7 +1344,9 @@ void GraphicsLayerQt::removeAnimationsForKeyframes(const String& name)
if (*it) {
AnimationQtBase* anim = static_cast<AnimationQtBase*>((*it).data());
if (anim && anim->m_keyframesName == QString(name)) {
- (*it).data()->deleteLater();
+ // We need to stop the animation right away, or it might flicker before it's deleted.
+ anim->stop();
+ anim->deleteLater();
it = m_impl->m_animations.erase(it);
--it;
}