Title: [89597] trunk
Revision
89597
Author
commit-qu...@webkit.org
Date
2011-06-23 12:11:08 -0700 (Thu, 23 Jun 2011)

Log Message

2011-06-23  Young Han Lee  <joy...@company100.net>

        Reviewed by Simon Fraser.

        runAnimationTest always fails if the pause API is enabled and the test target animation has "infinite" iteration count.
        https://bugs.webkit.org/show_bug.cgi?id=63152

        The pausing conditions are modified. Now it accepts the infinite-iteration-count,
        but rejects the zero-iteration-count. There is no reason to consider the zero-count meaning no animation.

        * animations/keyframes-infinite-iterations-expected.txt: Added.
        * animations/keyframes-infinite-iterations.html: Added.
2011-06-23  Young Han Lee  <joy...@company100.net>

        Reviewed by Simon Fraser.

        runAnimationTest always fails if the pause API is enabled and the test target animation has "infinite" iteration count.
        https://bugs.webkit.org/show_bug.cgi?id=63152

        The pausing conditions are modified. Now it accepts the infinite-iteration-count,
        but rejects the zero-iteration-count. There is no reason to consider the zero-count meaning no animation.

        Test: animations/keyframes-infinite-iterations.html

        * page/animation/CompositeAnimation.cpp:
        (WebCore::CompositeAnimation::pauseAnimationAtTime):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89596 => 89597)


--- trunk/LayoutTests/ChangeLog	2011-06-23 18:42:52 UTC (rev 89596)
+++ trunk/LayoutTests/ChangeLog	2011-06-23 19:11:08 UTC (rev 89597)
@@ -1,3 +1,16 @@
+2011-06-23  Young Han Lee  <joy...@company100.net>
+
+        Reviewed by Simon Fraser.
+
+        runAnimationTest always fails if the pause API is enabled and the test target animation has "infinite" iteration count.
+        https://bugs.webkit.org/show_bug.cgi?id=63152
+
+        The pausing conditions are modified. Now it accepts the infinite-iteration-count,
+        but rejects the zero-iteration-count. There is no reason to consider the zero-count meaning no animation.
+
+        * animations/keyframes-infinite-iterations-expected.txt: Added.
+        * animations/keyframes-infinite-iterations.html: Added.
+
 2011-06-23  Jessie Berlin  <jber...@apple.com>
 
         [Windows 7 Release Tests] http/tests/multipart/win-boundary-crash.html flakey.

Added: trunk/LayoutTests/animations/keyframes-infinite-iterations-expected.txt (0 => 89597)


--- trunk/LayoutTests/animations/keyframes-infinite-iterations-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/animations/keyframes-infinite-iterations-expected.txt	2011-06-23 19:11:08 UTC (rev 89597)
@@ -0,0 +1,2 @@
+PASS - "left" property for "box" element at 2.5s saw something close to: 50
+

Added: trunk/LayoutTests/animations/keyframes-infinite-iterations.html (0 => 89597)


--- trunk/LayoutTests/animations/keyframes-infinite-iterations.html	                        (rev 0)
+++ trunk/LayoutTests/animations/keyframes-infinite-iterations.html	2011-06-23 19:11:08 UTC (rev 89597)
@@ -0,0 +1,35 @@
+<html>
+<head>
+  <style>
+    #box {
+        position: absolute;
+        left: 0;
+        top: 100px;
+        height: 100px;
+        width: 100px;
+        background-color: red;
+        -webkit-animation-duration: 1s;
+        -webkit-animation-timing-function: linear;
+        -webkit-animation-iteration-count: infinite;
+        -webkit-animation-name: "anim";
+    }
+    @-webkit-keyframes "anim" {
+        from { left: 0px; }
+        to   { left: 100px; }
+    }
+  </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]
+      ["anim", 2.5, "box", "left", 50, 5],
+    ];
+    
+    runAnimationTest(expectedValues);
+  </script>
+</head>
+<body>
+<div id="box"></div>
+<div id="result"></div>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (89596 => 89597)


--- trunk/Source/WebCore/ChangeLog	2011-06-23 18:42:52 UTC (rev 89596)
+++ trunk/Source/WebCore/ChangeLog	2011-06-23 19:11:08 UTC (rev 89597)
@@ -1,3 +1,18 @@
+2011-06-23  Young Han Lee  <joy...@company100.net>
+
+        Reviewed by Simon Fraser.
+
+        runAnimationTest always fails if the pause API is enabled and the test target animation has "infinite" iteration count.
+        https://bugs.webkit.org/show_bug.cgi?id=63152
+
+        The pausing conditions are modified. Now it accepts the infinite-iteration-count,
+        but rejects the zero-iteration-count. There is no reason to consider the zero-count meaning no animation.
+        
+        Test: animations/keyframes-infinite-iterations.html
+
+        * page/animation/CompositeAnimation.cpp:
+        (WebCore::CompositeAnimation::pauseAnimationAtTime):
+
 2011-06-23  Abhishek Arya  <infe...@chromium.org>
 
         Reviewed by Adam Barth.

Modified: trunk/Source/WebCore/page/animation/CompositeAnimation.cpp (89596 => 89597)


--- trunk/Source/WebCore/page/animation/CompositeAnimation.cpp	2011-06-23 18:42:52 UTC (rev 89596)
+++ trunk/Source/WebCore/page/animation/CompositeAnimation.cpp	2011-06-23 19:11:08 UTC (rev 89597)
@@ -509,7 +509,7 @@
         return false;
 
     int count = keyframeAnim->m_animation->iterationCount();
-    if ((t >= 0.0) && (!count || (t <= count * keyframeAnim->duration()))) {
+    if ((t >= 0.0) && ((count == Animation::IterationCountInfinite) || (t <= count * keyframeAnim->duration()))) {
         keyframeAnim->freezeAtTime(t);
         return true;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to