Diff
Modified: trunk/LayoutTests/ChangeLog (88246 => 88247)
--- trunk/LayoutTests/ChangeLog 2011-06-07 16:48:20 UTC (rev 88246)
+++ trunk/LayoutTests/ChangeLog 2011-06-07 16:58:22 UTC (rev 88247)
@@ -1,3 +1,16 @@
+2011-06-07 Young Han Lee <[email protected]>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Texmap][Qt] Accelerated animation is not paused properly.
+ https://bugs.webkit.org/show_bug.cgi?id=61446
+
+ The transform matrix of an accelerated animation shouldn't be synced with the matrix of the GraphicsLayer when the animation is paused.
+
+ * animations/play-state-paused-expected.png: Added.
+ * animations/play-state-paused-expected.txt: Added.
+ * animations/play-state-paused.html: Added.
+
2011-06-07 Sheriff Bot <[email protected]>
Unreviewed, rolling out r88238.
Added: trunk/LayoutTests/animations/play-state-paused-expected.png (0 => 88247)
--- trunk/LayoutTests/animations/play-state-paused-expected.png (rev 0)
+++ trunk/LayoutTests/animations/play-state-paused-expected.png 2011-06-07 16:58:22 UTC (rev 88247)
@@ -0,0 +1,5 @@
+\x89PNG
+
+
+IHDR X \x9Av\x82p sBIT|d\x88 pHYs \xC4 \xC4\x95+ )tEXtchecksum 9099487cadbd21a5ebe3747a43a568c7\xA9\xC2\xEC\xDB \x83IDATx\x9C\xED\xD9A
+AAG\xFC\xB7\xF8\xF2g![؈\xD45\xA933\xF3 <\xB7 \xF7!@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2\xAF\xED|;\x9F\xB3=\xFEּg{ \xF0# \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 \x9933\xB3= \xB8 \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 \x99\x83\xA9\xFCU IEND\xAEB`\x82
\ No newline at end of file
Added: trunk/LayoutTests/animations/play-state-paused-expected.txt (0 => 88247)
--- trunk/LayoutTests/animations/play-state-paused-expected.txt (rev 0)
+++ trunk/LayoutTests/animations/play-state-paused-expected.txt 2011-06-07 16:58:22 UTC (rev 88247)
@@ -0,0 +1,4 @@
+PASS - "webkitTransform" property for "box" element at 0.5s saw something close to: 1,0,0,1,75,0
+PASS - "webkitTransform" property for "box" element at 1s saw something close to: 1,0,0,1,150,0
+PASS - "webkitTransform" property for "box" element at 2.5s saw something close to: 1,0,0,1,150,0
+
Added: trunk/LayoutTests/animations/play-state-paused.html (0 => 88247)
--- trunk/LayoutTests/animations/play-state-paused.html (rev 0)
+++ trunk/LayoutTests/animations/play-state-paused.html 2011-06-07 16:58:22 UTC (rev 88247)
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Test of -webkit-animation-play-state</title>
+ <style type="text/css" media="screen">
+ body {
+ margin: 0;
+ }
+
+ #box {
+ position: absolute;
+ left: 0px;
+ top: 100px;
+ height: 100px;
+ width: 100px;
+ background-color: red;
+ margin: 0;
+ -webkit-animation-duration: 2s;
+ -webkit-animation-timing-function: linear;
+ -webkit-animation-name: "move1";
+ -webkit-animation-play-state: running;
+ }
+ #safezone {
+ position: absolute;
+ top: 100px;
+ height: 100px;
+ width: 200px;
+ left: 100px;
+ background-color: green;
+ }
+ @-webkit-keyframes "move1" {
+ from { -webkit-transform: translateX(0px); }
+ to { -webkit-transform: translateX(300px); }
+ }
+ #result {
+ color: white; /* hide from pixel results */
+ }
+ </style>
+ <script src="" type="text/_javascript_" charset="utf-8"></script>
+ <script type="text/_javascript_" charset="utf-8">
+ const expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["move1", 0.5, "box", "webkitTransform", [1,0,0,1,75,0], 20],
+ ["move1", 1.0, "box", "webkitTransform", [1,0,0,1,150,0], 20],
+ ["move1", 2.5, "box", "webkitTransform", [1,0,0,1,150,0], 20],
+ ];
+
+ function pauseAnimation()
+ {
+ document.getElementById("box").style.webkitAnimationPlayState = "paused";
+ }
+
+ function setTimers()
+ {
+ setTimeout(pauseAnimation, 1000);
+ }
+
+ runAnimationTest(expectedValues, setTimers, null, true);
+
+ </script>
+</head>
+<body>
+<!-- This tests the operation of -webkit-animation-play-state. After 1 second the red boxes should be hidden by the green boxes. You should see no red boxes. -->
+<div id="box"></div>
+<div id="safezone"></div>
+<div id="result"></div>
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (88246 => 88247)
--- trunk/Source/WebCore/ChangeLog 2011-06-07 16:48:20 UTC (rev 88246)
+++ trunk/Source/WebCore/ChangeLog 2011-06-07 16:58:22 UTC (rev 88247)
@@ -1,3 +1,20 @@
+2011-06-07 Young Han Lee <[email protected]>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Texmap][Qt] Accelerated animation is not paused properly.
+ https://bugs.webkit.org/show_bug.cgi?id=61446
+
+ The transform matrix of an accelerated animation shouldn't be synced with the matrix of the GraphicsLayer when the animation is paused.
+
+ Test: animations/play-state-paused.html
+
+ * platform/graphics/texmap/TextureMapperNode.cpp:
+ (WebCore::TextureMapperNode::syncCompositingStateSelf):
+ (WebCore::TextureMapperNode::hasOpacityAnimation):
+ (WebCore::TextureMapperNode::hasTransformAnimation):
+ * platform/graphics/texmap/TextureMapperNode.h:
+
2011-06-07 Lucas De Marchi <[email protected]>
Reviewed by Antonio Gomes.
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp (88246 => 88247)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp 2011-06-07 16:48:20 UTC (rev 88246)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.cpp 2011-06-07 16:58:22 UTC (rev 88247)
@@ -653,9 +653,9 @@
if (!m_currentContent.needsDisplay)
m_currentContent.needsDisplayRect.unite(pendingContent.needsDisplayRect);
- if (!hasRunningOpacityAnimation())
+ if (!hasOpacityAnimation())
m_opacity = m_state.opacity;
- if (!hasRunningTransformAnimation())
+ if (!hasTransformAnimation())
m_transforms.base = m_state.transform;
}
@@ -815,21 +815,21 @@
}
}
-bool TextureMapperNode::hasRunningOpacityAnimation() const
+bool TextureMapperNode::hasOpacityAnimation() const
{
for (size_t i = 0; i < m_animations.size(); ++i) {
const TextureMapperAnimation& animation = *m_animations[i].get();
- if (!animation.paused && animation.keyframes.property() == AnimatedPropertyOpacity)
+ if (animation.keyframes.property() == AnimatedPropertyOpacity)
return true;
}
return false;
}
-bool TextureMapperNode::hasRunningTransformAnimation() const
+bool TextureMapperNode::hasTransformAnimation() const
{
for (size_t i = 0; i < m_animations.size(); ++i) {
const TextureMapperAnimation& animation = *m_animations[i].get();
- if (!animation.paused && animation.keyframes.property() == AnimatedPropertyWebkitTransform)
+ if (animation.keyframes.property() == AnimatedPropertyWebkitTransform)
return true;
}
return false;
Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.h (88246 => 88247)
--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.h 2011-06-07 16:48:20 UTC (rev 88246)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperNode.h 2011-06-07 16:58:22 UTC (rev 88247)
@@ -177,8 +177,8 @@
void applyAnimationFrame(const TextureMapperAnimation&, const AnimationValue* from, const AnimationValue* to, float progress);
void applyOpacityAnimation(float fromOpacity, float toOpacity, double);
void applyTransformAnimation(const TextureMapperAnimation&, const TransformOperations* start, const TransformOperations* end, double);
- bool hasRunningOpacityAnimation() const;
- bool hasRunningTransformAnimation() const;
+ bool hasOpacityAnimation() const;
+ bool hasTransformAnimation() const;
struct TransformData {
TransformationMatrix target;