[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

simon.fraser at apple.com simon.fraser at apple.com
Thu Oct 29 20:46:29 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit a7ca32d787b14e3d1982287123ee1ec5bbd5d224
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 17 00:17:11 2009 +0000

    2009-10-16  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Dan Bernstein.
    
            After running a transition with an end event listener, can't change the transform
            https://bugs.webkit.org/show_bug.cgi?id=30454
    
            Fix an issue where, if a document had any listener for webkitTransitionEnd or webkitAnimationEnd,
            the animations would not get cleaned up correctly, which broke subsequent changes of transform.
    
            Now, we always clean up the animations right after queuing up the end events.
    
            Tests: animations/state-at-end-event.html
                   transitions/move-after-transition.html
    
            * page/animation/ImplicitAnimation.cpp:
            (WebCore::ImplicitAnimation::onAnimationEnd):
            * page/animation/KeyframeAnimation.cpp:
            (WebCore::KeyframeAnimation::onAnimationEnd):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49711 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e15b52a..5a0bd4b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,31 @@
+2009-10-16  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        After running a transition with an end event listener, can't change the transform
+        https://bugs.webkit.org/show_bug.cgi?id=30454
+
+        Test the state of rendering when the webkitAnimationEnd event fires for a 'left' animation, via pixel test.
+        
+        * animations/state-at-end-event.html: Added.
+        * platform/mac/animations/state-at-end-event-expected.checksum: Added.
+        * platform/mac/animations/state-at-end-event-expected.png: Added.
+        * platform/mac/animations/state-at-end-event-expected.txt: Added.
+
+        Test the state of rendering when the webkitAnimationEnd event fires for a '-webkit-transform' animation, via pixel test.
+
+        * platform/mac/animations/state-at-end-event-transform-expected.checksum: Added.
+        * platform/mac/animations/state-at-end-event-transform-expected.png: Added.
+        * platform/mac/animations/state-at-end-event-transform-expected.txt: Added.
+        
+        Tests that if you change the transform  after a transition finishes, that the transform
+        does update.
+
+        * transitions/move-after-transition.html: Added.
+        * platform/mac/transitions/move-after-transition-expected.checksum: Added.
+        * platform/mac/transitions/move-after-transition-expected.png: Added.
+        * platform/mac/transitions/move-after-transition-expected.txt: Added.
+
 2009-10-16  Andrew Scherkus  <scherkus at chromium.org>
 
         Reviewed by Eric Carlson.
diff --git a/LayoutTests/animations/change-transform-in-end-event.html b/LayoutTests/animations/change-transform-in-end-event.html
new file mode 100644
index 0000000..8adea4a
--- /dev/null
+++ b/LayoutTests/animations/change-transform-in-end-event.html
@@ -0,0 +1,77 @@
+<!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">
+  <style>
+    #container {
+      position: relative;
+      width: 400px;
+      height: 100px;
+      border: 1px solid  black;
+    }
+    
+    .box {
+      position: absolute;
+      width: 100px;
+      height: 100px;
+      background-color: green;
+    }
+    
+    .indicator {
+      left: 150px;
+      top: 0;
+      background-color: red;
+    }
+    #container.moved .software {
+      left: 300px;
+    }
+
+    #container.moved .hardware {
+      -webkit-animation: move 300ms linear;
+    }
+
+    .hardware {
+      -webkit-transform-style: preserve-3d;
+    }
+
+    @-webkit-keyframes move {
+      from { -webkit-transform: translateX(0); }
+      to   { -webkit-transform: translateX(300px); }
+    }
+   </style>
+   <script type="text/javascript" charset="utf-8">
+
+    function testEnded()
+    {
+      document.getElementById('tester').style.webkitTransform = 'translateX(150px)';
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+    
+    function startTest()
+    {
+      if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
+
+      document.getElementById('tester').addEventListener('webkitAnimationEnd', testEnded, false);
+      document.getElementById('container').className = 'moved';
+    }
+    
+    window.addEventListener('load', startTest, false);
+   </script>
+</head>
+<body>
+
+  <p>At the end of the test the green box should obscure the red box.</p>
+  <div id="container">
+    <div class="indicator box"></div>
+    <div id="tester" class="hardware box"></div>
+  </div>
+
+  <div id="result">
+  </div>
+
+</body>
+</html>
diff --git a/LayoutTests/animations/state-at-end-event-transform.html b/LayoutTests/animations/state-at-end-event-transform.html
new file mode 100644
index 0000000..f1e5b6b
--- /dev/null
+++ b/LayoutTests/animations/state-at-end-event-transform.html
@@ -0,0 +1,73 @@
+<!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">
+  <style>
+    #container {
+      position: relative;
+      width: 400px;
+      height: 100px;
+      border: 1px solid  black;
+    }
+    
+    .box {
+      position: absolute;
+      width: 100px;
+      height: 100px;
+      background-color: green;
+    }
+    
+    .indicator {
+      left: 0;
+      top: 0;
+      background-color: red;
+    }
+
+    #container.moved .hardware {
+      -webkit-animation: move 300ms linear;
+    }
+
+    .hardware {
+      -webkit-transform: translate3d(0, 0, 0);
+    }
+
+    @-webkit-keyframes move {
+      from { -webkit-transform: translate3d(0, 0, 0); }
+      to   { -webkit-transform: translate3d(300px, 0, 0); }
+    }
+   </style>
+   <script type="text/javascript" charset="utf-8">
+
+    function testEnded()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+    
+    function startTest()
+    {
+      if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
+
+      document.getElementById('tester').addEventListener('webkitAnimationEnd', testEnded, false);
+      document.getElementById('container').className = 'moved';
+    }
+    
+    window.addEventListener('load', startTest, false);
+   </script>
+</head>
+<body>
+
+  <p>At the end of the test the green box should obscure the red box.</p>
+  <div id="container">
+    <div class="indicator box"></div>
+    <div id="tester" class="hardware box"></div>
+  </div>
+
+  <div id="result">
+  </div>
+
+</body>
+</html>
diff --git a/LayoutTests/animations/state-at-end-event.html b/LayoutTests/animations/state-at-end-event.html
new file mode 100644
index 0000000..149bd43
--- /dev/null
+++ b/LayoutTests/animations/state-at-end-event.html
@@ -0,0 +1,69 @@
+<!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">
+  <style>
+    #container {
+      position: relative;
+      width: 400px;
+      height: 100px;
+      border: 1px solid  black;
+    }
+    
+    .box {
+      position: absolute;
+      width: 100px;
+      height: 100px;
+      background-color: green;
+    }
+    
+    .indicator {
+      left: 0;
+      top: 0;
+      background-color: red;
+    }
+
+    #container.moved .hardware {
+      -webkit-animation: move 300ms linear;
+    }
+
+    @-webkit-keyframes move {
+      from { left: 0; }
+      to   { left: 300px; }
+    }
+   </style>
+   <script type="text/javascript" charset="utf-8">
+
+    function testEnded()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+    
+    function startTest()
+    {
+      if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
+
+      document.getElementById('tester').addEventListener('webkitAnimationEnd', testEnded, false);
+      document.getElementById('container').className = 'moved';
+    }
+    
+    window.addEventListener('load', startTest, false);
+   </script>
+</head>
+<body>
+
+  <p>At the end of the test the green box should obscure the red box.</p>
+  <div id="container">
+    <div class="indicator box"></div>
+    <div id="tester" class="hardware box"></div>
+  </div>
+
+  <div id="result">
+  </div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.checksum b/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.checksum
new file mode 100644
index 0000000..57cff35
--- /dev/null
+++ b/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.checksum
@@ -0,0 +1 @@
+8d51e48913efcaf57bb77011990d0b4f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.png b/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.png
new file mode 100644
index 0000000..9d413d7
Binary files /dev/null and b/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.png differ
diff --git a/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.txt b/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.txt
new file mode 100644
index 0000000..24e1231
--- /dev/null
+++ b/LayoutTests/platform/mac/animations/change-transform-in-end-event-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x160
+  RenderBlock {HTML} at (0,0) size 800x160
+    RenderBody {BODY} at (8,16) size 784x136
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 399x18
+          text run at (0,0) width 399: "At the end of the test the green box should obscure the red box."
+      RenderBlock {DIV} at (0,136) size 784x0
+layer at (8,50) size 402x102
+  RenderBlock (relative positioned) {DIV} at (0,34) size 402x102 [border: (1px solid #000000)]
+layer at (159,51) size 100x100
+  RenderBlock (positioned) {DIV} at (151,1) size 100x100 [bgcolor=#FF0000]
+layer at (9,51) size 100x100
+  RenderBlock (positioned) {DIV} at (1,1) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/platform/mac/animations/state-at-end-event-expected.checksum b/LayoutTests/platform/mac/animations/state-at-end-event-expected.checksum
new file mode 100644
index 0000000..f070668
--- /dev/null
+++ b/LayoutTests/platform/mac/animations/state-at-end-event-expected.checksum
@@ -0,0 +1 @@
+564efb977a1e68e4cab5e3980095cee5
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/animations/state-at-end-event-expected.png b/LayoutTests/platform/mac/animations/state-at-end-event-expected.png
new file mode 100644
index 0000000..11a34dd
Binary files /dev/null and b/LayoutTests/platform/mac/animations/state-at-end-event-expected.png differ
diff --git a/LayoutTests/platform/mac/animations/state-at-end-event-expected.txt b/LayoutTests/platform/mac/animations/state-at-end-event-expected.txt
new file mode 100644
index 0000000..7685447
--- /dev/null
+++ b/LayoutTests/platform/mac/animations/state-at-end-event-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x160
+  RenderBlock {HTML} at (0,0) size 800x160
+    RenderBody {BODY} at (8,16) size 784x136
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 399x18
+          text run at (0,0) width 399: "At the end of the test the green box should obscure the red box."
+      RenderBlock {DIV} at (0,136) size 784x0
+layer at (8,50) size 402x102
+  RenderBlock (relative positioned) {DIV} at (0,34) size 402x102 [border: (1px solid #000000)]
+layer at (9,51) size 100x100
+  RenderBlock (positioned) {DIV} at (1,1) size 100x100 [bgcolor=#FF0000]
+layer at (9,51) size 100x100
+  RenderBlock (positioned) {DIV} at (1,1) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.checksum b/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.checksum
new file mode 100644
index 0000000..f070668
--- /dev/null
+++ b/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.checksum
@@ -0,0 +1 @@
+564efb977a1e68e4cab5e3980095cee5
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.png b/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.png
new file mode 100644
index 0000000..11a34dd
Binary files /dev/null and b/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.png differ
diff --git a/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.txt b/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.txt
new file mode 100644
index 0000000..7685447
--- /dev/null
+++ b/LayoutTests/platform/mac/animations/state-at-end-event-transform-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x160
+  RenderBlock {HTML} at (0,0) size 800x160
+    RenderBody {BODY} at (8,16) size 784x136
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 399x18
+          text run at (0,0) width 399: "At the end of the test the green box should obscure the red box."
+      RenderBlock {DIV} at (0,136) size 784x0
+layer at (8,50) size 402x102
+  RenderBlock (relative positioned) {DIV} at (0,34) size 402x102 [border: (1px solid #000000)]
+layer at (9,51) size 100x100
+  RenderBlock (positioned) {DIV} at (1,1) size 100x100 [bgcolor=#FF0000]
+layer at (9,51) size 100x100
+  RenderBlock (positioned) {DIV} at (1,1) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/platform/mac/transitions/move-after-transition-expected.checksum b/LayoutTests/platform/mac/transitions/move-after-transition-expected.checksum
new file mode 100644
index 0000000..57cff35
--- /dev/null
+++ b/LayoutTests/platform/mac/transitions/move-after-transition-expected.checksum
@@ -0,0 +1 @@
+8d51e48913efcaf57bb77011990d0b4f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/transitions/move-after-transition-expected.png b/LayoutTests/platform/mac/transitions/move-after-transition-expected.png
new file mode 100644
index 0000000..9d413d7
Binary files /dev/null and b/LayoutTests/platform/mac/transitions/move-after-transition-expected.png differ
diff --git a/LayoutTests/platform/mac/transitions/move-after-transition-expected.txt b/LayoutTests/platform/mac/transitions/move-after-transition-expected.txt
new file mode 100644
index 0000000..24e1231
--- /dev/null
+++ b/LayoutTests/platform/mac/transitions/move-after-transition-expected.txt
@@ -0,0 +1,15 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x160
+  RenderBlock {HTML} at (0,0) size 800x160
+    RenderBody {BODY} at (8,16) size 784x136
+      RenderBlock {P} at (0,0) size 784x18
+        RenderText {#text} at (0,0) size 399x18
+          text run at (0,0) width 399: "At the end of the test the green box should obscure the red box."
+      RenderBlock {DIV} at (0,136) size 784x0
+layer at (8,50) size 402x102
+  RenderBlock (relative positioned) {DIV} at (0,34) size 402x102 [border: (1px solid #000000)]
+layer at (159,51) size 100x100
+  RenderBlock (positioned) {DIV} at (151,1) size 100x100 [bgcolor=#FF0000]
+layer at (9,51) size 100x100
+  RenderBlock (positioned) {DIV} at (1,1) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.checksum b/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.checksum
new file mode 100644
index 0000000..fe439bd
--- /dev/null
+++ b/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.checksum
@@ -0,0 +1 @@
+bd3f1ade4b6e7e8b65b3bbf4bfd67770
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.png b/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.png
new file mode 100644
index 0000000..dd6b19d
Binary files /dev/null and b/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.png differ
diff --git a/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.txt b/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.txt
new file mode 100644
index 0000000..210a98f
--- /dev/null
+++ b/LayoutTests/platform/mac/transitions/transition-end-event-rendering-expected.txt
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x232
+  RenderBlock {HTML} at (0,0) size 800x232
+    RenderBody {BODY} at (0,0) size 800x232
+      RenderBlock {DIV} at (0,232) size 800x0
+layer at (0,0) size 402x232
+  RenderBlock (relative positioned) {DIV} at (0,0) size 402x232 [border: (1px solid #000000)]
+layer at (1,11) size 100x100
+  RenderBlock (relative positioned) {DIV} at (1,11) size 100x100 [bgcolor=#008000]
diff --git a/LayoutTests/transitions/move-after-transition.html b/LayoutTests/transitions/move-after-transition.html
new file mode 100644
index 0000000..33b44bc
--- /dev/null
+++ b/LayoutTests/transitions/move-after-transition.html
@@ -0,0 +1,80 @@
+<!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">
+  <style>
+    #container {
+      position: relative;
+      width: 400px;
+      height: 100px;
+      border: 1px solid  black;
+    }
+    
+    .box {
+      position: absolute;
+      width: 100px;
+      height: 100px;
+      background-color: green;
+    }
+    
+    .indicator {
+      left: 150px;
+      top: 0;
+      background-color: red;
+    }
+    #container.moved .software {
+      left: 300px;
+    }
+
+    #container.moved .hardware {
+      -webkit-transform: translateX(300px);
+    }
+
+    .hardware {
+      -webkit-transform-style: preserve-3d;
+      -webkit-transition: -webkit-transform 300ms linear;
+      -webkit-transform: translateX(0);
+    }
+
+   </style>
+   <script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
+   <script type="text/javascript" charset="utf-8">
+
+    function testEnded()
+    {
+      var testDiv = document.getElementById('tester');
+      testDiv.style.webkitTransitionProperty = 'none';
+      testDiv.style.webkitTransitionDuration = '0';
+
+      testDiv.style.webkitTransform = 'translateX(150px)';
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+    
+    function startTest()
+    {
+      if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
+
+      document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false);
+      document.getElementById('container').className = 'moved';
+    }
+    
+    window.addEventListener('load', startTest, false);
+   </script>
+</head>
+<body>
+
+  <p>At the end of the test the green box should obscure the red box.</p>
+  <div id="container">
+    <div class="indicator box"></div>
+    <div id="tester" class="hardware box"></div>
+  </div>
+
+  <div id="result">
+  </div>
+
+</body>
+</html>
diff --git a/LayoutTests/transitions/transition-end-event-rendering.html b/LayoutTests/transitions/transition-end-event-rendering.html
new file mode 100644
index 0000000..d7b68c6
--- /dev/null
+++ b/LayoutTests/transitions/transition-end-event-rendering.html
@@ -0,0 +1,76 @@
+<!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">
+  <style>
+    body {
+      margin: 0;
+    }
+    
+    #container {
+      position: relative;
+      width: 400px;
+      height: 230px;
+      border: 1px solid  black;
+    }
+    
+    .box {
+      position: relative;
+      width: 100px;
+      height: 100px;
+      margin: 10px 0;
+      background-color: green;
+    }
+    
+    #container.moved .software {
+      left: 300px;
+    }
+
+    #container.moved .hardware {
+      -webkit-transform: translateX(300px);
+    }
+
+    .software {
+      -webkit-transition: left 300ms linear;
+    }
+
+    .hardware {
+      -webkit-transition: -webkit-transform 1s linear;
+      -webkit-transform: translateX(0);
+    }
+
+   </style>
+   <script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
+   <script type="text/javascript" charset="utf-8">
+
+    function testEnded()
+    {
+      if (window.layoutTestController)
+        layoutTestController.notifyDone();
+    }
+    
+    function startTest()
+    {
+      if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
+      document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false);
+      document.getElementById('container').className = 'moved';
+    }
+    
+    window.addEventListener('load', startTest, false);
+   </script>
+</head>
+<body>
+
+  <div id="container">
+    <!-- <div class="software box"></div> -->
+    <div id="tester" class="hardware box"></div>
+  </div>
+
+  <div id="result">
+  </div>
+
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0684128..4215948 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2009-10-16  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        After running a transition with an end event listener, can't change the transform
+        https://bugs.webkit.org/show_bug.cgi?id=30454
+        
+        Fix an issue where, if a document had any listener for webkitTransitionEnd or webkitAnimationEnd,
+        the animations would not get cleaned up correctly, which broke subsequent changes of transform.
+        
+        Now, we always clean up the animations right after queuing up the end events.
+
+        Tests: animations/state-at-end-event.html
+               transitions/move-after-transition.html
+
+        * page/animation/ImplicitAnimation.cpp:
+        (WebCore::ImplicitAnimation::onAnimationEnd):
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::onAnimationEnd):
+
 2009-10-15  Joseph Pecoraro  <joepeck at webkit.org>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/page/animation/ImplicitAnimation.cpp b/WebCore/page/animation/ImplicitAnimation.cpp
index 8e6349d..50fc781 100644
--- a/WebCore/page/animation/ImplicitAnimation.cpp
+++ b/WebCore/page/animation/ImplicitAnimation.cpp
@@ -142,10 +142,8 @@ void ImplicitAnimation::onAnimationEnd(double elapsedTime)
     if (keyframeAnim)
         keyframeAnim->setUnanimatedStyle(m_toStyle);
     
-    if (!sendTransitionEvent(eventNames().webkitTransitionEndEvent, elapsedTime)) {
-        // We didn't dispatch an event, which would call endAnimation(), so we'll just call it here.
-        endAnimation(true);
-    }
+    sendTransitionEvent(eventNames().webkitTransitionEndEvent, elapsedTime);
+    endAnimation(true);
 }
 
 bool ImplicitAnimation::sendTransitionEvent(const AtomicString& eventType, double elapsedTime)
diff --git a/WebCore/page/animation/KeyframeAnimation.cpp b/WebCore/page/animation/KeyframeAnimation.cpp
index 39ae1e7..7e37e5f 100644
--- a/WebCore/page/animation/KeyframeAnimation.cpp
+++ b/WebCore/page/animation/KeyframeAnimation.cpp
@@ -244,10 +244,8 @@ void KeyframeAnimation::onAnimationIteration(double elapsedTime)
 
 void KeyframeAnimation::onAnimationEnd(double elapsedTime)
 {
-    if (!sendAnimationEvent(eventNames().webkitAnimationEndEvent, elapsedTime)) {
-        // We didn't dispatch an event, which would call endAnimation(), so we'll just call it here.
-        endAnimation(true);
-    }
+    sendAnimationEvent(eventNames().webkitAnimationEndEvent, elapsedTime);
+    endAnimation(true);
 }
 
 bool KeyframeAnimation::sendAnimationEvent(const AtomicString& eventType, double elapsedTime)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list