[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:32:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1740e578679b1ffa44b7fa79d5c3b0b564cb5626
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Sep 18 23:02:45 2010 +0000

    2010-09-18  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Simon Fraser.
    
            webkitAnimationEnd event doesn't fire when skipping over final iteration
            https://bugs.webkit.org/show_bug.cgi?id=46010
    
            Add a test with a short enough animation interval (0.001s) that we
            appear to always skip the second iteration.
    
            * animations/animation-end-event-short-iterations-expected.txt: Added.
            * animations/animation-end-event-short-iterations.html: Added.
    2010-09-18  Mihai Parparita  <mihaip at chromium.org>
    
            Reviewed by Simon Fraser.
    
            webkitAnimationEnd event doesn't fire when skipping over final iteration
            https://bugs.webkit.org/show_bug.cgi?id=46010
    
            It's possible for AnimationBase::fireAnimationEventsIfNeeded to decide
            that the animation is ended while we're in the looping state, if the
            animation timer never fires during an iteration. That then fails the
            assert in AnimationBase::updateStateMachine (we don't expect
            AnimationStateInputEndTimerFired while in the looping state). Jump the
            state to AnimationStateEnding, which is more accurate.
    
            Test: animations/animation-end-event-short-iterations.html
    
            * page/animation/AnimationBase.cpp:
            (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67797 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e2bd16a..e10e535 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-18  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Simon Fraser.
+
+        webkitAnimationEnd event doesn't fire when skipping over final iteration
+        https://bugs.webkit.org/show_bug.cgi?id=46010
+        
+        Add a test with a short enough animation interval (0.001s) that we 
+        appear to always skip the second iteration.
+
+        * animations/animation-end-event-short-iterations-expected.txt: Added.
+        * animations/animation-end-event-short-iterations.html: Added.
+
 2010-09-17  Mihai Parparita  <mihaip at chromium.org>
 
        Reviewed by James Robinson.
diff --git a/LayoutTests/animations/animation-end-event-short-iterations-expected.txt b/LayoutTests/animations/animation-end-event-short-iterations-expected.txt
new file mode 100644
index 0000000..fb6759a
--- /dev/null
+++ b/LayoutTests/animations/animation-end-event-short-iterations-expected.txt
@@ -0,0 +1,3 @@
+Checks that we still end an animation properly (i.e. fire a webkitAnimationEnd event) when using more than one iteration with very short durations.
+PASS: got webkitAnimationEnd event
+
diff --git a/LayoutTests/animations/animation-end-event-short-iterations.html b/LayoutTests/animations/animation-end-event-short-iterations.html
new file mode 100644
index 0000000..483e5b6
--- /dev/null
+++ b/LayoutTests/animations/animation-end-event-short-iterations.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Test animations with repeated iterations and short loops</title>
+  <style>
+    #box {
+      position: relative;
+      left: 100px;
+      top: 10px;
+      height: 100px;
+      width: 100px;
+      -webkit-animation-duration: 0.001s;
+      -webkit-animation-name: anim;
+      background-color: #999;
+      -webkit-animation-iteration-count: 2;
+    }
+    @-webkit-keyframes anim {
+        from { left: 200px; }
+        to   { left: 300px; }
+    }
+  </style>
+  <script>
+    if (window.layoutTestController) {
+        layoutTestController.dumpAsText();
+        layoutTestController.waitUntilDone();
+    }
+  
+    onload = function()
+    {
+        document.addEventListener('webkitAnimationEnd', function() {
+            document.getElementById('result').innerHTML = 'PASS: got webkitAnimationEnd event';      
+            if (window.layoutTestController)
+                layoutTestController.notifyDone();
+        }, false);
+        
+        // Animation begins once we append the DOM node to the document.
+        var boxNode = document.createElement('div');
+        boxNode.id = 'box';
+        document.body.appendChild(boxNode);
+    }
+  </script>
+</head>
+<body>
+Checks that we still end an animation properly (i.e. fire a webkitAnimationEnd
+event) when using more than one iteration with very short durations.
+<pre id="result">FAIL: no webkitAnimationEnd event received</pre>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2ea0209..da7d227 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-18  Mihai Parparita  <mihaip at chromium.org>
+
+        Reviewed by Simon Fraser.
+
+        webkitAnimationEnd event doesn't fire when skipping over final iteration
+        https://bugs.webkit.org/show_bug.cgi?id=46010
+        
+        It's possible for AnimationBase::fireAnimationEventsIfNeeded to decide
+        that the animation is ended while we're in the looping state, if the
+        animation timer never fires during an iteration. That then fails the
+        assert in AnimationBase::updateStateMachine (we don't expect
+        AnimationStateInputEndTimerFired while in the looping state). Jump the
+        state to AnimationStateEnding, which is more accurate.
+
+        Test: animations/animation-end-event-short-iterations.html
+
+        * page/animation/AnimationBase.cpp:
+        (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
+
 2010-09-18  Kwang Yul Seo  <skyul at company100.net>
 
         Reviewed by Andreas Kling.
diff --git a/WebCore/page/animation/AnimationBase.cpp b/WebCore/page/animation/AnimationBase.cpp
index 6efed8e..ade68b5 100644
--- a/WebCore/page/animation/AnimationBase.cpp
+++ b/WebCore/page/animation/AnimationBase.cpp
@@ -1180,6 +1180,10 @@ void AnimationBase::fireAnimationEventsIfNeeded()
     
     // Check for end timeout
     if (m_totalDuration >= 0 && elapsedDuration >= m_totalDuration) {
+        // We may still be in AnimationStateLooping if we've managed to skip a
+        // whole iteration, in which case we should jump to the end state.
+        m_animState = AnimationStateEnding;
+
         // Fire an end event
         updateStateMachine(AnimationStateInputEndTimerFired, m_totalDuration);
     } else {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list