<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[187950] releases/WebKitGTK/webkit-2.8</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/187950">187950</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-08-05 01:51:55 -0700 (Wed, 05 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/187535">r187535</a> - Animations sometimes fail to start
https://bugs.webkit.org/show_bug.cgi?id=147394
rdar://problem/21852603
Reviewed by Dean Jackson.
Source/WebCore:
When an accelerated animation or transition was started at the same time as
a non-accelerated one, and then the node for the former was removed, we could
never kick off the non-accelerated animation.
AnimationControllerPrivate has logic to synchronize the two types of animation
when they start in the same animation update, which involves setting the
m_waitingForAsyncStartNotification flag, and waiting for a notifyAnimationStarted()
to come in from the graphics system.
However, it failed to handle the case where the accelerated animation was removed
before the callback was received, which left the m_waitingForAsyncStartNotification flag
set to true, preventing the non-accelerated animation from running.
Test: animations/remove-syncing-animation.html
* page/animation/AnimationBase.h:
(WebCore::AnimationBase::isAccelerated): Make this public.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::clear): Add logging.
(WebCore::AnimationControllerPrivate::receivedStartTimeResponse): Add logging.
(WebCore::AnimationControllerPrivate::animationWillBeRemoved): Add logging.
After removing animations from the maps, check to see if we expect any of the
remaining animations are waiting for a notifyAnimationStarted(). If not, clear
the m_waitingForAsyncStartNotification flag.
(WebCore::AnimationController::notifyAnimationStarted): Log the renderer.
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Remove unneeded
initializations of HashMaps.
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions): Log renderers.
(WebCore::CompositeAnimation::updateKeyframeAnimations): Ditto.
LayoutTests:
Test that starts an accelerated and non-accelerated animation, then removes
the node for the accelerated one.
* animations/remove-syncing-animation-expected.txt: Added.
* animations/remove-syncing-animation.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorepageanimationAnimationBaseh">releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationBase.h</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorepageanimationAnimationControllercpp">releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationController.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorepageanimationCompositeAnimationcpp">releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/CompositeAnimation.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsanimationsremovesyncinganimationexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsanimationsremovesyncinganimationhtml">releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit28LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog (187949 => 187950)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog        2015-08-05 08:34:02 UTC (rev 187949)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog        2015-08-05 08:51:55 UTC (rev 187950)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-07-28 Simon Fraser <simon.fraser@apple.com>
+
+ Animations sometimes fail to start
+ https://bugs.webkit.org/show_bug.cgi?id=147394
+ rdar://problem/21852603
+
+ Reviewed by Dean Jackson.
+
+ Test that starts an accelerated and non-accelerated animation, then removes
+ the node for the accelerated one.
+
+ * animations/remove-syncing-animation-expected.txt: Added.
+ * animations/remove-syncing-animation.html: Added.
+
</ins><span class="cx"> 2015-07-28 Michael Catanzaro <mcatanzaro@igalia.com>
</span><span class="cx">
</span><span class="cx"> [Freetype] Always allow font matching for strong aliases
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsanimationsremovesyncinganimationexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation-expected.txt (0 => 187950)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation-expected.txt         (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation-expected.txt        2015-08-05 08:51:55 UTC (rev 187950)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+The remaining square should show a color animation from orange to green.
+
+Color keyframes.
+PASS - colors animation ran.
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsanimationsremovesyncinganimationhtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation.html (0 => 187950)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation.html         (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/animations/remove-syncing-animation.html        2015-08-05 08:51:55 UTC (rev 187950)
</span><span class="lines">@@ -0,0 +1,93 @@
</span><ins>+<!DOCTYPE html>
+
+<html>
+<head>
+ <style>
+ #container {
+
+ }
+
+ .box {
+ height: 100px;
+ width: 100px;
+ margin: 10px;
+ background-color: blue;
+ }
+
+ #container.changed #first {
+ -webkit-animation: fade 0.1s linear;
+ }
+
+ #container.changed #second {
+ -webkit-animation: colors 0.1s linear;
+ }
+
+ @-webkit-keyframes fade {
+ from { opacity: 0; }
+ to { opacity: 1; }
+ }
+
+ @-webkit-keyframes colors {
+ from { background-color: orange; }
+ to { background-color: green; }
+ }
+ </style>
+ <script>
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+
+ function log(message)
+ {
+ var results = document.getElementById("results");
+ results.innerHTML = results.innerHTML + message + "<br>";
+ }
+
+ var watchdogTimeoutID;
+
+ function testComplete()
+ {
+ window.clearTimeout(watchdogTimeoutID);
+ watchdogTimeoutID = 0;
+ log('PASS - colors animation ran.');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+
+ function doTest()
+ {
+ window.setTimeout(function() {
+ document.getElementById('second').addEventListener('animationend', testComplete);
+ document.getElementById('container').classList.add('changed');
+
+ window.setTimeout(function() {
+ document.getElementById('first').remove();
+ }, 0);
+ }, 0);
+
+ watchdogTimeoutID = window.setTimeout(function() {
+ log('FAIL - colors animation did not run.');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 500);
+ }
+
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+
+<p>The remaining square should show a color animation from orange to green.</p>
+<div id="container">
+ <div id="first" class="box">
+ Opacity keyframes.
+ </div>
+ <div id="second" class="box">
+ Color keyframes.
+ </div>
+</div>
+
+<div id="results"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (187949 => 187950)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-08-05 08:34:02 UTC (rev 187949)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-08-05 08:51:55 UTC (rev 187950)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2015-07-28 Simon Fraser <simon.fraser@apple.com>
+
+ Animations sometimes fail to start
+ https://bugs.webkit.org/show_bug.cgi?id=147394
+ rdar://problem/21852603
+
+ Reviewed by Dean Jackson.
+
+ When an accelerated animation or transition was started at the same time as
+ a non-accelerated one, and then the node for the former was removed, we could
+ never kick off the non-accelerated animation.
+
+ AnimationControllerPrivate has logic to synchronize the two types of animation
+ when they start in the same animation update, which involves setting the
+ m_waitingForAsyncStartNotification flag, and waiting for a notifyAnimationStarted()
+ to come in from the graphics system.
+
+ However, it failed to handle the case where the accelerated animation was removed
+ before the callback was received, which left the m_waitingForAsyncStartNotification flag
+ set to true, preventing the non-accelerated animation from running.
+
+ Test: animations/remove-syncing-animation.html
+
+ * page/animation/AnimationBase.h:
+ (WebCore::AnimationBase::isAccelerated): Make this public.
+ * page/animation/AnimationController.cpp:
+ (WebCore::AnimationControllerPrivate::clear): Add logging.
+ (WebCore::AnimationControllerPrivate::receivedStartTimeResponse): Add logging.
+ (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Add logging.
+ After removing animations from the maps, check to see if we expect any of the
+ remaining animations are waiting for a notifyAnimationStarted(). If not, clear
+ the m_waitingForAsyncStartNotification flag.
+ (WebCore::AnimationController::notifyAnimationStarted): Log the renderer.
+ (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Remove unneeded
+ initializations of HashMaps.
+ * page/animation/CompositeAnimation.cpp:
+ (WebCore::CompositeAnimation::updateTransitions): Log renderers.
+ (WebCore::CompositeAnimation::updateKeyframeAnimations): Ditto.
+
</ins><span class="cx"> 2015-07-28 Michael Catanzaro <mcatanzaro@igalia.com>
</span><span class="cx">
</span><span class="cx"> [Freetype] Always allow font matching for strong aliases
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorepageanimationAnimationBaseh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationBase.h (187949 => 187950)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationBase.h        2015-08-05 08:34:02 UTC (rev 187949)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationBase.h        2015-08-05 08:51:55 UTC (rev 187950)
</span><span class="lines">@@ -129,6 +129,8 @@
</span><span class="cx"> bool waitingForStartTime() const { return m_animationState == AnimationState::StartWaitResponse; }
</span><span class="cx"> bool waitingForStyleAvailable() const { return m_animationState == AnimationState::StartWaitStyleAvailable; }
</span><span class="cx">
</span><ins>+ bool isAccelerated() const { return m_isAccelerated; }
+
</ins><span class="cx"> virtual double timeToNextService();
</span><span class="cx">
</span><span class="cx"> double progress(double scale, double offset, const TimingFunction*) const;
</span><span class="lines">@@ -228,8 +230,6 @@
</span><span class="cx">
</span><span class="cx"> void goIntoEndingOrLoopingState();
</span><span class="cx">
</span><del>- bool isAccelerated() const { return m_isAccelerated; }
-
</del><span class="cx"> static void setNeedsStyleRecalc(Element*);
</span><span class="cx">
</span><span class="cx"> void getTimeToNextEvent(double& time, bool& isLooping) const;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorepageanimationAnimationControllercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationController.cpp (187949 => 187950)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationController.cpp        2015-08-05 08:34:02 UTC (rev 187949)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/AnimationController.cpp        2015-08-05 08:51:55 UTC (rev 187950)
</span><span class="lines">@@ -72,8 +72,6 @@
</span><span class="cx"> , m_updateStyleIfNeededDispatcher(*this, &AnimationControllerPrivate::updateStyleIfNeededDispatcherFired)
</span><span class="cx"> , m_frame(frame)
</span><span class="cx"> , m_beginAnimationUpdateTime(cBeginAnimationUpdateTimeNotSet)
</span><del>- , m_animationsWaitingForStyle()
- , m_animationsWaitingForStartTimeResponse()
</del><span class="cx"> , m_beginAnimationUpdateCount(0)
</span><span class="cx"> , m_waitingForAsyncStartNotification(false)
</span><span class="cx"> , m_isSuspended(false)
</span><span class="lines">@@ -97,6 +95,8 @@
</span><span class="cx">
</span><span class="cx"> bool AnimationControllerPrivate::clear(RenderElement& renderer)
</span><span class="cx"> {
</span><ins>+ LOG(Animations, "AnimationControllerPrivate %p clear: %p", this, &renderer);
+
</ins><span class="cx"> ASSERT(renderer.isCSSAnimating());
</span><span class="cx"> ASSERT(m_compositeAnimations.contains(&renderer));
</span><span class="cx">
</span><span class="lines">@@ -410,6 +410,8 @@
</span><span class="cx">
</span><span class="cx"> void AnimationControllerPrivate::receivedStartTimeResponse(double time)
</span><span class="cx"> {
</span><ins>+ LOG(Animations, "AnimationControllerPrivate %p receivedStartTimeResponse %f", this, time);
+
</ins><span class="cx"> m_waitingForAsyncStartNotification = false;
</span><span class="cx"> startTimeResponse(time);
</span><span class="cx"> }
</span><span class="lines">@@ -509,8 +511,21 @@
</span><span class="cx">
</span><span class="cx"> void AnimationControllerPrivate::animationWillBeRemoved(AnimationBase* animation)
</span><span class="cx"> {
</span><ins>+ LOG(Animations, "AnimationControllerPrivate %p animationWillBeRemoved: %p", this, animation);
+
</ins><span class="cx"> removeFromAnimationsWaitingForStyle(animation);
</span><span class="cx"> removeFromAnimationsWaitingForStartTimeResponse(animation);
</span><ins>+
+ bool anyAnimationsWaitingForAsyncStart = false;
+ for (auto& animation : m_animationsWaitingForStartTimeResponse) {
+ if (animation->waitingForStartTime() && animation->isAccelerated()) {
+ anyAnimationsWaitingForAsyncStart = true;
+ break;
+ }
+ }
+
+ if (!anyAnimationsWaitingForAsyncStart)
+ m_waitingForAsyncStartNotification = false;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> AnimationController::AnimationController(Frame& frame)
</span><span class="lines">@@ -588,8 +603,11 @@
</span><span class="cx"> return m_data->getAnimatedStyleForRenderer(renderer);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void AnimationController::notifyAnimationStarted(RenderElement&, double startTime)
</del><ins>+void AnimationController::notifyAnimationStarted(RenderElement& renderer, double startTime)
</ins><span class="cx"> {
</span><ins>+ LOG(Animations, "AnimationController %p notifyAnimationStarted on renderer %p, time=%f", this, &renderer, startTime);
+ UNUSED_PARAM(renderer);
+
</ins><span class="cx"> AnimationUpdateBlock animationUpdateBlock(this);
</span><span class="cx"> m_data->receivedStartTimeResponse(startTime);
</span><span class="cx"> }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorepageanimationCompositeAnimationcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/CompositeAnimation.cpp (187949 => 187950)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/CompositeAnimation.cpp        2015-08-05 08:34:02 UTC (rev 187949)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/animation/CompositeAnimation.cpp        2015-08-05 08:51:55 UTC (rev 187950)
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> if (!equal && isActiveTransition) {
</span><span class="cx"> // Add the new transition
</span><span class="cx"> RefPtr<ImplicitAnimation> implicitAnimation = ImplicitAnimation::create(animation, prop, renderer, this, modifiedCurrentStyle ? modifiedCurrentStyle.get() : fromStyle);
</span><del>- LOG(Animations, "Created ImplicitAnimation %p for property %s duration %.2f delay %.2f", implicitAnimation.get(), getPropertyName(prop), animation.duration(), animation.delay());
</del><ins>+ LOG(Animations, "Created ImplicitAnimation %p on renderer %p for property %s duration %.2f delay %.2f", implicitAnimation.get(), renderer, getPropertyName(prop), animation.duration(), animation.delay());
</ins><span class="cx"> m_transitions.set(prop, implicitAnimation.release());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -186,13 +186,11 @@
</span><span class="cx">
</span><span class="cx"> // Make a list of transitions to be removed
</span><span class="cx"> Vector<int> toBeRemoved;
</span><del>- end = m_transitions.end();
- for (CSSPropertyTransitionsMap::const_iterator it = m_transitions.begin(); it != end; ++it) {
- ImplicitAnimation* anim = it->value.get();
- if (!anim->active()) {
- animationController()->animationWillBeRemoved(anim);
- toBeRemoved.append(anim->animatingProperty());
- LOG(Animations, "Removing ImplicitAnimation %p for property %s", anim, getPropertyName(anim->animatingProperty()));
</del><ins>+ for (auto& transition : m_transitions.values()) {
+ if (!transition->active()) {
+ animationController()->animationWillBeRemoved(transition.get());
+ toBeRemoved.append(transition->animatingProperty());
+ LOG(Animations, "Removing ImplicitAnimation %p from renderer %p for property %s", transition.get(), renderer, getPropertyName(transition->animatingProperty()));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -256,7 +254,7 @@
</span><span class="cx"> keyframeAnim->setIndex(i);
</span><span class="cx"> } else if ((animation.duration() || animation.delay()) && animation.iterationCount() && animationName != none) {
</span><span class="cx"> keyframeAnim = KeyframeAnimation::create(animation, renderer, i, this, targetStyle);
</span><del>- LOG(Animations, "Creating KeyframeAnimation %p with keyframes %s, duration %.2f, delay %.2f, iterations %.2f", keyframeAnim.get(), animation.name().utf8().data(), animation.duration(), animation.delay(), animation.iterationCount());
</del><ins>+ LOG(Animations, "Creating KeyframeAnimation %p on renderer %p with keyframes %s, duration %.2f, delay %.2f, iterations %.2f", keyframeAnim.get(), renderer, animation.name().utf8().data(), animation.duration(), animation.delay(), animation.iterationCount());
</ins><span class="cx"> if (m_suspended) {
</span><span class="cx"> keyframeAnim->updatePlayState(AnimPlayStatePaused);
</span><span class="cx"> LOG(Animations, " (created in suspended/paused state)");
</span><span class="lines">@@ -277,14 +275,12 @@
</span><span class="cx">
</span><span class="cx"> // Make a list of animations to be removed.
</span><span class="cx"> Vector<AtomicStringImpl*> animsToBeRemoved;
</span><del>- kfend = m_keyframeAnimations.end();
- for (AnimationNameMap::const_iterator it = m_keyframeAnimations.begin(); it != kfend; ++it) {
- KeyframeAnimation* keyframeAnim = it->value.get();
- if (keyframeAnim->index() < 0) {
- animsToBeRemoved.append(keyframeAnim->name().impl());
- animationController()->animationWillBeRemoved(keyframeAnim);
- keyframeAnim->clear();
- LOG(Animations, "Removing KeyframeAnimation %p", keyframeAnim);
</del><ins>+ for (auto& animation : m_keyframeAnimations.values()) {
+ if (animation->index() < 0) {
+ animsToBeRemoved.append(animation->name().impl());
+ animationController()->animationWillBeRemoved(animation.get());
+ animation->clear();
+ LOG(Animations, "Removing KeyframeAnimation %p from renderer %p", animation.get(), renderer);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>